[ 
https://issues.apache.org/jira/browse/SPARK-34379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kousuke Saruta updated SPARK-34379:
-----------------------------------
    Description: 
In the current implementation, JDBC RowID type is mapped to LongType except for 
OracleDialect, but there is no guarantee to be able to convert RowID to long.
java.sql.RowId declares toString and the specification of java.sql.RowId says

_all methods on the RowId interface must be fully implemented if the JDBC 
driver supports the data type_
(https://docs.oracle.com/javase/8/docs/api/java/sql/RowId.html)

So, we should prefer StringType to LongType.

  was:
In the current implementation, JDBC RowID type is mapped to LongType except for 
OracleDialect, but there is no guarantee to be able to convert RowID to long.
The specification of java.sql.RowId says

"all methods on the RowId interface must be fully implemented if the JDBC 
driver supports the data type"
https://docs.oracle.com/javase/8/docs/api/java/sql/RowId.html


java.sql.RowId declares toString so, we should prefer StringType to LongType.


> Map JDBC RowID to StringType rather than LongType
> -------------------------------------------------
>
>                 Key: SPARK-34379
>                 URL: https://issues.apache.org/jira/browse/SPARK-34379
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Kousuke Saruta
>            Assignee: Kousuke Saruta
>            Priority: Minor
>
> In the current implementation, JDBC RowID type is mapped to LongType except 
> for OracleDialect, but there is no guarantee to be able to convert RowID to 
> long.
> java.sql.RowId declares toString and the specification of java.sql.RowId says
> _all methods on the RowId interface must be fully implemented if the JDBC 
> driver supports the data type_
> (https://docs.oracle.com/javase/8/docs/api/java/sql/RowId.html)
> So, we should prefer StringType to LongType.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to