This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new a4b3775 [MINOR][DOCS] Fix missing field in query
a4b3775 is described below
commit a4b37757d444182006369d2e4a0b7faaf1d38917
Author: Alfonso <[email protected]>
AuthorDate: Fri Feb 25 08:38:51 2022 -0600
[MINOR][DOCS] Fix missing field in query
### What changes were proposed in this pull request?
This PR fixes sql query in doc, let the query confrom to the query result
in the following
### Why are the changes needed?
Just a fix to doc
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
use project test
Closes #35624 from redsnow1992/patch-1.
Authored-by: Alfonso <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit daa5f9df4a1c8b3cf5db7142e54b765272c1f24c)
Signed-off-by: Sean Owen <[email protected]>
---
docs/sql-ref-syntax-qry-select-window.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/sql-ref-syntax-qry-select-window.md
b/docs/sql-ref-syntax-qry-select-window.md
index 6e65778..9fbebcf 100644
--- a/docs/sql-ref-syntax-qry-select-window.md
+++ b/docs/sql-ref-syntax-qry-select-window.md
@@ -109,7 +109,7 @@ SELECT * FROM employees;
| Alex| Sales| 30000| 33|
+-----+-----------+------+-----+
-SELECT name, dept, RANK() OVER (PARTITION BY dept ORDER BY salary) AS rank
FROM employees;
+SELECT name, dept, salary, RANK() OVER (PARTITION BY dept ORDER BY salary) AS
rank FROM employees;
+-----+-----------+------+----+
| name| dept|salary|rank|
+-----+-----------+------+----+
@@ -125,7 +125,7 @@ SELECT name, dept, RANK() OVER (PARTITION BY dept ORDER BY
salary) AS rank FROM
| Jeff| Marketing| 35000| 3|
+-----+-----------+------+----+
-SELECT name, dept, DENSE_RANK() OVER (PARTITION BY dept ORDER BY salary ROWS
BETWEEN
+SELECT name, dept, salary, DENSE_RANK() OVER (PARTITION BY dept ORDER BY
salary ROWS BETWEEN
UNBOUNDED PRECEDING AND CURRENT ROW) AS dense_rank FROM employees;
+-----+-----------+------+----------+
| name| dept|salary|dense_rank|
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]