This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-2.4 by this push:
new c9683be [MINOR][SQL][DOCS] Fix the comments in the example at window
function
c9683be is described below
commit c9683bedda7b1fa06dc2ce28db187ec3bd5f9617
Author: yzjg <[email protected]>
AuthorDate: Fri Feb 19 10:45:21 2021 +0900
[MINOR][SQL][DOCS] Fix the comments in the example at window function
`functions.scala` window function has an comment error in the field name.
The column should be `time` per `timestamp:TimestampType`.
To deliver the correct documentation and examples.
Yes, it fixes the user-facing docs.
CI builds in this PR should test the documentation build.
Closes #31582 from yzjg/yzjg-patch-1.
Authored-by: yzjg <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
(cherry picked from commit 26548edfa2445b009f63bbdbe810cdb6c289c18d)
Signed-off-by: HyukjinKwon <[email protected]>
---
sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
index 4270171..9d71bd6 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
@@ -3109,7 +3109,7 @@ object functions {
*
* {{{
* val df = ... // schema => timestamp: TimestampType, stockId:
StringType, price: DoubleType
- * df.groupBy(window($"time", "1 minute", "10 seconds", "5 seconds"),
$"stockId")
+ * df.groupBy(window($"timestamp", "1 minute", "10 seconds", "5 seconds"),
$"stockId")
* .agg(mean("price"))
* }}}
*
@@ -3165,7 +3165,7 @@ object functions {
*
* {{{
* val df = ... // schema => timestamp: TimestampType, stockId:
StringType, price: DoubleType
- * df.groupBy(window($"time", "1 minute", "10 seconds"), $"stockId")
+ * df.groupBy(window($"timestamp", "1 minute", "10 seconds"), $"stockId")
* .agg(mean("price"))
* }}}
*
@@ -3210,7 +3210,7 @@ object functions {
*
* {{{
* val df = ... // schema => timestamp: TimestampType, stockId:
StringType, price: DoubleType
- * df.groupBy(window($"time", "1 minute"), $"stockId")
+ * df.groupBy(window($"timestamp", "1 minute"), $"stockId")
* .agg(mean("price"))
* }}}
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]