mihaibudiu commented on code in PR #4096:
URL: https://github.com/apache/calcite/pull/4096#discussion_r1891020337
##########
core/src/main/java/org/apache/calcite/sql/validate/implicit/AbstractTypeCoercion.java:
##########
@@ -629,6 +630,28 @@ private RelDataType getTightestCommonTypeOrThrow(
}
}
+ if (typeName1 == SqlTypeName.ROW) {
+ if (typeName2 != typeName1) {
+ return null;
+ }
+ if (type1.getFieldCount() != type2.getFieldCount()) {
+ return null;
+ }
+ List<RelDataTypeField> leftFields = type1.getFieldList();
+ List<RelDataTypeField> rightFields = type2.getFieldList();
+ List<RelDataTypeField> resultFields = new ArrayList<>();
+ for (int i = 0; i < leftFields.size(); i++) {
Review Comment:
That is done a few lines above
--
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]