nssalian commented on code in PR #17726:
URL: https://github.com/apache/iceberg/pull/17726#discussion_r3938111283
##########
core/src/main/java/org/apache/iceberg/variants/Variants.java:
##########
@@ -57,7 +58,7 @@ public static VariantMetadata metadata(Collection<String>
fieldNames) {
for (String name : fieldNames) {
nameBuffers[pos] =
ByteBuffer.wrap(name.getBytes(StandardCharsets.UTF_8));
dataSize += nameBuffers[pos].remaining();
- if (last != null && last.compareTo(name) >= 0) {
+ if (last != null && Comparators.charSequences().compare(last, name) >=
0) {
Review Comment:
Done. Added VariantMetadata.FIELD_NAME_ORDER with a javadoc pointing at
VariantEncoding.md's UTF-8 byte-order rule. Cleaner and I updated the usage.
--
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]