raminqaf commented on code in PR #26954:
URL: https://github.com/apache/flink/pull/26954#discussion_r2883084216


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlDdlToOperationConverterTest.java:
##########
@@ -951,11 +950,15 @@ void testCreateTableWithFullDataTypes() {
         final CalciteParser parser = getParserBySqlDialect(SqlDialect.DEFAULT);
         SqlNode node = parser.parse(sql);
         assertThat(node).isInstanceOf(SqlCreateTable.class);
-        Operation operation =
-                SqlNodeToOperationConversion.convert(planner, catalogManager, 
node).get();
-        TableSchema schema = ((CreateTableOperation) 
operation).getCatalogTable().getSchema();
-        Object[] expectedDataTypes = testItems.stream().map(item -> 
item.expectedType).toArray();
-        assertThat(schema.getFieldDataTypes()).isEqualTo(expectedDataTypes);
+        final Optional<Operation> convert =
+                SqlNodeToOperationConversion.convert(planner, catalogManager, 
node);
+        assertThat(convert).isPresent();
+        Operation operation = convert.get();
+        ResolvedSchema schema =
+                ((CreateTableOperation) 
operation).getCatalogTable().getResolvedSchema();
+        List<Object> expectedDataTypes =

Review Comment:
   Moved everything into the inner class with static factory methods.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to