Eugene-Mark commented on PR #36499:
URL: https://github.com/apache/spark/pull/36499#issuecomment-1129110003

   @HyukjinKwon The [issue-38846 
](https://issues.apache.org/jira/browse/SPARK-38846) shows that the Number type 
of Teradata will lose its fractional part after loading to Spark. We find that 
JDBC ResultSetMetaData only has `scaleField == 0` no matter what's it like on 
Teradata side. Inspired by how we handle [Oracle ResultSetMetaData 
inconsistency 
issue](https://github.com/apache/spark/blob/191e535b975e5813719d3143797c9fcf86321368/sql/core/src/main/scala/org/apache/spark/sql/jdbc/OracleDialect.scala#L80),
 I explicitly change scale at `TeradataDialect`, to make sure at least a 
default DecimalType with scale 18 is returned, instead of a rounded int. 


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