-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial support for reading decimal types from JSON and CSV #4825
Initial support for reading decimal types from JSON and CSV #4825
Conversation
Signed-off-by: Andy Grove <andygrove@nvidia.com>
* [spark.rapids.sql.csv.read.float.enabled](configs.md#sql.csv.read.float.enabled) | ||
* [spark.rapids.sql.csv.read.integer.enabled](configs.md#sql.csv.read.integer.enabled) | ||
* [spark.rapids.sql.csv.read.long.enabled](configs.md#sql.csv.read.long.enabled) | ||
* [spark.rapids.sql.csv.read.short.enabled](configs.md#sql.csv.read.short.enabled) | ||
* [spark.rapids.sql.csvTimestamps.enabled](configs.md#sql.csvTimestamps.enabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are not specific to this PR and could be PR'd separately
sql-plugin/src/main/scala/org/apache/spark/sql/catalyst/json/rapids/GpuJsonScan.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/org/apache/spark/sql/catalyst/json/rapids/GpuJsonScan.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
build |
@revans2 Could I get another review on this one? There were changes after your last approval, to reduce the amount of regexp in use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two nits related to performance that I can live without.
Signed-off-by: Andy Grove andygrove@nvidia.com
Closes #4824 and #4615 and #4646
The main change in this PR is adding support for reading decimal values from CSV and JSON by reading them as strings and then casting them to decimal.
There is also a fix for a bug in handling invalid JSON floating-point values such as
.1
and1.
which was discovered during this work.There are also some updates to the compatibility guide related to previous JSON and CSV PRs. I can PR those docs changes separately if that is preferred.