You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/06/01 01:12:29 UTC

[GitHub] [flink] paul8263 commented on pull request #16036: [FLINK-22689][doc] Table API Documentation Row-Based Operations Examp…

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


   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:
users@infra.apache.org