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-41135][SQL] Rename UNSUPPORTED_EMPTY_LOCATION to INVALID_EMPTY_LOCATION #38650

Closed
wants to merge 13 commits into from

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Nov 14, 2022

What changes were proposed in this pull request?

This PR proposes to rename UNSUPPORTED_EMPTY_LOCATION to INVALID_EMPTY_LOCATION.

Why are the changes needed?

Error class and its message should be clear/brief, and should not ambiguously specific when it illustrates things that possibly supported in the future.

Does this PR introduce any user-facing change?

Error message changes

From

"Unsupported empty location."

To

"The location name cannot be empty string, but `...` was given."

How was this patch tested?

$ build/sbt “sql/testOnly org.apache.spark.sql.SQLQueryTestSuite*”
$ build/sbt "core/testOnly *SparkThrowableSuite"

@itholic
Copy link
Contributor Author

itholic commented Nov 14, 2022

cc @MaxGekk @srielau

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.

Waiting for Ci.

@@ -656,6 +656,11 @@
],
"sqlState" : "42000"
},
"INVALID_EMPTY_LOCATION" : {
"message" : [
"The location name cannot be empty string or null, but `<location>` was given."
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test when the location is NULL. I just worry that parameters substitution might not handle this. Please, check this.

Copy link
Contributor Author

@itholic itholic Nov 22, 2022

Choose a reason for hiding this comment

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

Good catch.
I tried to add a test with NULL, but it complains [PARSE_SYNTAX_ERROR] rather than [INVALID_EMPTY_LOCATION].
Let me exclude the "null" from the error message.

@MaxGekk
Copy link
Member

MaxGekk commented Nov 22, 2022

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

@MaxGekk MaxGekk closed this in 3bff4f6 Nov 22, 2022
SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
…PTY_LOCATION`

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

This PR proposes to rename `UNSUPPORTED_EMPTY_LOCATION` to `INVALID_EMPTY_LOCATION`.

### Why are the changes needed?

Error class and its message should be clear/brief, and should not ambiguously specific when it illustrates things that possibly supported in the future.

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

Error message changes

From
```
"Unsupported empty location."
```

To
```
"The location name cannot be empty string, but `...` was given."
```

### How was this patch tested?

```
$ build/sbt “sql/testOnly org.apache.spark.sql.SQLQueryTestSuite*”
$ build/sbt "core/testOnly *SparkThrowableSuite"
```

Closes apache#38650 from itholic/SPARK-41135.

Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 15, 2022
…PTY_LOCATION`

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

This PR proposes to rename `UNSUPPORTED_EMPTY_LOCATION` to `INVALID_EMPTY_LOCATION`.

### Why are the changes needed?

Error class and its message should be clear/brief, and should not ambiguously specific when it illustrates things that possibly supported in the future.

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

Error message changes

From
```
"Unsupported empty location."
```

To
```
"The location name cannot be empty string, but `...` was given."
```

### How was this patch tested?

```
$ build/sbt “sql/testOnly org.apache.spark.sql.SQLQueryTestSuite*”
$ build/sbt "core/testOnly *SparkThrowableSuite"
```

Closes apache#38650 from itholic/SPARK-41135.

Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 18, 2022
…PTY_LOCATION`

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

This PR proposes to rename `UNSUPPORTED_EMPTY_LOCATION` to `INVALID_EMPTY_LOCATION`.

### Why are the changes needed?

Error class and its message should be clear/brief, and should not ambiguously specific when it illustrates things that possibly supported in the future.

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

Error message changes

From
```
"Unsupported empty location."
```

To
```
"The location name cannot be empty string, but `...` was given."
```

### How was this patch tested?

```
$ build/sbt “sql/testOnly org.apache.spark.sql.SQLQueryTestSuite*”
$ build/sbt "core/testOnly *SparkThrowableSuite"
```

Closes apache#38650 from itholic/SPARK-41135.

Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
@itholic itholic deleted the SPARK-41135 branch April 22, 2023 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants