Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-43962][SQL] Improve error messages: CANNOT_DECODE_URL, CANNOT_MERGE_INCOMPATIBLE_DATA_TYPE, CANNOT_PARSE_DECIMAL, CANNOT_READ_FILE_FOOTER, CANNOT_RECOGNIZE_HIVE_TYPE. #41455

Closed
wants to merge 2 commits into from

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Jun 5, 2023

What changes were proposed in this pull request?

This PR proposes to improve error messages for CANNOT_DECODE_URL, CANNOT_MERGE_INCOMPATIBLE_DATA_TYPE, CANNOT_PARSE_DECIMAL, CANNOT_READ_FILE_FOOTER, CANNOT_RECOGNIZE_HIVE_TYPE.

NOTE: This PR is an experimental work that utilizes LLM to enhance error messages. The script was created using the openai Python library from OpenAI, and minimal review was conducted by author after executing the script. The five improved error messages were selected by the author.

Why are the changes needed?

For improving errors to make them more actionable and usable.

Does this PR introduce any user-facing change?

No API changes, only error message improvement.

How was this patch tested?

The existing CI should pass.

…MERGE_INCOMPATIBLE_DATA_TYPE, CANNOT_PARSE_DECIMAL, CANNOT_READ_FILE_FOOTER, CANNOT_RECOGNIZE_HIVE_TYPE.
@github-actions github-actions bot added the CORE label Jun 5, 2023
@itholic
Copy link
Contributor Author

itholic commented Jun 5, 2023

cc @MaxGekk @srielau @cloud-fan Please review this when you find some time 🙏

@MaxGekk
Copy link
Member

MaxGekk commented Jun 5, 2023

There should be no dependency from the error messages in tests. @itholic Correct?

@MaxGekk
Copy link
Member

MaxGekk commented Jun 5, 2023

@itholic Could you re-trigger CI, please.

@itholic
Copy link
Contributor Author

itholic commented Jun 5, 2023

Yes, that's correct. The existing tests should not fail since I didn't modify the error message parameters. If they do fail, it means they are not properly testing and we need to fix the tests accordingly, possibly using methods like checkError to ensure they are correctly validated.

@MaxGekk
Copy link
Member

MaxGekk commented Jun 6, 2023

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

@MaxGekk MaxGekk closed this in 61e6227 Jun 6, 2023
czxm pushed a commit to czxm/spark that referenced this pull request Jun 12, 2023
…OT_MERGE_INCOMPATIBLE_DATA_TYPE`, `CANNOT_PARSE_DECIMAL`, `CANNOT_READ_FILE_FOOTER`, `CANNOT_RECOGNIZE_HIVE_TYPE`

### What changes were proposed in this pull request?

This PR proposes to improve error messages for `CANNOT_DECODE_URL`, `CANNOT_MERGE_INCOMPATIBLE_DATA_TYPE`, `CANNOT_PARSE_DECIMAL`, `CANNOT_READ_FILE_FOOTER`, `CANNOT_RECOGNIZE_HIVE_TYPE`.

**NOTE:** This PR is an experimental work that utilizes LLM to enhance error messages. The script was created using the `openai` Python library from OpenAI, and minimal review was conducted by author after executing the script. The five improved error messages were selected by the author.

### Why are the changes needed?

For improving errors to make them more actionable and usable.

### Does this PR introduce _any_ user-facing change?

No API changes, only error message improvement.

### How was this patch tested?

The existing CI should pass.

Closes apache#41455 from itholic/emi_1-5.

Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
@itholic itholic deleted the emi_1-5 branch November 20, 2023 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants