-
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++][FlightRPC] Memory alignment related warning #37195
Comments
I'm not so familiar with FlightRPC. The warning message is introduced in #35565 . And seems that it unalign some arrow-ipc buffer here. |
@kou Thanks for your reply. I'm thinking about an alternative: is there any (C++) API to copy a recordbatch to a new memory-aligned recordbatch? |
@mapleFU Thanks for your reply. I'm thinking about an alternative: I'm wondering is there any (C++) API to copy a recordbatch to a new memory-aligned recordbatch? |
It seems that your Flight RPC server produces non-aligned record batches. |
@kou The server is a python-based flight rpc server. But I guess that should not matter because the client side just reuse the gRPC-allocated memory for the returned record batch. |
Hmm. Does this mean that the official gRPC client library aligns but Apache Arrow C++'s Flight RPC client breaks it? |
@kou the official gRPC does not guarantee memory alignment. |
Then, what do you want to explain? |
Hello folks, I am observing a similar issue when communicating with a Java-based FlightSQL server with a C++ flight SQL client.
From the replies above I understand that the Java side is not required to produce a properly aligned response buffer. However, given that the unaligned cast is a UB, shouldn't the client side make proper alignments before passing the data to the user? |
The problem is even worse when one attempt to 'consume' the record batches produces by a Flight server in the datafusion lib. The rust is stricter and just panics ....
|
Describe the usage question you have. Please include as many useful details as possible.
It seems the RecordBatch returned from doGet in Flight RPC is not memory aligned.
I tested the simple program below:
The code finishes, tut the following warning:
I'm wondering is there any option I can turn on to make the record batch returned by flight rpc aligned?
Thanks.
Component(s)
C++, FlightRPC
The text was updated successfully, but these errors were encountered: