-
Notifications
You must be signed in to change notification settings - Fork 28k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-38846][SQL] Add explicit data mapping between Teradata Numeric…
… Type and Spark DecimalType ### What changes were proposed in this pull request? - Implemented getCatalystType method in TeradataDialect - Handle Types.NUMERIC explicitly ### Why are the changes needed? Load table from Teradata, if the type of column in Teradata is `Number`, it will be converted to `DecimalType(38,0)` which will lose the fractional part of original data. ### Does this PR introduce _any_ user-facing change? Yes, it will convert Number type to DecimalType(38,18) if the scale is 0, so that keep the fractional part in some way. ### How was this patch tested? UT is added to JDBCSuite.scala. Closes #36499 from Eugene-Mark/teradata-loading. Lead-authored-by: Eugene-Mark <eugene.ma.twenty@gmail.com> Co-authored-by: Eugene <eugene.ma@intel.com> Co-authored-by: Eugene <eugene.ma.twenty@gmail.com> Signed-off-by: Sean Owen <srowen@gmail.com>
- Loading branch information
Showing
4 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters