You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "egalpin (via GitHub)" <gi...@apache.org> on 2023/07/19 23:07:18 UTC
[GitHub] [pinot] egalpin opened a new issue, #11139: CAST + alias + IS_NULL/IS_NOT_NULL filter expression does not mix
egalpin opened a new issue, #11139:
URL: https://github.com/apache/pinot/issues/11139
```sql
SELECT CAST(myCol AS LONG) AS myCol WHERE myCol IS NOT NULL
```
The above will fail with
```
Caused by: java.lang.UnsupportedOperationException: Unsupported predicate type: IS_NULL
at org.apache.pinot.core.operator.filter.predicate.PredicateEvaluatorProvider.getPredicateEvaluator(PredicateEvaluatorProvider.java:89)
```
Is that because there is no `IsNotNullPredicateEvaluatorFactory` akin to the other factories found in `PredicateEvaluatorProvider`. Is having `Is[Not]NullPredicateEvaluatorFactory` a bad idea, or just something that has not yet been implemented?
The above query works just fine in the case where the alias is changed to be distinct from the original column name (or alias removed entirely). This works fine:
```sql
SELECT CAST(myCol AS LONG) AS __myCol WHERE myCol IS NOT NULL
```
--
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-unsubscribe@pinot.apache.org.apache.org
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
Re: [I] CAST + alias + IS_NULL/IS_NOT_NULL filter expression does not mix [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #11139:
URL: https://github.com/apache/pinot/issues/11139#issuecomment-1762183802
Alias should not be applied to filter. Fixed in #11610
--
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-unsubscribe@pinot.apache.org
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] [pinot] Jackie-Jiang commented on issue #11139: CAST + alias + IS_NULL/IS_NOT_NULL filter expression does not mix
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #11139:
URL: https://github.com/apache/pinot/issues/11139#issuecomment-1645222587
Semantic wise, I feel the intention is to access the original `myCol` instead of the alias. Pinot will actually replace the column with `CAST(myCol AS LONG)`.
So there are 2 problems:
1. Column in WHERE clause should not be treated as alias because it is not allowed to access alias in WHERE clause
2. Currently we cannot do NULL filter on transformed column. @shenyu0127 is working on filter NULL support, and should be able to support this
Seems using an existing column name as alias is not best practice because that can cause confusion
--
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-unsubscribe@pinot.apache.org
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
Re: [I] CAST + alias + IS_NULL/IS_NOT_NULL filter expression does not mix [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang closed issue #11139: CAST + alias + IS_NULL/IS_NOT_NULL filter expression does not mix
URL: https://github.com/apache/pinot/issues/11139
--
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-unsubscribe@pinot.apache.org
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