devinrsmith opened a new issue, #43:
URL: https://github.com/apache/arrow-java/issues/43

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   The protobuf documentation [^1] for the returned schema of FlightSQL 
CommandGetPrimaryKeys is
   
   ```protobuf
    *  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
   
   ```java
       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?
   
   [^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
   
   ### Component(s)
   
   Java


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to