walterddr opened a new issue, #12245:
URL: https://github.com/apache/pinot/issues/12245
chaining 2 functions with literal resolution didn't happen in v2 engine:
```
SELECT * FROM tbl WHERE val > ToEpochDays(fromDateTime('1970-01-15',
'yyyy-MM-dd'))
Execution Plan
LogicalAggregate(group=[{}], agg#0=[COUNT($0)])
PinotLogicalExchange(distribution=[hash])
LogicalAggregate(group=[{}], agg#0=[COUNT()])
LogicalFilter(condition=[<($9, ToEpochDays(1209600000:BIGINT))]) <--
problem
```
it apparently only evaluates single layer of rex literal
- for example here `1970-01-15 00:00:00`
```
SELECT * FROM tbl WHERE CAST(val AS TIMESTAMP) > fromDateTime('1970-01-15',
'yyyy-MM-dd')
Execution Plan
LogicalAggregate(group=[{}], agg#0=[COUNT($0)])
PinotLogicalExchange(distribution=[hash])
LogicalAggregate(group=[{}], agg#0=[COUNT()])
LogicalFilter(condition=[<(CAST($9):TIMESTAMP(0) NOT NULL, 1970-01-15
00:00:00)])
```
- and here: `14:BIGINT`
```
SELECT * FROM tbl WHERE val > ToEpochDays(1209600000)
Execution Plan
LogicalAggregate(group=[{}], agg#0=[COUNT($0)])
PinotLogicalExchange(distribution=[hash])
LogicalAggregate(group=[{}], agg#0=[COUNT()])
LogicalFilter(condition=[<($9, 14:BIGINT)])
```
CC @xiangfu0 who has more context from #11438
--
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]