-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-44268][CORE][TEST][FOLLOWUP] Add test to generate sql-error-conditions
doc automatic
#41865
Conversation
docs/sql-error-conditions-incomplete-type-definition-error-class.md
Outdated
Show resolved
Hide resolved
docs/sql-error-conditions-invalid-parameter-value-error-class.md
Outdated
Show resolved
Hide resolved
s"Error class: $errorClass does not contain sub class: $s in error-classes.json") | ||
s | ||
def quoteParameter(content: String): String = { | ||
"(?<!MAP|STRUCT|ARRAY)<(.*?)>".r.replaceAllIn(content, (m: Regex.Match) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaxGekk I updated the rule, fix all problems you metioned. Please check the rule is ok or not. Thanks.
@@ -55,7 +55,7 @@ Thousands separators (, or G) may not appear after the decimal point in the numb | |||
|
|||
## UNEXPECTED_TOKEN | |||
|
|||
Found the unexpected `<token>` in the format string; the structure of the format string must match: `[MI|S]` `[$]` `[0|9|G|,]*` `[.|D]` `[0|9]*` `[$]` `[PR|MI|S]`. | |||
Found the unexpected `<token>` in the format string; the structure of the format string must match: [MI|S] [$] [0|9|G|,]* [.|D] [0|9]* [$] [PR|MI|S]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one a little special, can I add "`" quote in error-classes.json
to make sure [MI|S]
has `[MI|S]`?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
4568225
to
f1b13d4
Compare
3371770
to
fe4204e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merged to master. |
Thanks @HyukjinKwon @MaxGekk @beliefer |
…onditions` doc automatic ### What changes were proposed in this pull request? This is a follow up PR for apache#41813, change test to automatic generate `sql-error-conditions` doc. Like other GOLDEN_FILES test, if the doc not match will report a error during test. ### Why are the changes needed? 1. make sure the `error-classes.json` sync with doc 2. and developer sync doc easier. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? add new test. Closes apache#41865 from Hisoka-X/SPARK-44268_error_json_follow_up. Authored-by: Jia Fan <fanjiaeminem@qq.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
What changes were proposed in this pull request?
This is a follow up PR for #41813, change test to automatic generate
sql-error-conditions
doc. Like other GOLDEN_FILES test, if the doc not match will report a error during test.Why are the changes needed?
error-classes.json
sync with docDoes this PR introduce any user-facing change?
No
How was this patch tested?
add new test.