You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/03 20:12:59 UTC

[GitHub] [pinot] mayankshriv opened a new issue #7691: Use available indexes when in `CaseTransformFunction`

mayankshriv opened a new issue #7691:
URL: https://github.com/apache/pinot/issues/7691


   We are seeing various cases where auto generated SQL from visualization tools perform a lot of transforms/filtering using `CASE WHEN` from within aggregation functions. However, if the original predicate in the `where clause` had low selectivity, we end up scanning a lot of data to perform the `CaseTransform` evaluation. It would be good to see if we can utilize available indexes (when possible) for evaluating these as well.


-- 
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


[GitHub] [pinot] mayankshriv commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
mayankshriv commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-960034421


   Sure, but that would mean we re-write the query internally, as many a times users may not directly control the query generated for Pinot.


-- 
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


[GitHub] [pinot] atris commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
atris commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-960051151


   Yes, good point. Let's rewrite all case queries to use the filter plan instead 


-- 
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


[GitHub] [pinot] weixiangsun commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
weixiangsun commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-982199086


   I see. This is used to reduce the data set for aggregation. My use case is:
   select case
   when timeStamp IS NULL then now()
   else timestamp
   end
   from meetupRsvp
   
   https://github.com/apache/pinot/issues/7835 is different that there might be no aggregation in my use case. It will generate one column. it will generate different columns inside the resultset.
   
   


-- 
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


[GitHub] [pinot] atris commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
atris commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-960012736






-- 
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


[GitHub] [pinot] mayankshriv commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
mayankshriv commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-960034421


   Sure, but that would mean we re-write the query internally, as many a times users may not directly control the query generated for Pinot.


-- 
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


[GitHub] [pinot] atris commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
atris commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-960012736


   Let's just promote the use of FILTER clauses instead of Case When, since it will be able to use the relevant index


-- 
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


[GitHub] [pinot] atris commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
atris commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-960012736






-- 
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


[GitHub] [pinot] mayankshriv commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
mayankshriv commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-960034421






-- 
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


[GitHub] [pinot] weixiangsun commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
weixiangsun commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-982131963


   Are we going to run multiple queries corresponding to each condition inside the CaseTransform? @atris 


-- 
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


[GitHub] [pinot] atris commented on issue #7691: Use available indexes when in `CaseTransformFunction`

Posted by GitBox <gi...@apache.org>.
atris commented on issue #7691:
URL: https://github.com/apache/pinot/issues/7691#issuecomment-982145872


   No, a single scan with multiple predicate evaluations along the way. Please see:
   
   https://github.com/apache/pinot/pull/7830


-- 
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