bojana-db commented on code in PR #59927:
URL: https://github.com/apache/spark/pull/59927#discussion_r4444561802


##########
common/variant/src/main/java/org/apache/spark/types/variant/VariantUtil.java:
##########
@@ -605,10 +605,12 @@ public static <T> T handleArray(byte[] value, int pos, 
ArrayHandler<T> handler)
   // Validate whether a variant is well-formed. Returns true if the variant 
binary is structurally
   // well-formed (all bounds and type-info checks pass), false if it is 
malformed.
   //
-  // This is close to, but not strictly equivalent to, "`toJson` does not 
throw": this function
-  // does not enforce the `SIZE_LIMIT` check that the `Variant` constructor 
applies (which throws
-  // `VARIANT_CONSTRUCTOR_SIZE_LIMIT`). The implementation otherwise has the 
same structure as
-  // `toJson` (see `Variant.toJsonImpl`).
+  // This is close to, but not strictly equivalent to, "`toJson` does not 
throw". It is more
+  // lenient in that it does not enforce the `SIZE_LIMIT` check that the 
`Variant` constructor
+  // applies (which throws `VARIANT_CONSTRUCTOR_SIZE_LIMIT`). It is stricter 
in that it requires

Review Comment:
   We never throw size limit error? Do you know what is the reason for this 
lenient behaviour and should we enforce it?



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

Reply via email to