paul8263 commented on pull request #16036:
URL: https://github.com/apache/flink/pull/16036#issuecomment-851740041


   This issue could be fixed by changing the "as" expression in 
org/apache/flink/table/api/internal/BaseExpressions.java to as "in" 
org/apache/flink/table/api/Table.java. I have tested those samples and now work 
smoothly. But I still feel confused about those two "as" expressions.
   
   I have also tried using select to test the functionality of the as 
expression in org/apache/flink/table/api/internal/BaseExpressions.java with the 
sample code below:
   `Table table = input.select(call("func", $("c")).as("a", "b"));`
   
   The same example code can work well in select while it fails in map or 
flatmap. However, the as clause still fails to expand the result of that 
ScalarFunction to two independent columns.
   
   So I guess the as expression in org/apache/flink/table/api/Table.java can 
both rename and expand fields while that in 
org/apache/flink/table/api/internal/BaseExpressions is only for naeming fields. 
Am I correct?
   


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


Reply via email to