Skip to content
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

[FlightRPC] Flight SQL: Clarify semantics of GetSchema when binding parameters #37061

Closed
lidavidm opened this issue Aug 8, 2023 · 0 comments · Fixed by #38549
Closed

[FlightRPC] Flight SQL: Clarify semantics of GetSchema when binding parameters #37061

lidavidm opened this issue Aug 8, 2023 · 0 comments · Fixed by #38549

Comments

@lidavidm
Copy link
Member

lidavidm commented Aug 8, 2023

Describe the enhancement requested

Currently it appears there are two redundant ways to get the schema of the result set of a prepared statement: either by reading the dataset_schema from the result of CreatePreparedStatement, or by making a separate GetSchema call. However, the two are not equivalent when bind parameters exist; binding a parameter may change the schema of the result set. We should clarify the purpose of these calls in Flight SQL as a result.

Experimentally, the PostgreSQL JDBC driver handles this: if you look at the MetaData before and after binding parameters, the column types will be updated to reflect your parameters.

Component(s)

FlightRPC

@lidavidm lidavidm self-assigned this Nov 1, 2023
lidavidm added a commit that referenced this issue Dec 7, 2023
### Rationale for this change

Schemas of result sets and bind parameters are ambiguous in a few cases when they interact.

### What changes are included in this PR?

Add documentation clarifying the expected behavior.

### Are these changes tested?
N/A

### Are there any user-facing changes?

No

* Closes: #37061

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
@lidavidm lidavidm added this to the 15.0.0 milestone Dec 7, 2023
mapleFU pushed a commit to mapleFU/arrow that referenced this issue Dec 13, 2023
…apache#38549)

### Rationale for this change

Schemas of result sets and bind parameters are ambiguous in a few cases when they interact.

### What changes are included in this PR?

Add documentation clarifying the expected behavior.

### Are these changes tested?
N/A

### Are there any user-facing changes?

No

* Closes: apache#37061

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…apache#38549)

### Rationale for this change

Schemas of result sets and bind parameters are ambiguous in a few cases when they interact.

### What changes are included in this PR?

Add documentation clarifying the expected behavior.

### Are these changes tested?
N/A

### Are there any user-facing changes?

No

* Closes: apache#37061

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant