-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-38255: [Format] Add Flight SQL Command for Bulk Ingestion #38256
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
Conversation
|
|
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to review .proto definition in this PR, right?
Then we don't need to generate go/arrow/flight/gen/flight/*.go in this PR. We can do it in a separated PR that implements Go version of this change.
format/FlightSql.proto
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want to use 1000 instead of 7 here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that options can be used for any parameters not otherwise supported by the spec, which makes it different from any one parameter. By giving this a high number, it leaves room for more explicit parameters to be added to the spec at lower numbers as the spec evolves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Could you add a comment how to add a new explicit parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've just added a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this rationale. What would it change to add new parameters at higher numbers, rather than at lower numbers?
format/FlightSql.proto
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target_ prefix may be redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was loosely following the existing conventions in StatementOptions which uses the target_ prefix. I agree though that it doesn't actually improve clarity here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the target_ prefix as it doesn't add much information in this context.
Thanks for your review @kou. I would be happy to split this up into multiple PRs if that would be an acceptable path. I am new to the repo and saw other similar PRs including 2 implementations and integration tests along with the |
|
We can use either approaches ((1) one PR that includes As you said, the latter will be smooth to review. The former may be easy to implement because the PR author can work on only one branch. (We may find a |
9369655 to
d962c22
Compare
Thanks for clarifying. I've elected to go with this approach in which the format and implementation changes are in separate PRs. Just so I understand the next steps in the process, is the procedure to review and merge the 3 PRs one-by-one or will they all need to be open and reviewed at the same time? |
The latter. See also: https://arrow.apache.org/docs/format/Changing.html |
|
Superseded by #38385. I've decided to consolidate all implementations in a single PR. |
Rationale for this change
It was suggested in the discussion around supporting generic ingest for the Flight SQL ADBC driver that an "Ingest" command would be a helpful addition to the Flight SQL specification. This command would enable a Flight SQL client to provide a FlightData stream to the server without needing to know its SQL syntax, and have that stream loaded into a target table by whichever means the server deems appropriate.
What changes are included in this PR?
CommandStatementIngestmessage type to Flight SQL proto definitionINGEST_TRANSACTIONS_SUPPORTEDoption forSqlInfoAre these changes tested?
Yes, see implementation PRs:
Are there any user-facing changes?
Yes, a new command is added to the Flight SQL spec.