Class TestTableUtils
java.lang.Object
org.apache.beam.sdk.extensions.sql.meta.provider.test.TestTableUtils
Utility functions for mock classes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Schema
buildBeamSqlNullableSchema
(Object... args) static Schema
buildBeamSqlSchema
(Object... args) Create a RowsBuilder with the specified row type info.Convenient way to build aBeamSqlRow
s.static Schema.Field
toNullableRecordField
(Object[] args, int i) static Schema.Field
toRecordField
(Object[] args, int i)
-
Constructor Details
-
TestTableUtils
public TestTableUtils()
-
-
Method Details
-
buildBeamSqlSchema
Create a RowsBuilder with the specified row type info.For example:
TestUtils.RowsBuilder.of( Types.INTEGER, "order_id", Types.INTEGER, "sum_site_id", Types.VARCHAR, "buyer" )
- Parameters:
args
- pairs of column type and column names.
-
buildBeamSqlNullableSchema
-
toRecordField
-
toNullableRecordField
-
buildRows
Convenient way to build aBeamSqlRow
s.e.g.
buildRows( schema, 1, 1, 1, // the first row 2, 2, 2, // the second row ... )
-