Skip to content

Conversation

jovanm-db
Copy link
Contributor

What changes were proposed in this pull request?

This PR updates the suggested fix of INVALID_URL error to use try_parse_url function added in this PR instead of turning off ANSI mode.

Why are the changes needed?

INVALID_URL contains suggested fix for turning off ANSI mode. Now that in Spark 4.0.0 we have moved to ANSI mode on by default, we want to keep suggestions of this kind to the minimum. There exist implementations of try_* functions which provide safe way to get behavior as for ANSI mode off and suggestions of this kind should be sufficient.

In this case, try expressions were missing so new expressions were added to patch up the missing implementations.

Does this PR introduce any user-facing change?

Yes.

How was this patch tested?

There are tests that check error messages.

Was this patch authored or co-authored using generative AI tooling?

No.

# Conflicts:
#	python/pyspark/sql/functions/builtin.py
#	python/pyspark/sql/tests/test_functions.py
@MaxGekk MaxGekk changed the title [SPARK-49638] Remove the ANSI config suggestion in INVALID_URL [SPARK-49638][SQL] Remove the ANSI config suggestion in INVALID_URL Oct 23, 2024
@MaxGekk
Copy link
Member

MaxGekk commented Oct 23, 2024

+1, LGTM. Merging to master.
Thank you, @jovanm-db.

@MaxGekk MaxGekk closed this in 5e9dec7 Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants