Skip to content

Conversation

@panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Oct 23, 2022

What changes were proposed in this pull request?

This pr aims to replace TypeCheckFailure by DataTypeMismatch in type checks in the high-order functions expressions, includes:

Why are the changes needed?

Migration onto error classes unifies Spark SQL error messages.

Does this PR introduce any user-facing change?

Yes. The PR changes user-facing error messages.

How was this patch tested?

  • Update existed UT
  • Pass GA.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@MaxGekk
Copy link
Member

MaxGekk commented Oct 25, 2022

@panbingkun Please, fix coding style issue:

[error] /home/runner/work/spark/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala:27:0: org.apache.spark.sql.catalyst.analysis. is in wrong order relative to 

@panbingkun panbingkun changed the title [WIP][SPARK-40751][SQL] Migrate type check failures of high order functions onto error classes [SPARK-40751][SQL] Migrate type check failures of high order functions onto error classes Oct 27, 2022
@panbingkun
Copy link
Contributor Author

@panbingkun Please, fix coding style issue:

[error] /home/runner/work/spark/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala:27:0: org.apache.spark.sql.catalyst.analysis. is in wrong order relative to 

Done.

@MaxGekk
Copy link
Member

MaxGekk commented Oct 27, 2022

+1, LGTM. Merging to master.
Thank you, @panbingkun.

@MaxGekk MaxGekk closed this in 74668e2 Oct 27, 2022
@panbingkun panbingkun deleted the SPARK-40751 branch November 7, 2022 02:01
SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
…s onto error classes

### What changes were proposed in this pull request?
This pr aims to replace TypeCheckFailure by DataTypeMismatch in type checks in the high-order functions expressions, includes:
- 1. ArraySort (2):
https://github.com/apache/spark/blob/1431975723d8df30a25b2333eddcfd0bb6c57677/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala#L403-L407
- 2. ArrayAggregate (1):
https://github.com/apache/spark/blob/1431975723d8df30a25b2333eddcfd0bb6c57677/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala#L807
- 3. MapZipWith (1):
https://github.com/apache/spark/blob/1431975723d8df30a25b2333eddcfd0bb6c57677/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala#L1028

### Why are the changes needed?
Migration onto error classes unifies Spark SQL error messages.

### Does this PR introduce _any_ user-facing change?
Yes. The PR changes user-facing error messages.

### How was this patch tested?
- Update existed UT
- Pass GA.

Closes apache#38359 from panbingkun/SPARK-40751.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants