Skip to content

[SPARK-47541][SQL][FOLLOWUP] Fix AnsiTypeCoercion to handle ArrayType#46016

Closed
mihailomilosevic2001 wants to merge 4 commits into
apache:masterfrom
mihailomilosevic2001:SPARK-47541
Closed

[SPARK-47541][SQL][FOLLOWUP] Fix AnsiTypeCoercion to handle ArrayType#46016
mihailomilosevic2001 wants to merge 4 commits into
apache:masterfrom
mihailomilosevic2001:SPARK-47541

Conversation

@mihailomilosevic2001
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fixing array_join.

Why are the changes needed?

ANSI tests failing.

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

CollationSuite in both ANSI and non-ansi mode.

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

No.

@github-actions github-actions Bot added the SQL label Apr 11, 2024
@mihailomilosevic2001
Copy link
Copy Markdown
Contributor Author

Fix for #45693

@mihailomilosevic2001
Copy link
Copy Markdown
Contributor Author

@dongjoon-hyun Could you merge this in to fix the broken tests in master.

@dongjoon-hyun dongjoon-hyun changed the title [FOLLOWUP][SPARK-47541] Fix ANSI tests [SPARK-47541][SQL][FOLLOWUP] Fix ANSI tests Apr 11, 2024

case aj @ ArrayJoin(arr, d, nr) if !ArrayType(StringType).acceptsType(arr.dataType) &&
case aj @ ArrayJoin(arr, d, nr)
if !AbstractArrayType(StringTypeAnyCollation).acceptsType(arr.dataType) &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. We need two more spaces for indentation.

Copy link
Copy Markdown
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM (Pending CIs). Thank you, @mihailom-db .

I verified ANSI mode manually too.

$ SPARK_ANSI_SQL_MODE=true build/sbt "sql/testOnly *CollationSuite -- -z complex"
...
[info] All tests passed.
[success] Total time: 134 s (02:14), completed Apr 11, 2024, 3:07:39 PM

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-47541][SQL][FOLLOWUP] Fix ANSI tests [SPARK-47541][SQL][FOLLOWUP] Fix AnsiTypeCoercion to handle ArrayType Apr 12, 2024
@dongjoon-hyun
Copy link
Copy Markdown
Member

Merged to master for Apache Spark 4.0.0.

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