twalthr commented on code in PR #28758:
URL: https://github.com/apache/flink/pull/28758#discussion_r3631060099
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/VariantCastUtils.java:
##########
@@ -67,18 +67,35 @@ public static DecimalData toDecimalExact(Number value, int
precision, int scale)
}
/**
- * Casts a {@code VARIANT} to its SQL string value: scalars use their raw
value (a string stays
- * unquoted, unlike {@code JSON_STRING}), objects and arrays use JSON.
+ * Casts a {@code VARIANT} to its SQL string value for a {@code
CHAR(targetLength)} or {@code
+ * VARCHAR(targetLength)} target. Scalars use their raw value (a string
stays unquoted, unlike
+ * {@code JSON_STRING}); objects and arrays use their JSON representation.
Review Comment:
> objects and arrays use their JSON representation
Let's not do this. People can use `JSON_STRING` for this. Let stay
conservative and throw an error. Maybe pointing towards `JSON_STRING`.
--
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]