-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-31612][SQL][DOCS][FOLLOW-UP] SQL Reference clean up #28428
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
Conversation
| <li><code>*</code> alone matches 0 or more characters and <code>|</code> is used to separate multiple different regular expressions, | ||
| any of which can match. </li> | ||
| <li>The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.</li> | ||
| </ul> |
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.
Change to the same description of regex_pattern as the one used in SHOW TABLE EXTENDED, SHOW TABLES, SHOW VIEWS.
| <li><code>*</code> alone matches 0 or more characters and <code>|</code> is used to separate multiple different regular expressions, | ||
| any of which can match. </li> | ||
| <li>The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.</li> | ||
| </ul> |
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.
Change to the same description of regex_pattern as the one used in SHOW TABLE EXTENDED, SHOW TABLES, SHOW VIEWS.
| -- org.apache.spark.sql.catalyst.analysis.HintErrorLogger: Hint (strategy=merge) | ||
| -- is overridden by another hint and will not take effect. | ||
| SELECT /*+ BROADCAST(t1) */ /*+ MERGE(t1, t2) */ * FROM t1 INNER JOIN t2 ON t1.key = t2.key; | ||
| SELECT /*+ BROADCAST(t1), MERGE(t1, t2) */ * FROM t1 INNER JOIN t2 ON t1.key = t2.key; |
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.
SELECT /*+ BROADCAST(t1) */ /*+ MERGE(t1, t2) */ works too, but want to make the example consistent with the syntax /*+ join_hint [ , ... ] */
|
cc @maropu |
|
Test build #122163 has finished for PR 28428 at commit
|
| {% highlight sql %} | ||
| -- This CREATE TABLE fails with ParseException because of the illegal identifier name a.b | ||
| CREATE TABLE test (a.b int); | ||
| -- output |
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 comment looks fine, but I think we need the same comment in the other error output.
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.
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.
I think adding -- output there looks okay, WDYT?
INSERT INTO t VALUES ('1');
-- output
org.apache.spark.sql.AnalysisException: Cannot write incompatible data to table '`default`.`t`':
- Cannot safely cast 'v': StringType to IntegerType;
Could you check documents in the other DBMS-like systems? As the others suggested, I think its better to follow the other document formats.
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.
I googled, but didn't have much luck. Only found this one at https://docs.snowflake.com/en/sql-reference/functions/validate.html
I personally like to either put -- output or indent 2 spaces for the error message, or both (the way you suggested)
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.
maropu
left a comment
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.
Looks fine
|
btw, how many clean-up PRs are left? |
Two more: |
Do you have time to work on it, @dilipbiswal ? |
|
I will close this PR. I am changing every sql ref file to remove the html syntax. I will make these changes there. |


What changes were proposed in this pull request?
clean up
Why are the changes needed?
Fix errors in sql ref
Does this PR introduce any user-facing change?
No
How was this patch tested?
Manually build and check.