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_r272045373
########## File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/tableImpl.scala ########## @@ -462,6 +463,23 @@ class TableImpl( wrap(operationTreeBuilder.dropColumns(fields, operationTree)) } + override def map(mapFunction: String): Table = { + map(ExpressionParser.parseExpression(mapFunction)) + } + + override def map(mapFunction: Expression): Table = { + val resolvedMapFunction = callResolver.visit(mapFunction) + getLeadingNonAliasExpr(resolvedMapFunction) match { + case callExpr: CallExpression if callExpr.getFunctionDefinition.getType == + FunctionDefinition.Type.SCALAR_FUNCTION => + + case _ => + throw new ValidationException("Only ScalarFunction can be used in map.") Review comment: `Only ScalarFunction can be used in the map operator` ? ---------------------------------------------------------------- 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