Details
-
Improvement
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
Description
This issue can be fired by updating the testAvroToAvro method in the org.apache.flink.table.runtime.batch.AvroTypesITCase class.
@Test public void testAvroToAvro() { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); StreamTableEnvironment tEnv = StreamTableEnvironment.create(env); DataStream<User> ds = testData(env); // before: using deprecated method // Table t = tEnv.fromDataStream(ds, selectFields(ds)); // after: using recommended new method Table t = tEnv.fromDataStream(ds); Table result = t.select($("*")); // before: using deprecated method // List<User> results = // CollectionUtil.iteratorToList( // DataStreamUtils.collect(tEnv.toAppendStream(result, User.class))); // after: using recommended new method List<User> results = CollectionUtil.iteratorToList( DataStreamUtils.collect(tEnv.toDataStream(result, User.class))); List<User> expected = Arrays.asList(USER_1, USER_2, USER_3); assertThat(results).isEqualTo(expected); }
An exception will be thrown:
Attachments
Attachments
Issue Links
- blocks
-
FLINK-36132 Remove codes that references TableSource and TableSink directly at the API level.
- In Progress
- links to