Skip to content

Commit

Permalink
fix arrow register
Browse files Browse the repository at this point in the history
  • Loading branch information
chaokunyang committed Dec 26, 2024
1 parent e4ffe1d commit e49b2ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.arrow.vector.ipc.message.IpcOption;
import org.apache.arrow.vector.ipc.message.MessageSerializer;
import org.apache.fury.Fury;
import org.apache.fury.config.Language;
import org.apache.fury.io.MemoryBufferReadableChannel;
import org.apache.fury.io.MemoryBufferWritableChannel;
import org.apache.fury.io.MockWritableChannel;
Expand Down Expand Up @@ -166,8 +167,10 @@ public MemoryBuffer toBuffer() {
}

public static void registerSerializers(Fury fury) {
fury.register(ArrowTable.class, Types.ARROW_TABLE);
fury.register(VectorSchemaRoot.class, Types.ARROW_RECORD_BATCH);
if (fury.getLanguage() != Language.JAVA) {
fury.register(ArrowTable.class, Types.ARROW_TABLE);
fury.register(VectorSchemaRoot.class, Types.ARROW_RECORD_BATCH);
}
fury.registerSerializer(ArrowTable.class, new ArrowTableSerializer(fury));
fury.registerSerializer(VectorSchemaRoot.class, new VectorSchemaRootSerializer(fury));
}
Expand Down
2 changes: 1 addition & 1 deletion python/pyfury/_util.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ cdef class Buffer:

cpdef inline int32_t read_varint32(self):
cdef uint32_t v = self.read_varuint32()
return (v >> 1) ^ -(v & 1);
return (v >> 1) ^ -(v & 1)

cpdef inline int32_t read_varuint32(self):
cdef:
Expand Down

0 comments on commit e49b2ce

Please sign in to comment.