ru-mi10 commented on issue #56738:
URL: https://github.com/apache/spark/issues/56738#issuecomment-5085393033

   I can take this. Looked at the code - the hardcoded scale of 10 is in 
`OracleDialect.getCatalystType`, both for bare NUMBER and the -127 scale case. 
Since we can't actually recover the real scale from JDBC metadata here, I don't 
think we can make it "correct" for every case, but we can make it configurable 
instead of hardcoded.
   Well, was thinking of adding a conf like 
`spark.sql.jdbc.oracle.numberDefaultScale`, default 10 so nothing breaks for 
existing users, but lets people override it if they know their columns need 
more precision. Same pattern as the existing 
l`egacyOracleTimestampMappingEnabled` conf in the same file.


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


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

Reply via email to