Skip to content

Commit ee57247

Browse files
committed
#44 Make Split and Predicate Serializable
1 parent 0407fcf commit ee57247

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

pypaimon/py4j/util/java_utils.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,4 @@ def deserialize_java_object(bytes_data):
116116
gateway = get_gateway()
117117
cl = get_gateway().jvm.Thread.currentThread().getContextClassLoader()
118118
util = gateway.jvm.org.apache.paimon.utils.InstantiationUtil
119-
try:
120-
byte_buffer = gateway.jvm.java.nio.ByteBuffer.allocate(len(bytes_data))
121-
for b in bytes_data:
122-
byte_buffer.put(b if b >= 0 else b + 256)
123-
byte_buffer.flip()
124-
java_bytes = byte_buffer.array()
125-
126-
return util.deserializeObject(java_bytes, cl)
127-
except Exception as e:
128-
raise RuntimeError(f"Java deserialization failed: {e}")
119+
return util.deserializeObject(bytes_data, cl)

0 commit comments

Comments
 (0)