sunjincheng121 commented on a change in pull request #7167: [FLINK-10973] [table] Add support for map to table API URL: https://github.com/apache/flink/pull/7167#discussion_r272046322
########## File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/ProjectionTranslator.scala ########## @@ -136,4 +136,21 @@ object ProjectionTranslator { case e: PlannerExpression => e } } + + + /** + * Extracts the leading non-alias expression. + * + * @param expr the expression to extract + * @return the top non-alias expression + */ + def getLeadingNonAliasExpr(expr: Expression): Expression = { + expr match { + case callExpr: CallExpression if callExpr.getFunctionDefinition.equals( + BuiltInFunctionDefinitions.AS) => + getLeadingNonAliasExpr(callExpr.getChildren.get(0)) + Review comment: It's better to remove the empty line, right? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services