Jackie-Jiang commented on code in PR #13265:
URL: https://github.com/apache/pinot/pull/13265#discussion_r1623070697
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/DataTypeTransformer.java:
##########
@@ -151,7 +151,20 @@ static Object standardize(String column, @Nullable Object
value, boolean isSingl
}
List<Object> standardizedValues = new ArrayList<>(numValues);
for (Object singleValue : values) {
- Object standardizedValue = standardize(column, singleValue, true);
+ Object standardizedValue;
+
+ // Check if the value itself is multivalued.
+ if (singleValue instanceof Object[] || singleValue instanceof List) {
+ standardizedValue = standardize(column, singleValue, false);
Review Comment:
I don't think this is correct. This can result in nested arrays being
generated, and break the following part.
What you can do is to generate all standardized values for every elements,
and continue when:
- There is no `Object[]`
- There is only one `Object[]`, no other value (all `null`s)
The same logic also applies to collections and map. But before getting into
that, I'd invest why are we getting multiple nested arrays
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]