Skip to content

[SPARK-56179][PYTHON] Consolidate error classes for type mismatch - part 3#55002

Closed
zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng:consolidate_no_class_part3
Closed

[SPARK-56179][PYTHON] Consolidate error classes for type mismatch - part 3#55002
zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng:consolidate_no_class_part3

Conversation

@zhengruifeng
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Consolidate the last 12 NOT_* error classes into NOT_EXPECTED_TYPE:

  • NOT_LIST_OF_COLUMN
  • NOT_LIST_OF_FLOAT_OR_INT
  • NOT_LIST_OF_STR
  • NOT_LIST_OR_NONE_OR_STRUCT
  • NOT_LIST_OR_STR_OR_TUPLE
  • NOT_LIST_OR_TUPLE
  • NOT_OBSERVATION_OR_STR
  • NOT_STR
  • NOT_STRUCT
  • NOT_STR_OR_LIST_OF_RDD
  • NOT_STR_OR_STRUCT
  • NOT_WINDOWSPEC

This is a follow-up to #54978 and #54997.

Why are the changes needed?

There are around 40 error classes for type mismatch, they can be consolidated into a single NOT_EXPECTED_TYPE class.

Does this PR introduce any user-facing change?

No

How was this patch tested?

CI

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

Generated-by: Claude Code (claude-opus-4-6)

@zhengruifeng zhengruifeng force-pushed the consolidate_no_class_part3 branch 2 times, most recently from 7917a7c to 7b9aabc Compare March 25, 2026 13:16
@zhengruifeng zhengruifeng force-pushed the consolidate_no_class_part3 branch from 7b9aabc to 8864327 Compare March 25, 2026 16:30
@zhengruifeng zhengruifeng marked this pull request as draft March 25, 2026 16:56
Copy link
Copy Markdown
Contributor

@allisonwang-db allisonwang-db left a comment

Choose a reason for hiding this comment

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

Great consolidation!

@zhengruifeng zhengruifeng marked this pull request as ready for review March 26, 2026 05:49
@zhengruifeng
Copy link
Copy Markdown
Contributor Author

thanks, merged to master

@zhengruifeng zhengruifeng deleted the consolidate_no_class_part3 branch March 26, 2026 05:50
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.

2 participants