Describe the bug
Calling the function queue_record_batch with an input batch that results from a RecordBatchFileReader.get_batch call, results in a segfault
To Reproduce
parser = argparse.ArgumentParser()
parser.add_argument("schema_path")
parser.add_argument("input_path")
parser.add_argument("output_path")
args = parser.parse_args()
schema = pa.read_schema(args.schema_path)
# Set up a RecordBatch reader and read the RecordBatch.
reader = pa.RecordBatchFileReader(args.input_path)
input_batch = reader.get_batch(0)
output_batch = pa.RecordBatch.from_arrays([pa.array([0] * input_batch.num_rows, pa.uint32())],schema)
print("Got the batches.")
platform = pf.Platform("snap", False) # Create an interface to an auto-detected FPGA Platform.
platform.init() # Initialize the Platform.
print("Initialized platform.")
context = pf.Context(platform) # Create a Context for our data on the Platform.
print("Created context.")
context.queue_record_batch(input_batch) # Queue the RecordBatch to the Context.
print("Queued record output batch.")
context.queue_record_batch(output_batch) # Queue the RecordBatch to the Context.
print("Queued record output batch.")
context.enable() # Enable the Context, (potentially transferring the data to FPGA).
Run this and the code will fail right after printing: Created context.schema_path is the output schema used for the output_path
Expected behavior
To continue, just like the same function call in the C++ runtime.
Describe the bug Calling the function
queue_record_batch
with an input batch that results from aRecordBatchFileReader.get_batch
call, results in a segfaultTo Reproduce
Run this and the code will fail right after printing:
Created context.
schema_path
is the output schema used for the output_pathExpected behavior To continue, just like the same function call in the C++ runtime.