hequn8128 commented on a change in pull request #11717: [FLINK-17093][python][table-planner][table-planner-blink] Fix Python UDF to make it work with inputs from composite field URL: https://github.com/apache/flink/pull/11717#discussion_r407923651
########## File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/logical/PythonCorrelateSplitRule.java ########## @@ -188,12 +203,20 @@ private FlinkLogicalCalc createTopCalc( private ScalarFunctionSplitter createScalarFunctionSplitter( int primitiveLeftFieldCount, - ArrayBuffer<RexCall> extractedRexCalls, - boolean isJavaTableFunction) { + ArrayBuffer<RexNode> extractedRexNodes, + RexNode tableFunctionNode) { return new ScalarFunctionSplitter( primitiveLeftFieldCount, - extractedRexCalls, - isJavaTableFunction ? x -> PythonUtil.isPythonCall(x, null) : PythonUtil::isNonPythonCall + extractedRexNodes, + node -> { + if (PythonUtil.isNonPythonCall(tableFunctionNode)) { + return PythonUtil.isPythonCall(node, null); + } else if (PythonUtil.containsNonPythonCall(node)) { + return PythonUtil.isNonPythonCall(node); + } else { + return node instanceof RexFieldAccess; Review comment: Maybe add some document about split RexFieldAccess from PythonCorrelate for the `PythonCorrelateSplitRule`? ---------------------------------------------------------------- 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