-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix databrick Shim to support Ansi mode when casting from string to date [databricks] #5494
Fix databrick Shim to support Ansi mode when casting from string to date [databricks] #5494
Conversation
Signed-off-by: Chong Gao <res_life@163.com>
build |
Deadlock with #5484 |
Signed-off-by: sperlingxx <lovedreamf@gmail.com>
build |
I cherry-picked #5484 PR to make the pre-merge pass. |
@@ -83,15 +83,36 @@ def test_cast_string_date_valid_format(): | |||
] | |||
values_string_to_data = invalid_values_string_to_date + valid_values_string_to_date | |||
|
|||
# test Spark Spark versions < 3.2.0, ANSI mode | |||
@pytest.mark.skipif(not is_before_spark_320(), reason="ansi cast(string as date) throws exception only in 3.2.0+") | |||
# Spark 320+ and db312+ support Ansi mode when casting string to date |
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.
nit 312db instead of db312
|
||
# test db312+, ANSI mode, valid values | ||
@pytest.mark.skipif(not is_databricks91_or_later(), reason="Spark versions(< 320) not support Ansi mode when casting string to date") | ||
def test_cast_string_date_valid_ansi_dbs(): |
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.
nit, instead of dbs put databricks since here if just looking at the test name dbs might get confused with like database
build |
build |
Fixes #5482
Fixes #5481
Db312
supports Ansi casting from string to data unlikeSpark312
See this comment: #5482 (comment)
Signed-off-by: Chong Gao res_life@163.com