Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Oct 26, 2022

What changes were proposed in this pull request?

  1. Remove unused error classes: INCONSISTENT_BEHAVIOR_CROSS_VERSION.FORMAT_DATETIME_BY_NEW_PARSER, NAMESPACE_ALREADY_EXISTS, NAMESPACE_NOT_EMPTY, NAMESPACE_NOT_FOUND.
  2. Rename the error class WRONG_NUM_PARAMS to WRONG_NUM_ARGS.
  3. Use correct error class INDEX_ALREADY_EXISTS in the exception IndexAlreadyExistsException instead of INDEX_NOT_FOUND.
  4. Quote regexp patterns by ''.
  5. Fix indentations in QueryCompilationErrors.scala.

Why are the changes needed?

To address tech debts.

Does this PR introduce any user-facing change?

Yes, it modifies user-facing error messages.

How was this patch tested?

By running the modified test suites:

$ PYSPARK_PYTHON=python3 build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"
$ build/sbt "test:testOnly *SQLQuerySuite"
$ build/sbt "test:testOnly *StringExpressionsSuite"
$ build/sbt "test:testOnly *.RegexpExpressionsSuite"

MaxGekk referenced this pull request Oct 26, 2022
### What changes were proposed in this pull request?
The pr aim to Update the error template of WRONG_NUM_PARAMS.

### Why are the changes needed?
More general.

### Does this PR introduce _any_ user-facing change?
Yes the PR changes user-facing error messages.

### How was this patch tested?
- Existed UT.
- Pass GA.

Closes #38319 from panbingkun/update_WRONG_NUM_PARAMS_template.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
@MaxGekk MaxGekk marked this pull request as ready for review October 27, 2022 07:52
@MaxGekk MaxGekk changed the title [WIP][SPARK-39778][SQL] Improve error messages: step 3 [SPARK-39778][SQL] Improve error messages: step 3 Oct 27, 2022
@MaxGekk MaxGekk changed the title [SPARK-39778][SQL] Improve error messages: step 3 [SPARK-39778][SQL] Improve error classes and messages Oct 27, 2022
@MaxGekk MaxGekk requested a review from cloud-fan October 27, 2022 07:53
@MaxGekk
Copy link
Member Author

MaxGekk commented Oct 27, 2022

cc @srielau @itholic

]
},
"WRONG_NUM_ENDPOINTS" : {
"WRONG_NUM_ARGS" : {
Copy link
Member Author

Choose a reason for hiding this comment

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

@srielau FYI, I addressed your comment dece380#r87901056

@MaxGekk
Copy link
Member Author

MaxGekk commented Oct 28, 2022

Merging to master. Thank you, @itholic @cloud-fan for review.

@MaxGekk MaxGekk closed this in add92d2 Oct 28, 2022
SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
### What changes were proposed in this pull request?
1. Remove unused error classes: INCONSISTENT_BEHAVIOR_CROSS_VERSION.FORMAT_DATETIME_BY_NEW_PARSER, NAMESPACE_ALREADY_EXISTS, NAMESPACE_NOT_EMPTY, NAMESPACE_NOT_FOUND.
2. Rename the error class WRONG_NUM_PARAMS to WRONG_NUM_ARGS.
3. Use correct error class INDEX_ALREADY_EXISTS in the exception `IndexAlreadyExistsException` instead of INDEX_NOT_FOUND.
4. Quote regexp patterns by ''.
5. Fix indentations in [QueryCompilationErrors.scala](https://github.com/apache/spark/pull/38398/files#diff-744ac13f6fe074fddeab09b407404bffa2386f54abc83c501e6e1fe618f6db56).

### Why are the changes needed?
To address tech debts.

### Does this PR introduce _any_ user-facing change?
Yes, it modifies user-facing error messages.

### How was this patch tested?
By running the modified test suites:
```
$ PYSPARK_PYTHON=python3 build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"
$ build/sbt "test:testOnly *SQLQuerySuite"
$ build/sbt "test:testOnly *StringExpressionsSuite"
$ build/sbt "test:testOnly *.RegexpExpressionsSuite"
```

Closes apache#38398 from MaxGekk/remove-unused-error-classes.

Authored-by: Max Gekk <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants