appletreeisyellow opened a new issue, #35118: URL: https://github.com/apache/arrow/issues/35118
### Describe the bug, including details regarding any error messages, version, and platform. While implement FlightSQL in our project, we found that the FlightSql.proto format reference refers to a type `int` https://github.com/apache/arrow/blob/c03ca8f7c901eba498dc79b184e5a72a5149f236/format/FlightSql.proto#L1370 What `int` means was slightly unclear as the Arrow spec refers to "Int" types with `bitWidth` of 8, 16, 32 or 64 but the rust implementation has Int8, Int16, Int32 and Int64. https://github.com/apache/arrow/blob/c03ca8f7c901eba498dc79b184e5a72a5149f236/format/Schema.fbs#L145-L148 ## Go uses `Int32`: https://github.com/apache/arrow/blob/c03ca8f7c901eba498dc79b184e5a72a5149f236/go/arrow/flight/flightsql/schema_ref/reference_schemas.go#L63 ## C++ uses `Int32`: https://github.com/apache/arrow/blob/c03ca8f7c901eba498dc79b184e5a72a5149f236/cpp/src/arrow/flight/sql/server.cc#L1144 ## Java uses `INT`: https://github.com/apache/arrow/blob/c03ca8f7c901eba498dc79b184e5a72a5149f236/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlProducer.java#L848 which is defined at: https://github.com/apache/arrow/blob/c03ca8f7c901eba498dc79b184e5a72a5149f236/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java#L90 According to [The Java Language Specification](http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html) from [Section 4.2: Primitive Types and Values](https://docs.oracle.com/javase/specs/jls/se20/html/jls-4.html#jls-4.2): > The integral types are `byte`, `short`, `int`, and `long`, whose values are 8-bit, 16-bit, 32-bit and 64-bit signed two's-complement integers, respectively, and `char`, whose values are 16-bit unsigned integers representing UTF-16 code units Therefore, we can conclude that `INT` in arrow Java refers to 32-bit integer. # Proposal I propose that we change the proto spec to be consistent and use `int<bitwidth>` to refer to integer types. So specifically, change `int` to `int32` to match C++/Rust/Go as well as the convention in the rest of Flight.proto Here is the reference to details of our discussion https://github.com/influxdata/influxdb_iox/pull/7546#discussion_r1165830088 ### Component(s) Format -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
