apache / apache/arrow

[C++][FlightRPC] Memory alignment related warning

Open
#37,195 12 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: FlightRPC Type: usage
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### 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:
``` python
import duckdb
import pyarrow as pa
import pyarrow.flight as flight

# connect to an in-memory database
con = duckdb.connect()

client = pa.flight.connect(('localhost', 8815))

reader = client.do_get(flight.Ticket(b'ints')).to_reader()

results = con.execute("SELECT * FROM reader").arrow()

print(results)
```
The code finishes, tut the following warning:
```
C:/arrow/cpp/src/arrow/acero/source_node.cc:76: An input buffer was poorly aligned. This could lead to crashes or poor performance on some hardware. Please ensure that all Acero sources generate aligned buffers, or change the unaligned buffer handling configuration to silence this 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.