Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented May 18, 2022

What changes were proposed in this pull request?

Wrap values of SQL configs and datasource options in error messages by double quotes. Added the toDSOption() method to QueryErrorsBase to quote DS options.

This is a backport of #36579.

Why are the changes needed?

  1. To highlight SQL config/DS option values and make them more visible for users.
  2. To be able to easily parse values from error text.
  3. To be consistent to other outputs of identifiers, sql statement and etc. where Spark uses quotes or ticks.

Does this PR introduce any user-facing change?

Yes, it changes user-facing error messages.

How was this patch tested?

By running the modified test suites:

$ build/sbt "testOnly *QueryCompilationErrorsSuite"
$ build/sbt "testOnly *QueryExecutionAnsiErrorsSuite"
$ build/sbt "testOnly *QueryExecutionErrorsSuite"

Authored-by: Max Gekk max.gekk@gmail.com
Signed-off-by: Max Gekk max.gekk@gmail.com
(cherry picked from commit 96f4b7d)
Signed-off-by: Max Gekk max.gekk@gmail.com

…ions in error messages

Wrap values of SQL configs and datasource options in error messages by double quotes. Added the `toDSOption()` method to `QueryErrorsBase` to quote DS options.

1. To highlight SQL config/DS option values and make them more visible for users.
2. To be able to easily parse values from error text.
3. To be consistent to other outputs of identifiers, sql statement and etc. where Spark uses quotes or ticks.

Yes, it changes user-facing error messages.

By running the modified test suites:
```
$ build/sbt "testOnly *QueryCompilationErrorsSuite"
$ build/sbt "testOnly *QueryExecutionAnsiErrorsSuite"
$ build/sbt "testOnly *QueryExecutionErrorsSuite"
```

Closes apache#36579 from MaxGekk/move-ise-from-query-errors.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
(cherry picked from commit 96f4b7d)
Signed-off-by: Max Gekk <max.gekk@gmail.com>
@MaxGekk
Copy link
Member Author

MaxGekk commented May 19, 2022

@HyukjinKwon @cloud-fan @gengliangwang Could you approve the backport, please. Also cc @srielau .

@gengliangwang
Copy link
Member

Thanks, merging to 3.3

gengliangwang pushed a commit that referenced this pull request May 19, 2022
…S options in error messages

### What changes were proposed in this pull request?
Wrap values of SQL configs and datasource options in error messages by double quotes. Added the `toDSOption()` method to `QueryErrorsBase` to quote DS options.

This is a backport of #36579.

### Why are the changes needed?
1. To highlight SQL config/DS option values and make them more visible for users.
2. To be able to easily parse values from error text.
3. To be consistent to other outputs of identifiers, sql statement and etc. where Spark uses quotes or ticks.

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

### How was this patch tested?
By running the modified test suites:
```
$ build/sbt "testOnly *QueryCompilationErrorsSuite"
$ build/sbt "testOnly *QueryExecutionAnsiErrorsSuite"
$ build/sbt "testOnly *QueryExecutionErrorsSuite"
```

Authored-by: Max Gekk <max.gekkgmail.com>
Signed-off-by: Max Gekk <max.gekkgmail.com>
(cherry picked from commit 96f4b7d)
Signed-off-by: Max Gekk <max.gekkgmail.com>

Closes #36600 from MaxGekk/move-ise-from-query-errors-3.3-2.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Gengliang Wang <gengliang@apache.org>
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.

2 participants