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/01/22 18:39:47 UTC

[GitHub] [incubator-pinot] subourbonite opened a new issue #6478: Time column predicates are invalidating use of star-tree indices

subourbonite opened a new issue #6478:
URL: https://github.com/apache/incubator-pinot/issues/6478


   In some cases, time-column predicates are disqualifying queries from using star-trees, when they would otherwise be used. Specifically, this appears to be the case when using a dynamic timestamp comparison against the now() operator:
   
   `SELECT dimension, SUM(metric) AS totalMetrics FROM myTable WHERE otherDimension='filterValue' AND eventTimestamp >= cast(now() - 172800000 as long) GROUP BY 1 ORDER BY 2 DESC LIMIT 10`
   
   where a query that uses a static value for timestamp comparison will use a star-tree:
   `SELECT dimension, SUM(metric) AS totalMetrics FROM myTable WHERE otherDimension='filterValue' AND eventTimestamp >= 1611161288000 GROUP BY 1 ORDER BY 2 DESC LIMIT 10`
   
   Thanks to @mayankshriv, I'll try to put together a PR to address.


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] SandishKumarHN commented on issue #6478: Time column predicates are invalidating use of star-tree indices

Posted by GitBox <gi...@apache.org>.
SandishKumarHN commented on issue #6478:
URL: https://github.com/apache/incubator-pinot/issues/6478#issuecomment-767896182


   @Jackie-Jiang will work on adding a scalar function for cast() based on your suggestion offline. 


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] Jackie-Jiang commented on issue #6478: Time column predicates are invalidating use of star-tree indices

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #6478:
URL: https://github.com/apache/incubator-pinot/issues/6478#issuecomment-765688325


   The problem is that we don't have a scalar function implementation of `cast()`, thus it won't be resolved at compilation


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] mayankshriv commented on issue #6478: Time column predicates are invalidating use of star-tree indices

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


   I did a simple test to compile the query to BrokerRequest, and do see `cast(now() - 172800000 as long)` as LHS. My test did not actually go through any query execution.


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] subourbonite closed issue #6478: Time column predicates are invalidating use of star-tree indices

Posted by GitBox <gi...@apache.org>.
subourbonite closed issue #6478:
URL: https://github.com/apache/incubator-pinot/issues/6478


   


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-pinot] Jackie-Jiang commented on issue #6478: Time column predicates are invalidating use of star-tree indices

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #6478:
URL: https://github.com/apache/incubator-pinot/issues/6478#issuecomment-765662098


   This is unexpected. `cast(now() - 172800000 as long)` should be replaced with the actual value on the broker side, and these 2 queries should be identical on the server side. @fx19880617 Can you confirm?


----------------------------------------------------------------
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:
users@infra.apache.org



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