xiedeyantu commented on code in PR #4730:
URL: https://github.com/apache/calcite/pull/4730#discussion_r2672896679
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableCollect.java:
##########
@@ -109,15 +109,21 @@ public static Collect create(RelNode input, RelDataType
rowType) {
RelDataType childRecordType =
result.physType.getRowType().getFieldList().get(0).getType();
if (!SqlTypeUtil.sameNamedType(collectionComponentType,
childRecordType)) {
- // In the internal representation of multisets , every element must be
a record. In case the
- // result above is a scalar type we have to wrap it around a physical
type capable of
- // representing records. For this reason the following conversion is
necessary.
+ // In the internal representation of multisets, every element must be
a record.
+ // In case the result above is a scalar type we have to wrap it around
a
+ // physical type capable of representing records.
+ // For ARRAY type with a single field, we use SCALAR format to avoid
Review Comment:
I've added test cases to implement comparisons of complex nested types
within `any`. However, I'm unsure if the current implementation is a good
approach.
--
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]