You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/11/05 18:57:16 UTC

[GitHub] [incubator-pinot] jackjlli opened a new issue #6243: Support more than 1 condition in CASE WHEN statement

jackjlli opened a new issue #6243:
URL: https://github.com/apache/incubator-pinot/issues/6243


   With this PR (https://github.com/apache/incubator-pinot/pull/5461), we now can support CASE WHEN statement, while this PR only assumes that there is only 1 condition after CASE WHEN. Queries containing more than 1 condition like below will fail:
   
   ```
   SELECT CASE WHEN 'timestamp' >= 1587073457690 AND 'timestamp' < 1587077057690 THEN 1 ELSE 0 END AS test, SUM(someId) FROM testTable GROUP BY columnA
   ```
   
   We should fix this to accept stricter conditions.


----------------------------------------------------------------
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.

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] [incubator-pinot] fx19880617 commented on issue #6243: Support more than 1 condition in CASE WHEN statement

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #6243:
URL: https://github.com/apache/incubator-pinot/issues/6243#issuecomment-722591145


   This query can be written as:
   
   ```
   SELECT
       CASE
           WHEN 'timestamp' >= 1587077057690 THEN 0
           WHEN 'timestamp' >= 1587073457690 THEN 1
           ELSE 0
       END AS columnA,
       SUM(someId)
   FROM testTable
   GROUP BY columnA
   ```


----------------------------------------------------------------
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.

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] [incubator-pinot] fx19880617 edited a comment on issue #6243: Support more than 1 condition in CASE WHEN statement

Posted by GitBox <gi...@apache.org>.
fx19880617 edited a comment on issue #6243:
URL: https://github.com/apache/incubator-pinot/issues/6243#issuecomment-723412971


   The issue here is that we tries to convert `'timestamp' >= 1587073457690 AND 'timestamp' < 1587077057690` to a transform function, which means that we need to implement `AND`/`OR` in transform functions and return `true`/`false` so that it will match the expression.
   


----------------------------------------------------------------
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.

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] [incubator-pinot] fx19880617 commented on issue #6243: Support more than 1 condition in CASE WHEN statement

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #6243:
URL: https://github.com/apache/incubator-pinot/issues/6243#issuecomment-723412971


   The issue here is that we tries to convert `'timestamp' >= 1587073457690 AND 'timestamp' < 1587077057690` to a transform function, which means that we need to implement `AND`/`OR`/`NOT` in transform functions and return `true`/`false` so that it will match the expression.
   


----------------------------------------------------------------
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.

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] [incubator-pinot] jackjlli closed issue #6243: Support more than 1 condition in CASE WHEN statement

Posted by GitBox <gi...@apache.org>.
jackjlli closed issue #6243:
URL: https://github.com/apache/incubator-pinot/issues/6243


   


----------------------------------------------------------------
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.

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] [incubator-pinot] fx19880617 commented on issue #6243: Support more than 1 condition in CASE WHEN statement

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #6243:
URL: https://github.com/apache/incubator-pinot/issues/6243#issuecomment-723496205


   https://github.com/apache/incubator-pinot/pull/6249/files


----------------------------------------------------------------
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.

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] [incubator-pinot] fx19880617 edited a comment on issue #6243: Support more than 1 condition in CASE WHEN statement

Posted by GitBox <gi...@apache.org>.
fx19880617 edited a comment on issue #6243:
URL: https://github.com/apache/incubator-pinot/issues/6243#issuecomment-723496205


   Create PR: https://github.com/apache/incubator-pinot/pull/6249


----------------------------------------------------------------
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.

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