Skip to content
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

[BUG] arithmetic ops tests failing on Spark 3.3.0 #5769

Closed
jlowe opened this issue Jun 7, 2022 · 5 comments
Closed

[BUG] arithmetic ops tests failing on Spark 3.3.0 #5769

jlowe opened this issue Jun 7, 2022 · 5 comments
Assignees
Labels
bug Something isn't working P0 Must have for release

Comments

@jlowe
Copy link
Member

jlowe commented Jun 7, 2022

Many arithmetic ops tests failed in the recent Spark 3.3.0 nightly tests against 22.06:

10:24:14  =========================== short test summary info ============================
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(7,3)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(12,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(18,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(20,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(30,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(36,5)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(38,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(a, cast(0 as {}))-Decimal(38,10)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(7,3)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(12,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(18,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(20,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(30,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(36,5)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(38,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[pmod(cast(-12 as {}), cast(0 as {}))-Decimal(38,10)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(7,3)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(12,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(18,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(20,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(30,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(36,5)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(38,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[a % (cast(0 as {}))-Decimal(38,10)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(7,3)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(12,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(18,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(20,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(30,2)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(36,5)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(38,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_mod_pmod_by_zero[cast(-12 as {}) % cast(0 as {})-Decimal(38,10)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_cast_neg_to_decimal_err
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_floor_scale_zero[Double]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_floor_scale_zero[Decimal(18,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_ceil_scale_zero[Double]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_ceil_scale_zero[Decimal(18,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(7,3)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(12,2)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(18,0)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(20,2)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(30,2)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(36,5)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(38,0)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(38,10)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(7,-3)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(36,-5)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_bround[Decimal(38,-10)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(7,3)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(12,2)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(18,0)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(20,2)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(30,2)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(36,5)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(38,0)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(38,10)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(7,-3)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(36,-5)][INCOMPAT, APPROXIMATE_FLOAT]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_decimal_round[Decimal(38,-10)][INCOMPAT, APPROXIMATE_FLOAT]
@jlowe jlowe added bug Something isn't working ? - Needs Triage Need team to review and classify P0 Must have for release labels Jun 7, 2022
@nartal1
Copy link
Collaborator

nartal1 commented Jun 7, 2022

test_mod_pmod_by_zero - Looks like simple fix of changing error message to "Division by zero"

round/bround tests are the ones which might need more work. Looks like bug fix when DecimalType with negative scale is provided. Spark commit - apache/spark@ee0aecc. I missed this in audit thinking it's only for RoundFloor and RoundCeil (which we currently fall back to CPU for scales other than 0). It affects Round and Bround as well. Not sure how much of the code needs to be shimmed here.

I haven't looked into RC of these test failures yet - test_floor_scale_zero, test_ceil_scale_zero and test_cast_neg_to_decimal_err

@sameerz sameerz added this to the Jun 6 - Jun 17 milestone Jun 7, 2022
@nartal1 nartal1 self-assigned this Jun 7, 2022
@nartal1 nartal1 removed the ? - Needs Triage Need team to review and classify label Jun 7, 2022
@nartal1 nartal1 removed their assignment Jun 8, 2022
@firestarman
Copy link
Collaborator

test_mod_pmod_by_zero should be fixed by #5781 .

@sperlingxx
Copy link
Collaborator

#5786 attempts to fix round problems

@tgravescs
Copy link
Collaborator

tgravescs commented Jun 8, 2022

we think the following tests are still not fixed:

10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_floor_scale_zero[Double]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_floor_scale_zero[Decimal(18,0)]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_ceil_scale_zero[Double]
10:24:14  FAILED ../../src/main/python/arithmetic_ops_test.py::test_ceil_scale_zero[Decimal(18,0)]

checking this

@GaryShen2008
Copy link
Collaborator

Close this issue, since we merged all the PRs and created a following issue #5797.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0 Must have for release
Projects
None yet
Development

No branches or pull requests

8 participants