Skip to content

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

@xx789633

Description

@xx789633

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:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions