ruchi-mish90 opened a new pull request, #57795: URL: https://github.com/apache/spark/pull/57795
Bare NUMBER columns in Oracle report via JDBC with precision 0 and scale -127, which Spark previously hardcoded to DecimalType(38, 10). This causes silent precision loss for any value with more than 10 fractional digits, and there's no way for users to override it without modifying Spark itself. Made the fallback scale configurable via spark.sql.jdbc.oracle.numberDefaultScale (default 10 for backward compatibility). Also added an oracle.numberDefaultScale JDBC option so individual read() calls can override it without touching the conf. Added a warning log when the fallback kicks in so users know precision might be lost. Two test cases added to JDBCSuite: one for the conf override, one for JDBC option parsing and validation. All existing tests pass. Rebased against upstream/master. -- 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]
