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: [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]