-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++][Java][IPC] Java reader cannot read compressed file created by C++ writer #34432
Comments
@lidavidm Do you have any idea? |
It seems related to #33688 |
Java-zstd seems like a bug. C++ shouldn't let you specify snappy or gzip - that's also a bug. |
I can workaround it by not using compression for now. The fix on the C++ side should be trivial. Will someone fix the Java-zstd bug? |
Do we have a plan to fix this in the next release v12.0.0? |
I don't have time in the near feature unfortunately. A PR would be welcome. (I was hoping David or Larry could help but it seems they're busy.) |
I tried to debug a little bit and found that the offset buffer of VarCharVector has some strange values when decompressed. In the meantime, I happened to see #15194 which deals with the problem in the inverse direction. Not sure if it can solve this issue. |
Finally I have figured out that the default constructor of public ArrowFileReader(
SeekableReadChannel in, BufferAllocator allocator, CompressionCodec.Factory compressionFactory) {
super(allocator, compressionFactory);
this.in = in;
}
public ArrowFileReader(
SeekableByteChannel in, BufferAllocator allocator, CompressionCodec.Factory compressionFactory) {
this(new SeekableReadChannel(in), allocator, compressionFactory);
}
public ArrowFileReader(SeekableReadChannel in, BufferAllocator allocator) {
this(in, allocator, NoCompressionCodec.Factory.INSTANCE);
}
public ArrowFileReader(SeekableByteChannel in, BufferAllocator allocator) {
this(new SeekableReadChannel(in), allocator);
} |
Please feel free to close this issue if there is no further action. @lidavidm |
My apologies for jumping in late. Close related to #33384 In addition, there is a PR for cookbooks, so I'll get to work on the remaining tasks so we can have a recipe for this use case. |
…#34580) ### Rationale for this change `NoCompressionCodec` does not complain about an unsupported codec type. `ArrowFileReader` uses `NoCompressionCodec` by default and fails to decompress a compressed arrow file. ### What changes are included in this PR? `NoCompressionCodec` throws if unsupported codec type has been requested. ### Are these changes tested? Make sure all tests pass. ### Are there any user-facing changes? No. * Closes: #34432 Authored-by: Gang Wu <ustcwg@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
I filed #34592 to track the C++ side of this |
…c type (apache#34580) ### Rationale for this change `NoCompressionCodec` does not complain about an unsupported codec type. `ArrowFileReader` uses `NoCompressionCodec` by default and fails to decompress a compressed arrow file. ### What changes are included in this PR? `NoCompressionCodec` throws if unsupported codec type has been requested. ### Are these changes tested? Make sure all tests pass. ### Are there any user-facing changes? No. * Closes: apache#34432 Authored-by: Gang Wu <ustcwg@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
Describe the bug, including details regarding any error messages, version, and platform.
To reproduce the issue, use the C++ code below to write and read arrow IPC file. I use the 11.0.0 version. Make sure
arrow_testing
is linked to enableArrayFromJSON
utility.On the Java side, use the code below:
The issues vary with different
codec_type
.Component(s)
C++, Java
The text was updated successfully, but these errors were encountered: