xiangfu0 commented on issue #7546:
URL: https://github.com/apache/pinot/issues/7546#issuecomment-956982292


   > I've just tested after compiling Pinot from master, and the issue still 
exists.
   > 
   > ```sql
   > SELECT CAST(calcs.int1 AS FLOAT) AS TEMP_Test__3817907367__0_
   > FROM calcs
   > GROUP BY 1
   > ```
   > 
   > ```json
   > {
   >   "resultTable": {
   >     "dataSchema": {
   >       "columnNames": [
   >         "cast(int1,'FLOAT')"
   >       ],
   >       "columnDataTypes": [
   >         "FLOAT"
   >       ]
   >     }, ...
   > ```
   
   The issue here is that in 
`NonAggregationGroupByToDistinctQueryRewriter.java`, Pinot rewrite this query
   ```SELECT CAST(calcs.int1 AS FLOAT) AS TEMP_Test__3817907367__0_
   FROM calcs
   GROUP BY 1
   ```
   to
   ```SELECT DISTINCT calcs.int1
   FROM calcs
   ```
   And it loses the alias information.
   @Jackie-Jiang 


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

Reply via email to