Search in sources :

Example 1 with JavaBatchTableTestUtil

use of org.apache.flink.table.planner.utils.JavaBatchTableTestUtil in project flink by apache.

the class TransformationsTest method testLegacyBatchValues.

@Test
public void testLegacyBatchValues() {
    final JavaBatchTableTestUtil util = javaBatchTestUtil();
    final StreamTableEnvironment env = util.tableEnv();
    final Table table = env.fromValues(1, 2, 3);
    final LegacySourceTransformation<?> sourceTransform = toLegacySourceTransformation(env, table);
    assertBoundedness(Boundedness.BOUNDED, sourceTransform);
}
Also used : Table(org.apache.flink.table.api.Table) JavaBatchTableTestUtil(org.apache.flink.table.planner.utils.JavaBatchTableTestUtil) StreamTableEnvironment(org.apache.flink.table.api.bridge.java.StreamTableEnvironment) Test(org.junit.Test)

Example 2 with JavaBatchTableTestUtil

use of org.apache.flink.table.planner.utils.JavaBatchTableTestUtil in project flink by apache.

the class TransformationsTest method testLegacyBatchSource.

@Test
public void testLegacyBatchSource() {
    final JavaBatchTableTestUtil util = javaBatchTestUtil();
    final StreamTableEnvironment env = util.tableEnv();
    final Table table = env.from(TableDescriptor.forConnector("values").option("bounded", "true").schema(dummySchema()).build());
    final LegacySourceTransformation<?> sourceTransform = toLegacySourceTransformation(env, table);
    assertBoundedness(Boundedness.BOUNDED, sourceTransform);
    assertFalse(sourceTransform.getOperator().emitsProgressiveWatermarks());
}
Also used : Table(org.apache.flink.table.api.Table) JavaBatchTableTestUtil(org.apache.flink.table.planner.utils.JavaBatchTableTestUtil) StreamTableEnvironment(org.apache.flink.table.api.bridge.java.StreamTableEnvironment) Test(org.junit.Test)

Aggregations

Table (org.apache.flink.table.api.Table)2 StreamTableEnvironment (org.apache.flink.table.api.bridge.java.StreamTableEnvironment)2 JavaBatchTableTestUtil (org.apache.flink.table.planner.utils.JavaBatchTableTestUtil)2 Test (org.junit.Test)2