Skip to content

[SPARK-38719][SQL] Test the error class: CANNOT_CAST_DATATYPE#54694

Open
deepujain wants to merge 1 commit into
apache:masterfrom
deepujain:SPARK-38719-cannot-cast-datatype-test
Open

[SPARK-38719][SQL] Test the error class: CANNOT_CAST_DATATYPE#54694
deepujain wants to merge 1 commit into
apache:masterfrom
deepujain:SPARK-38719-cannot-cast-datatype-test

Conversation

@deepujain

@deepujain deepujain commented Mar 9, 2026

Copy link
Copy Markdown

Summary

Adds coverage for the CANNOT_CAST_DATATYPE error class in QueryExecutionErrors. The test exercises the null-type cast helper and verifies the error class, SQLSTATE, and message parameters.

Change

  • QueryExecutionErrorsSuite.scala: Added SPARK-38719: CANNOT_CAST_DATATYPE, covering QueryExecutionErrors.cannotCastFromNullTypeError(IntegerType) and asserting sourceType, targetType, and sqlState 42846.

Tests

Ran ./build/sbt "sql/testOnly org.apache.spark.sql.errors.QueryExecutionErrorsSuite -- -z SPARK-38719" - passed.

Fixes SPARK-38719

JIRA assignee for credit: deepujain

@deepujain deepujain force-pushed the SPARK-38719-cannot-cast-datatype-test branch from cdffecf to 375bf74 Compare March 12, 2026 04:51
@deepujain

Copy link
Copy Markdown
Author

Rebased on master. Ran sql/testOnly org.apache.spark.sql.errors.QueryExecutionErrorsSuite SPARK-38719 locally passed. Ready for CI.

@deepujain deepujain force-pushed the SPARK-38719-cannot-cast-datatype-test branch from 375bf74 to 1728033 Compare May 27, 2026 20:02
@deepujain

Copy link
Copy Markdown
Author

Rebased on current master and fixed the PR description so it now matches SPARK-38719. Ran ./build/sbt "sql/testOnly org.apache.spark.sql.errors.QueryExecutionErrorsSuite -- -z SPARK-38719" - passed. Ready for CI.

@deepujain deepujain force-pushed the SPARK-38719-cannot-cast-datatype-test branch from 1728033 to 9805234 Compare June 26, 2026 15:46
@deepujain

Copy link
Copy Markdown
Author

Rebased this on current master. I reran ./build/sbt "sql/testOnly org.apache.spark.sql.errors.QueryExecutionErrorsSuite -- -z SPARK-38719" locally; it passed. Ready for CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant