You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/04 12:50:10 UTC

[GitHub] [arrow] lidavidm commented on a diff in pull request #12777: ARROW-15778: [Java] set native endian to schema

lidavidm commented on code in PR #12777:
URL: https://github.com/apache/arrow/pull/12777#discussion_r841700087


##########
java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java:
##########
@@ -207,6 +209,7 @@ public int getSchema(FlatBufferBuilder builder) {
     int fieldsOffset = org.apache.arrow.flatbuf.Schema.createFieldsVector(builder, fieldOffsets);
     int metadataOffset = FBSerializables.writeKeyValues(builder, metadata);
     org.apache.arrow.flatbuf.Schema.startSchema(builder);
+    org.apache.arrow.flatbuf.Schema.addEndianness(builder, (short) (LITTLE_ENDIAN ? 0 : 1));

Review Comment:
   nit: we could use the generated constants for this? [org.apache.arrow.flatbuf.Endianness](https://arrow.apache.org/docs/java/reference/org/apache/arrow/flatbuf/Endianness.html)



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org