caicancai commented on code in PR #3705:
URL: https://github.com/apache/calcite/pull/3705#discussion_r1506173209
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java:
##########
@@ -1398,6 +1471,28 @@ private static SqlNode castTo(SqlNode node, RelDataType
type) {
SqlTypeUtil.convertTypeToSpec(type).withNullable(type.isNullable()));
}
+ /**
+ * Creates a CAST operation that converts the given Array in {@link SqlNode}
to the specified {@link RelDataType}.
+ * This method uses the {@link SqlStdOperatorTable#CAST} operator to create
a new {@link SqlCall}
+ * node representing a CAST operation. The original 'node' is cast to the
desired 'type',
+ * preserving the nullability of the 'type'.
+ *
+ * @param node the {@link SqlNode} which is to be cast
+ * @param type the target {@link RelDataType} to which 'node' should be cast
+ * @return a new {@link SqlNode} representing the CAST operation
+ */
+ private static SqlNode arrayToCast(SqlNode node, RelDataType type) {
Review Comment:
In order to convert the types in the array to the same type as elementType
--
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]