This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 26548ed [MINOR][SQL][DOCS] Fix the comments in the example at window
function
26548ed is described below
commit 26548edfa2445b009f63bbdbe810cdb6c289c18d
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
### What changes were proposed in this pull request?
`functions.scala` window function has an comment error in the field name.
The column should be `time` per `timestamp:TimestampType`.
### Why are the changes needed?
To deliver the correct documentation and examples.
### Does this PR introduce _any_ user-facing change?
Yes, it fixes the user-facing docs.
### How was this patch tested?
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]>
---
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 0f81693..2e1f0e5 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
@@ -3487,7 +3487,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"))
* }}}
*
@@ -3543,7 +3543,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"))
* }}}
*
@@ -3588,7 +3588,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]