Skip to content

Conversation

@alamb
Copy link

@alamb alamb commented Aug 13, 2024

Proposed modifications to apache#6201

command: CommandStatementIngest,
batches: Vec<RecordBatch>,
) -> Result<i64, ArrowError> {
stream: S,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the key change -- to change the API to take a stream of record batches rather than a Vec of batches. This change I think allows the whole API to be streaming

#[derive(Clone)]
pub struct FlightSqlServiceImpl {
transactions: Arc<Mutex<HashMap<String, ()>>>,
ingested_batches: Arc<Mutex<Vec<RecordBatch>>>,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also propose extending the test slightly to ensure that the batches came through unchanged (in addition to the row count being sent back correctly)

@djanderson
Copy link
Owner

@alamb, this is great, I figured there was a way to make the API streaming but wasn't sure of the best way. Thanks!

@djanderson djanderson merged commit 5641350 into djanderson:do-put-statement-ingest Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants