You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "vineethvp (via GitHub)" <gi...@apache.org> on 2024/04/10 09:53:27 UTC

[I] Lookup function using alias is giving error [pinot]

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: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] Lookup function using alias is giving error [pinot]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12865:
URL: https://github.com/apache/pinot/issues/12865#issuecomment-5403185576

   This issue has been closed because it has been inactive for 180 days. If you believe this issue is still relevant, please feel free to reopen it or create a new issue. Thank you!


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] Lookup function using alias is giving error [pinot]

Posted by "vineethvp (via GitHub)" <gi...@apache.org>.
vineethvp commented on issue #12865:
URL: https://github.com/apache/pinot/issues/12865#issuecomment-2100104096

   @Jackie-Jiang @xiangfu0 Any update on this?


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] Lookup function using alias is giving error [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #12865:
URL: https://github.com/apache/pinot/issues/12865#issuecomment-2048152510

   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.


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] Lookup function using alias is giving error [pinot]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #12865: Lookup function using alias is giving error
URL: https://github.com/apache/pinot/issues/12865


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] Lookup function using alias is giving error [pinot]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12865:
URL: https://github.com/apache/pinot/issues/12865#issuecomment-5075854310

   This issue has been automatically marked as stale because it has not had any activity in the last 150 days. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org