You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2021/02/19 01:46:40 UTC
[spark] branch branch-3.1 updated: [MINOR][SQL][DOCS] Fix the
comments in the example at window function
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 510f04e [MINOR][SQL][DOCS] Fix the comments in the example at window function
510f04e is described below
commit 510f04e274203a78438b6078c56d462e3f920fb0
Author: yzjg <78...@qq.com>
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 <78...@qq.com>
Signed-off-by: HyukjinKwon <gu...@apache.org>
(cherry picked from commit 26548edfa2445b009f63bbdbe810cdb6c289c18d)
Signed-off-by: HyukjinKwon <gu...@apache.org>
---
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 3fd45f5..e6b41cd 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
@@ -3340,7 +3340,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"))
* }}}
*
@@ -3396,7 +3396,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"))
* }}}
*
@@ -3441,7 +3441,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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org