-
Notifications
You must be signed in to change notification settings - Fork 234
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
[Spark 4.0] Address test failures in cast_test.py [databricks] #11559
Conversation
Fixes NVIDIA#11009. This commit addresses the test failures in cast_test.py, on Spark 4.0. These generally have to do with changes in behaviour of Spark when ANSI mode is enabled. This commit specifically addresses `test_cast_date_integral_and_fp`, `test_cast_decimal_to`, and `test_cast_decimal_to_decimal`.
Signed-off-by: MithunR <[email protected]>
41ffc5d
to
b7879b6
Compare
Build |
Build |
Build |
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.
LGTM
""" | ||
This tests that STRING->DATE conversion is run on CPU, via a fallback. | ||
The point of this test is to exercise the fallback, and not to examine any errors in casting. | ||
There is no change in behaviour between Apache Spark and the plugin, since they're both |
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.
nitpicking but what if the fallback does not happen in the ANSI-enabled mode?
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.
Once the plugin adds support for string->date casting, we will have to modify this test. At a minimum, there won't be a fallback. I don't foresee a case where we might support ANSI=on and not ANSI=off, but that's hard to predict.
I'd postpone any further futzing with this until the plugin's behaviour changes.
I've merged this change. Thank you for the review, @gerashegalov. |
Fixes #11009 and #11530.
This commit addresses the test failures in cast_test.py, on Spark 4.0.
These generally have to do with changes in behaviour of Spark when
ANSI mode is enabled. In these cases, the tests have been split out into ANSI=on and ANSI=off.
The bugs uncovered from the tests have been spun into their own issues; fixing all of them was beyond the scope of this change.