You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/04/13 10:56:59 UTC

[GitHub] [arrow] alamb opened a new issue, #35107: FlightSQL.proto document refers to "uint1" type (which seems Java specific)

alamb opened a new issue, #35107:
URL: https://github.com/apache/arrow/issues/35107

   ### 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 `unit1` (not `uint16` or `uint8`)
   
   https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/format/FlightSql.proto#L1327-L1328
   
   What `uint1` 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 UInt8, UInt16, UInt32 and UInt64. 
   
   https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/format/Schema.fbs#L145-L148
   
   
   ## Go  uses `uint8`:
   
   https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/go/arrow/flight/flightsql/schema_ref/reference_schemas.go#L66
   
   ## C++  uses `uint8`:
   
   https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/cpp/src/arrow/flight/sql/server.cc#L1145
   
   ## Java uses "UINT1"
   https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlProducer.java#L851-L852
   
   Reading the Java Arrow implementation, it appears to use the term UINT1 for 8 bit integers:
   https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/java/vector/src/main/java/org/apache/arrow/vector/ipc/JsonFileReader.java#L368-L381
   
   However, inconsistently, while other parts of the flightsql spec refer to uint32
   https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/format/FlightSql.proto#L34
   
   The Java code uses UINT4 for this  https://github.com/apache/arrow/blob/6432a2382e870633e5060b5e6ea481f28ca0c725/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlProducer.java#L874
   
   
   # Proposal
   I propose that we change the proto spec to be consistent and use `uint<bitwidth>` to refer to integer types. So specifically,  change `uint1` to  `uint8` 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/7532/files#r1165307397
   
   ### 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: issues-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow] alamb closed issue #35107: [Format][FlightSQL] Spec refers to "uint1" type (which seems Java specific) rather than "uint8"

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #35107: [Format][FlightSQL] Spec refers to "uint1" type (which seems Java specific) rather than "uint8"
URL: https://github.com/apache/arrow/issues/35107


-- 
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-unsubscribe@arrow.apache.org

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