vineethvp opened a new issue, #12865:
URL: https://github.com/apache/pinot/issues/12865
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.
```
SELECT e.sub_site_id,
lookup(
'account_summary',
'account_name',
'sub_site_id',
e.sub_site_id
)
FROM kpi_events as e INNER JOIN device_count_summary as d on
e.customer_id=d.account_id
where upload_ts_millis > ago('PT3000M')
```
`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))`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]