strongduanmu commented on code in PR #4553:
URL: https://github.com/apache/calcite/pull/4553#discussion_r2437929745
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -2204,6 +2208,25 @@ protected void inferUnknownTypes(
}
}
+ private boolean isRowSqlNodeList(final RelDataType inferredType, final
SqlNodeList nodeList) {
+ return inferredType.isStruct() && !nodeList.isEmpty()
+ && SqlKind.ROW == nodeList.get(0).getKind();
Review Comment:
This is because in a ROW Expression, the values on the right must be of
the ROW type (or the ROW reference type in PostgreSQL). These values will
have their type inferred in the isRowSqlNodeList method, so the method returns
directly after processing.
--
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]