Repository: spark
Updated Branches:
  refs/heads/branch-2.2 26003de55 -> a4d78e4b3


[DOCS] Fix error: ambiguous reference to overloaded definition

## What changes were proposed in this pull request?

`df.groupBy.count()` should be `df.groupBy().count()` , otherwise there is an 
error :

ambiguous reference to overloaded definition, both method groupBy in class 
Dataset of type (col1: String, cols: String*) and method groupBy in class 
Dataset of type (cols: org.apache.spark.sql.Column*)

## How was this patch tested?

```scala
val df = spark.readStream.schema(...).json(...)
val dfCounts = df.groupBy().count()
```

Author: Ziyue Huang <[email protected]>

Closes #18272 from ZiyueHuang/master.

(cherry picked from commit e6eb02df1540764ef2a4f0edb45c48df8de18c13)
Signed-off-by: Sean Owen <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a4d78e4b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a4d78e4b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a4d78e4b

Branch: refs/heads/branch-2.2
Commit: a4d78e4b34170ab614fc5da130454a1080dcb8cc
Parents: 26003de
Author: Ziyue Huang <[email protected]>
Authored: Mon Jun 12 10:59:33 2017 +0100
Committer: Sean Owen <[email protected]>
Committed: Mon Jun 12 10:59:41 2017 +0100

----------------------------------------------------------------------
 docs/structured-streaming-programming-guide.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/a4d78e4b/docs/structured-streaming-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/structured-streaming-programming-guide.md 
b/docs/structured-streaming-programming-guide.md
index 6a25c99..9b9177d 100644
--- a/docs/structured-streaming-programming-guide.md
+++ b/docs/structured-streaming-programming-guide.md
@@ -1056,7 +1056,7 @@ Some of them are as follows.
 
 In addition, there are some Dataset methods that will not work on streaming 
Datasets. They are actions that will immediately run queries and return 
results, which does not make sense on a streaming Dataset. Rather, those 
functionalities can be done by explicitly starting a streaming query (see the 
next section regarding that).
 
-- `count()` - Cannot return a single count from a streaming Dataset. Instead, 
use `ds.groupBy.count()` which returns a streaming Dataset containing a running 
count. 
+- `count()` - Cannot return a single count from a streaming Dataset. Instead, 
use `ds.groupBy().count()` which returns a streaming Dataset containing a 
running count. 
 
 - `foreach()` - Instead use `ds.writeStream.foreach(...)` (see next section).
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to