fx19880617 commented on issue #5016: Support alias replacement in PinotQuery URL: https://github.com/apache/incubator-pinot/pull/5016#issuecomment-578956886 > How are these queries going to be handled? > > SELECT C1 AS ALIAS_C1, C2 AS ALIAS_C2, ADD(C1, C2) FROM Foo > SELECT C1 AS ALIAS_C1, C2 AS ALIAS_C2, ADD(ALIAS_C1, ALIAS_C2) FROM Foo > > Should the user provide the aliases as arguments to ADD transform function? Or should they be allowed to? > > I think the standard is to provide original column names to functions or any part of the query and the users should not do alias replacement themselves. So the second query should fail compilation. It will be good to add a test case for this. Agreed! We shouldn’t allow Alias used in selection expression. Will add a validation to raise a compilation error for the case 2.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
