shoemoney opened a new pull request, #58292: URL: https://github.com/apache/spark/pull/58292
Fixes silent precision loss for Oracle bare NUMBER. Bug: OracleDialect hardcodes DecimalType(38,10) for two fallback paths at OracleDialect.scala:163 and 168. Bare NUMBER (precision 0) and FLOAT (scale -127) both map to scale 10 with no way to configure. This truncates or pads values that need a different scale. Fix: Add SQLConf spark.sql.oracle.numberDefaultScale with default 10. Replace hardcoded 10 in OracleDialect.getCatalystType with conf.oracleNumberDefaultScale. Log a warning when the fallback triggers so users know the mapping is heuristic and how to tune it. Evidence: Verified RED has hardcoded 10, GREEN uses configurable conf. git stash round-trip confirms. Diff is 2 files, 22 insertions, 2 deletions. No formatting or unrelated changes. -- 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]
