spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject spark git commit: [SPARK-5457][SQL] Add missing DSL for ApproxCountDistinct.
Date Fri, 30 Jan 2015 09:21:39 GMT
Repository: spark
Updated Branches:
  refs/heads/master bc1fc9b60 -> 6f21dce5f


[SPARK-5457][SQL] Add missing DSL for ApproxCountDistinct.

Author: Takuya UESHIN <ueshin@happy-camper.st>

Closes #4250 from ueshin/issues/SPARK-5457 and squashes the following commits:

3c05e59 [Takuya UESHIN] Remove parameter to use default value of ApproxCountDistinct.
faea19d [Takuya UESHIN] Use overload instead of default value for Java support.
d1cca38 [Takuya UESHIN] Merge branch 'master' into issues/SPARK-5457
663d43d [Takuya UESHIN] Add missing DSL for ApproxCountDistinct.


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

Branch: refs/heads/master
Commit: 6f21dce5f4619e1a5d07028e2a74dc36be0849b9
Parents: bc1fc9b
Author: Takuya UESHIN <ueshin@happy-camper.st>
Authored: Fri Jan 30 01:21:35 2015 -0800
Committer: Reynold Xin <rxin@databricks.com>
Committed: Fri Jan 30 01:21:35 2015 -0800

----------------------------------------------------------------------
 sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6f21dce5/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala b/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala
index 75717e7..3499956 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala
@@ -105,6 +105,11 @@ object Dsl {
   def countDistinct(expr: Column, exprs: Column*): Column =
     CountDistinct((expr +: exprs).map(_.expr))
 
+  def approxCountDistinct(e: Column): Column =
+    ApproxCountDistinct(e.expr)
+  def approxCountDistinct(e: Column, rsd: Double): Column =
+    ApproxCountDistinct(e.expr, rsd)
+
   def avg(e: Column): Column = Average(e.expr)
   def first(e: Column): Column = First(e.expr)
   def last(e: Column): Column = Last(e.expr)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message