geyanggang opened a new issue, #14661:
URL: https://github.com/apache/gravitino/issues/14661

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   `SparkJdbcTypeConverter.toSparkType` has no branch for `Types.FixedType`, so 
a table with a fixed-length binary column (for example a JDBC `binary(n)`) 
cannot be described or read through the Spark connector. The conversion falls 
through to `super.toSparkType`, which throws for `Fixed`.
   
   ### Error message and/or stacktrace
   
   `java.lang.UnsupportedOperationException: Not support fixed(n)` from 
`SparkTypeConverter.toSparkType`.
   
   ### How to reproduce
   
   Using the main branch, register a JDBC table that has a `binary(n)` column 
and describe or read it through the Spark connector.
   
   ### Additional context
   
   Spark has no fixed-length binary type, so `BinaryType` is the natural 
mapping, the same type Spark reads a JDBC `BINARY` column as. The mapping is 
one-way: the fixed length is not representable in Spark.
   


-- 
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]

Reply via email to