twalthr commented on a change in pull request #17691:
URL: https://github.com/apache/flink/pull/17691#discussion_r748314749
##########
File path:
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/sql/SqlJsonObjectFunction.java
##########
@@ -42,19 +40,21 @@
import java.util.Locale;
import static org.apache.calcite.util.Static.RESOURCE;
+import static
org.apache.flink.table.planner.plan.type.FlinkReturnTypes.VARCHAR_NOT_NULL;
/**
* This class has been copied from Calcite to backport the fix made during
CALCITE-4394.
*
- * <p>TODO Remove this class with Calcite 1.27 and replace it with {@link
- * SqlStdOperatorTable#JSON_OBJECT}.
+ * <p>TODO Remove this class with Calcite 1.27 and create a wrapper class for
the {@link
+ * SqlJsonObjectFunction} but using the {@code VARCHAR_NOT_NULL} return type
inference like {@link
+ * SqlJsonArrayFunctionWrapper}.
*/
public class SqlJsonObjectFunction extends SqlFunction {
public SqlJsonObjectFunction() {
super(
"JSON_OBJECT",
SqlKind.OTHER_FUNCTION,
- ReturnTypes.VARCHAR_2000,
+ VARCHAR_NOT_NULL,
Review comment:
introduce a wrapper for this class already. we should not start patching
classes copied from Calcite. It will make upgrading Calcite more painful
otherwise.
--
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]