mojodna edited a comment on issue #24845: [SPARK-28097] Map ByteType to 
SMALLINT when using JDBC with PostgreSQL
URL: https://github.com/apache/spark/pull/24845#issuecomment-503301276
 
 
   @srowen yes, it works on Postgres.
   
   @dongjoon-hyun https://issues.apache.org/jira/browse/SPARK-28100 describes 
the underlying problem (i.e. why I can't provide a custom dialect with an 
alternate mapping).
   
   The actual use-case is writing spatial data from Spark (using [Spark 
JTS](https://www.geomesa.org/documentation/user/spark/spark_jts.html)) to 
Postgres using the JDBC sink (where I _may_ need to map `sqlType == Types.OTHER 
&& typeName == "geometry"` to `BinaryType, but that's entirely separate (and 
can be handled by my own dialect).
   
   `ByteType`s are in my data model as type discriminators, which is how I 
stumbled on this.
   
   Some time later, I realized that I can cast my bytes to shorts before 
handing off to the JDBC sink, so this is more a case of things not working as 
I'd expect them to.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to