snuyanzin commented on code in PR #30040:
URL: https://github.com/apache/flink/pull/30040#discussion_r4641337029


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/JsonStringCallGen.scala:
##########
@@ -37,11 +37,17 @@ class JsonStringCallGen(call: RexCall, rexProgram: 
RexProgram) extends CallGener
       returnType: LogicalType): GeneratedExpression = {
 
     val exprs = CodeGenUtils.getExprsFromProgramOrNull(rexProgram)
+    val operand = call.operands.get(0)
+    // JSON_OBJECT, JSON_ARRAY and JSON results are JSON already and are 
passed through as is
+    val isRawJson =
+      isJsonObjectOrArrayOperand(operand, exprs) || 
isJsonFunctionOperand(operand, exprs)

Review Comment:
   this part was a bit refactored



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to