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

[Java][FlightSQL] Inconsistent GET_PRIMARY_KEYS_SCHEMA #43

Open
devinrsmith opened this issue Oct 23, 2024 · 1 comment
Open

[Java][FlightSQL] Inconsistent GET_PRIMARY_KEYS_SCHEMA #43

devinrsmith opened this issue Oct 23, 2024 · 1 comment
Labels
Component: Documentation Improvements or additions to documentation

Comments

@devinrsmith
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

The protobuf documentation 1 for the returned schema of FlightSQL CommandGetPrimaryKeys is

 *  catalog_name: utf8,
 *  db_schema_name: utf8,
 *  table_name: utf8 not null,
 *  column_name: utf8 not null,
 *  key_name: utf8,
 *  key_sequence: int32 not null

org.apache.arrow.flight.sql.FlightSqlProducer.Schemas#GET_PRIMARY_KEYS_SCHEMA 2 is defined as

    public static final Schema GET_PRIMARY_KEYS_SCHEMA =
        new Schema(asList(
            Field.nullable("catalog_name", VARCHAR.getType()),
            Field.nullable("db_schema_name", VARCHAR.getType()),
            Field.notNullable("table_name", VARCHAR.getType()),
            Field.notNullable("column_name", VARCHAR.getType()),
            Field.notNullable("key_sequence", INT.getType()),
            Field.nullable("key_name", VARCHAR.getType())));

Note the reordering of key_name and key_sequence.

Should this be considered a bug in the implementation or the documentation? Or, is field order "unimportant" in this context?

Component(s)

Java

Footnotes

  1. https://github.com/apache/arrow/blob/apache-arrow-17.0.0/format/FlightSql.proto#L1280-L1285

  2. https://github.com/apache/arrow/blob/apache-arrow-17.0.0/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlProducer.java#L1164-L1172

@assignUser assignUser transferred this issue from apache/arrow Nov 26, 2024
@assignUser assignUser added the Component: Documentation Improvements or additions to documentation label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants