richardstartin opened a new issue, #8534:
URL: https://github.com/apache/pinot/issues/8534

   This query 
   ```sql
   select count(*) from complexWebsite where hoursSinceEpoch > cast(0.0 as long)
   ```
   
   ```json
   "timeUsedMs": 341,
   "numEntriesScannedInFilter": 7500000
   ```
   
   ```
   BROKER_REDUCE(limit:10) 
   COMBINE_AGGREGATE 
   AGGREGATE(aggregations:count(*))
   TRANSFORM_PASSTHROUGH()
   PROJECT()
   DOC_ID_SET
   
FILTER_EXPRESSION(operator:RANGE,predicate:minus(hoursSinceEpoch,cast('0.0','long'))
 > '0')
   ```
   
   is much slower than 
   ```sql
   select * from complexWebsite where hoursSinceEpoch > 0
   ```
   
   ```json
   "timeUsedMs": 3,
   "numEntriesScannedInFilter": 0
   ```
   
   ```
   BROKER_REDUCE(limit:10) 
   COMBINE_AGGREGATE 
   FAST_FILTERED_COUNT 
   FILTER_MATCH_ENTIRE_SEGMENT(docs:7500000)
   ```
   
   Because cast is not calculated at compile time. This results in the slow 
query not using metadata, because it doesn't know whether the function is 
volatile or constant.


-- 
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-unsubscr...@pinot.apache.org.apache.org

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


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

Reply via email to