Please sign in to comment.
[SPARK-25454][SQL] add a new config for picking minimum precision for…
… integral literals ## What changes were proposed in this pull request? #20023 proposed to allow precision lose during decimal operations, to reduce the possibilities of overflow. This is a behavior change and is protected by the DECIMAL_OPERATIONS_ALLOW_PREC_LOSS config. However, that PR introduced another behavior change: pick a minimum precision for integral literals, which is not protected by a config. This PR add a new config for it: `spark.sql.literal.pickMinimumPrecision`. This can allow users to work around issue in SPARK-25454, which is caused by a long-standing bug of negative scale. ## How was this patch tested? a new test Closes #22494 from cloud-fan/decimal. Authored-by: Wenchen Fan <firstname.lastname@example.org> Signed-off-by: gatorsmile <email@example.com> (cherry picked from commit d0990e3) Signed-off-by: gatorsmile <firstname.lastname@example.org>
- Loading branch information...
Showing with 24 additions and 4 deletions.