dawidwys commented on a change in pull request #9971: [FLINK-14490][table] Add methods for interacting with temporary objects URL: https://github.com/apache/flink/pull/9971#discussion_r339436274
########## File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/TableEnvImpl.scala ########## @@ -73,7 +74,14 @@ abstract class TableEnvImpl( new TableReferenceLookup { override def lookupTable(name: String): Optional[TableReferenceExpression] = { JavaScalaConversionUtil - .toJava(scanInternal(Array(name)).map(t => new TableReferenceExpression(name, t))) + .toJava( + Try({ + val unresolvedIdentifier = UnresolvedIdentifier.of(name) Review comment: This gives positive results when resolving `IN` expression. But will be invoked for all `UnresolvedExpressions`. That's why it might not necessary be a table identifier. The contract of the `ExpressionResolver` is that it actually never throws exception. As a side note. The way `TableIdentifier` is currently implemented is actually wrong. This method is primarily for resolving `SELECT * FROM t WHERE f IN (tableName)`, which is actually incorrect SQL statement. It is not allowed to use identifiers in an `IN` clause. Therefore once we introduce the Java Expression DSL we should get rid of this catalog lookup for a `TableReference`. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services