snuyanzin commented on code in PR #26474: URL: https://github.com/apache/flink/pull/26474#discussion_r2053643885
########## flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/ExprCodeGenerator.scala: ########## @@ -489,7 +489,7 @@ class ExprCodeGenerator(ctx: CodeGeneratorContext, nullableInput: Boolean) // We only support JSON function operands as the value param of a JSON_OBJECT or JSON_ARRAY function case (operand: RexNode, i) if isJsonFunctionOperand(operand) && - (isJsonArrayOperand(call) || i == 2 && isJsonObjectOperand(call)) => + (isJsonArrayOperand(call) || isJsonObjectOperand(call) && inValuesParam(i)) => Review Comment: i wonder whether we can extract the whole `if` condition into method something like `isJsonOperand` -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org