mihaibudiu commented on code in PR #4096:
URL: https://github.com/apache/calcite/pull/4096#discussion_r1892949819


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java:
##########
@@ -331,6 +332,35 @@ private Expression getConvertExpression(
       return Expressions.convert_(cast, 
typeFactory.getJavaClass(nullableTarget));
     }
 
+    if (targetType.getSqlTypeName() == SqlTypeName.ROW) {
+      assert sourceType.getSqlTypeName() == SqlTypeName.ROW;
+      List<RelDataTypeField> targetTypes = targetType.getFieldList();
+      List<RelDataTypeField> sourceTypes = sourceType.getFieldList();
+      assert targetTypes.size() == sourceTypes.size();

Review Comment:
   The validator will reject such programs.
   



-- 
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]

Reply via email to