Skip to content

[SPARK-38727][SQL][TESTS] Test the error class: FAILED_EXECUTE_UDF#36220

Closed
panbingkun wants to merge 7 commits intoapache:masterfrom
panbingkun:SPARK-38727
Closed

[SPARK-38727][SQL][TESTS] Test the error class: FAILED_EXECUTE_UDF#36220
panbingkun wants to merge 7 commits intoapache:masterfrom
panbingkun:SPARK-38727

Conversation

@panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Apr 16, 2022

What changes were proposed in this pull request?

This pr aims to add one test for the error class FAILED_EXECUTE_UDF to QueryExecutionErrorsSuite.

Why are the changes needed?

The changes improve test coverage, and document expected error messages in tests.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

By running new test:

build/sbt "sql/testOnly *QueryExecutionErrorsSuite*"

@github-actions github-actions bot added the SQL label Apr 16, 2022
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

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

}
}

test("INVALID_FRACTION_OF_SECOND: in the function make_timestamp") {
Copy link
Member

Choose a reason for hiding this comment

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

Why did you remove the test?

@MaxGekk
Copy link
Member

MaxGekk commented Apr 19, 2022

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

@MaxGekk MaxGekk closed this in 134ab48 Apr 19, 2022
val e2 = e1.getCause.asInstanceOf[SparkException]
assert(e2.getErrorClass === "FAILED_EXECUTE_UDF")
assert(e2.getMessage.matches("Failed to execute user defined function " +
"\\(QueryExecutionErrorsSuite\\$\\$Lambda\\$\\d+/\\d+: \\(string, int\\) => string\\)"))
Copy link
Member

Choose a reason for hiding this comment

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

This seems to break Java 17 tests, @panbingkun and @MaxGekk . Please see the following community patch.

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.

4 participants