walterddr commented on issue #10129:
URL: https://github.com/apache/pinot/issues/10129#issuecomment-1397438501
did a bit of research on this topic:
the problem only occurs on `COUNT(*)` or `COUNT(1)`, `COUNT(col)` this is
b/c calcite will optimize out the argument since all columns in pinot are
marked non-nullable.
1. several attempts have been tried on this one but the most promising so
far is to replace `COUNT` with `SUM(1)` thus bypass calcite's optimization.
with this project pushdown are being executed properly.
2. @ankitsultana also reported that the pushdown doesn't apply to semi JOINs
with NOT-IN clause properly
```
SELECT
SUM(1)
FROM
baseballStats_OFFLINE
WHERE
hits > 10 AND
playerID NOT IN (SELECT playerID FROM baseballStats_OFFLINE WHERE hits < 5)
```
^ this seems to be related to the fact that NOT IN produces a in-equality
JOIN condition that cannot be optimized into a proper JOIN and thus cannot
apply proper pushdown rules.
which we will address separately.
--
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]