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 2021/11/02 19:51:17 UTC

[GitHub] [pinot] Jackie-Jiang commented on pull request #7678: Fixing DISTINCT with AS function

Jackie-Jiang commented on pull request #7678:
URL: https://github.com/apache/pinot/pull/7678#issuecomment-958116954


   I don't think we should introduce `AS` as a transform function. The fix should be purely on the query rewrite.
   
   `select CAST(runs AS string) as ddd from baseballStats GROUP BY 1` should be rewritten to `select DISTINCT(CAST(runs AS string)) as ddd from baseballStats` instead of `select DISTINCT(CAST(runs AS string) as ddd) from baseballStats`. Notice the place of `as ddd`.
   
   In fact, `select DISTINCT(CAST(runs AS string) as ddd) from baseballStats` is not a valid SQL query


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