Skip to content

Conversation

@PaysonXu
Copy link

@PaysonXu PaysonXu commented May 1, 2024

What changes were proposed in this pull request?

rename err class _LEGACY_ERROR_TEMP_13[44-46]: 44 removed, 45 to DEFAULT_UNSUPPORTED, 46 to ADD_DEFAULT_UNSUPPORTED

Why are the changes needed?

replace legacy err class name with semantically explicits.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Re run the UT class modified in the PR (org.apache.spark.sql.sources.InsertSuite & org.apache.spark.sql.types.StructTypeSuite)

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

No

@PaysonXu
Copy link
Author

PaysonXu commented May 2, 2024

@MaxGekk @cloud-fan would you please review this PR ? Actually, I'm not sure if rename 44 to internal err is appropriate. thx.

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.

@PaysonXu Sorry for the delay in review. Could you resolve conflicts, and rebase the PR on the recent master.

@PaysonXu
Copy link
Author

PaysonXu commented Sep 1, 2024

@PaysonXu Sorry for the delay in review. Could you resolve conflicts, and rebase the PR on the recent master.

@MaxGekk Hi, I've merge the recent master and all checks have passed. Thank you for reviewing again.

Copy link
Member

Choose a reason for hiding this comment

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

cc @dtenedor Is it really an internal error, please, confirm.

Copy link
Member

Choose a reason for hiding this comment

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

@dtenedor kindly ping you. Please, have a look at the PR.

Copy link
Author

Choose a reason for hiding this comment

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

@MaxGekk @dtenedor In the latest modification, i removed 44 and the reasons are as follows, thank you for reviewing:

  1. the only usage of _LEGACY_ERROR_TEMP_1344 is ResolveDefaultColumns#getExistenceDefaultValues when AnalysisException or MatchError matched when call analyze.
  2. AnalysisException thrown from analyze is already formatted(like INVALID_DEFAULT_VALUE.UNRESOLVED_EXPRESSION, INVALID_DEFAULT_VALUE.SUBQUERY_EXPRESSION) but was swallowed by _LEGACY_ERROR_TEMP_1344.
  3. MatchError can be considered a coding bug, so it is separated from AnalysisException as an internal error.

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.

Could you make PR's title shorter, and remove its tail from PR's description. Just name it as Assign names to the legacy conditions _LEGACY_ERROR_TEMP_13[44-46]

@PaysonXu PaysonXu changed the title [SPARK-47263][SQL] Rename the error class _LEGACY_ERROR_TEMP_13[44-46… [SPARK-47263][SQL] Assign names to the legacy conditions _LEGACY_ERROR_TEMP_13[44-46] Sep 1, 2024
@MaxGekk
Copy link
Member

MaxGekk commented Sep 1, 2024

@PaysonXu Could you remove the text before What changes were proposed in this pull request? in PR's description.

@PaysonXu PaysonXu force-pushed the SPARK-47263 branch 4 times, most recently from a8a33da to 9ab66ae Compare September 14, 2024 03:21
Copy link
Member

Choose a reason for hiding this comment

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

@dtenedor kindly ping you. Please, have a look at the PR.

@MaxGekk
Copy link
Member

MaxGekk commented Sep 18, 2024

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

@MaxGekk MaxGekk closed this in fbf81eb Sep 18, 2024
@MaxGekk
Copy link
Member

MaxGekk commented Sep 18, 2024

@PaysonXu Congratulations with your first contribution to Apache Spark!

@PaysonXu
Copy link
Author

@PaysonXu Congratulations with your first contribution to Apache Spark!

Thank you for your patient guidance.

@PaysonXu PaysonXu deleted the SPARK-47263 branch September 18, 2024 23:37
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