-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[MINOR][SQL][DOCS] Remove two leading spaces from sql tables #28348
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
|
Test build #121824 has finished for PR 28348 at commit
|
|
I think its better to fix this issue in a final clean-up with other minor issues, e.g., typo. The current open documentation PRs are last ones for the 3.0 release? |
|
I plan to do one more sql ref PR for 3.0: modify sql-ref.html page to add more descriptions and also add links to each subsections. Then final check and clean-up. For the remaining keywords (such as EXPLAIN LOGICAL, PIVOT, etc) we need to document, I want to defer to 3.1. I have a few ML stuff that are half way done and need to go back to take care of those. |
dongjoon-hyun
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.
I'm not against this one, but I thought this was for separating the command and result in md environment. In other language environment in Spark, we use commenting result for that purpose.
BTW, this will be enforced for all SQL documents for consistency eventually, right?
|
@dongjoon-hyun In scala/java/python/R examples, we need to comment out the results because these results are not part of the file. We just want to show the users what results the sql statement will generate. However, in sql examples, because it is a REPL, the sql cmd is evaluated and the result is be shown in the cmd, so it makes sense to show the result. Also, other sql references (e.g. Oracle, Snowflake) show the result after the sql statement without commenting out. We probably want to be consistent with these sql references.
Yes, I am trying to make all the SQL documents consistent :) |
|
Apache Spark is different from SQL-only engines' documents. As you know, Apache Spark has four REPL environments. The code is also runnable in shell environments.
Also, we can keep SQL statements in the SQL source file and execute with |
|
@dongjoon-hyun Thanks for the quick reply. Anyway, is everybody OK with not commenting out the sql result? :) |
|
Ur, I'm not saying that we need
Also, I'm not against this approach as I stated in my first sentence. :)
We can be consistent in this way and that way. It's great that we can be in any way. |
|
Similar discussions happened internally and externally here and there. In short, I first thought we should comment the output and use the direct output from After the discussions, I think it's just better to stick to the references in other DBMSs. This way can be inconsistent across the different language APIs but maybe here is where we should think about the language specific convention to make it friendly to each user group. For example, users dedicated to SQL might likely expect SQL-friendly docs. |
|
We could move all to separate example files and comment the output out too to be consistent. I am good with that approach too. We just need to choose one approach with reasonable logics, and stick to it. |
|
Let us follow the SQL reference by the other mainstream database vendors? @huaxingao Since you are trying to changing all the query example, it would be nice if the queries in our SQL Reference docs can be highlighted using SQL syntax. Could you check how to enable it in Markdown files? |
|
@gatorsmile and it looks like this The only exception I am aware of is the identifier doc I added recently. The backtick totally messed up the format. |
|
If there are no further comments, could one of you please merge this PR for me? Thanks a lot! |
|
Test build #122156 has finished for PR 28348 at commit
|
|
This is for 3.0 right? |
|
@srowen Yes, it's for 3.0. Thanks! |
gatorsmile
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.
LGTM
### What changes were proposed in this pull request? Remove two leading spaces from sql tables. ### Why are the changes needed? Follow the format of other references such as https://docs.snowflake.com/en/sql-reference/constructs/join.html, https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_10002.htm, https://www.postgresql.org/docs/10/sql-select.html. ### Does this PR introduce any user-facing change? before ``` SELECT * FROM test; +-+ ... +-+ ``` after ``` SELECT * FROM test; +-+ ... +-+ ``` ### How was this patch tested? Manually build and check Closes #28348 from huaxingao/sql-format. Authored-by: Huaxin Gao <[email protected]> Signed-off-by: gatorsmile <[email protected]> (cherry picked from commit 75da050) Signed-off-by: gatorsmile <[email protected]>
|
Thanks! Merged to master/3.0 |
|
Thank you all! |


What changes were proposed in this pull request?
Remove two leading spaces from sql tables.
Why are the changes needed?
Follow the format of other references such as https://docs.snowflake.com/en/sql-reference/constructs/join.html, https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_10002.htm, https://www.postgresql.org/docs/10/sql-select.html.
Does this PR introduce any user-facing change?
before
after
How was this patch tested?
Manually build and check