Open vineethvp opened 3 months ago
Seems like we have skipped the column rewrite for lookup
in #7670. @xiangfu0 Do you recall the reason behind it? IMO we should not skip it since the reference to the dimension table has to be literal.
@Jackie-Jiang @xiangfu0 Any update on this?
Trying to run below query with an inner join and lookup in the query.
The column used for lookup is present in both tables. While using the alias for the column inside lookup it is giving error.
ProcessingException(errorCode:150, message:SQLParsingError: java.lang.Exception: Unable to find table for this query at org.apache.pinot.controller.api.resources.PinotQueryResource.getMultiStageQueryResponse(PinotQueryResource.java:214) at org.apache.pinot.controller.api.resources.PinotQueryResource.executeSqlQuery(PinotQueryResource.java:177) at org.apache.pinot.controller.api.resources.PinotQueryResource.handlePostSql(PinotQueryResource.java:125) at jdk.internal.reflect.GeneratedMethodAccessor386.invoke(Unknown Source) ... Caused by: java.lang.RuntimeException: Error composing query plan for: SELECT lookup( 'account_summary', 'account_name', 'sub_site_id', ... Caused by: org.apache.calcite.runtime.CalciteContextException: From line 2, column 3 to line 7, column 3: No match found for function signature lookup(<CHARACTER>, <CHARACTER>, <CHARACTER>, <CHARACTER>) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) ... Caused by: org.apache.calcite.sql.validate.SqlValidatorException: No match found for function signature lookup(<CHARACTER>, <CHARACTER>, <CHARACTER>, <CHARACTER>) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490))