twalthr commented on a change in pull request #8549: 
[FLINK-12604][table-api][table-planner] Register TableSource/Sink as 
CatalogTables
URL: https://github.com/apache/flink/pull/8549#discussion_r289815256
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/plan/TableOperationConverter.java
 ##########
 @@ -264,6 +273,28 @@ public RelNode visitOther(TableOperation other) {
                        throw new TableException("Unknown table operation: " + 
other);
                }
 
+               @Override
+               public <U> RelNode 
visitTableSourceTable(TableSourceTableOperation<U> tableSourceTable) {
+                       final Table relTable = new TableSourceTable<>(
+                               tableSourceTable.getTableSource(),
+                               !tableSourceTable.isBatch(),
+                               FlinkStatistic.UNKNOWN());
+
+                       CatalogReader catalogReader = (CatalogReader) 
relBuilder.getRelOptSchema();
+                       String refId = 
Integer.toString(System.identityHashCode(tableSourceTable.getTableSource()));
 
 Review comment:
   Can you add an explanation what we are doing here? Btw should we only use 
the refId or should we prefix it for readability `unregistered_456789`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to