This is an automated email from the ASF dual-hosted git repository.

jmalkin pushed a commit to branch kll_merge
in repository https://gitbox.apache.org/repos/asf/datasketches-spark.git


The following commit(s) were added to refs/heads/kll_merge by this push:
     new b4c2478  Define more merge constructors to fix SQL multi-argument issue
b4c2478 is described below

commit b4c24782dee8fb46bf1e365dd37ce40df09ea216
Author: Jon Malkin <[email protected]>
AuthorDate: Tue Jan 7 21:02:05 2025 -0800

    Define more merge constructors to fix SQL multi-argument issue
---
 .../scala/org/apache/spark/sql/aggregate/KllMerge.scala     | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/main/scala/org/apache/spark/sql/aggregate/KllMerge.scala 
b/src/main/scala/org/apache/spark/sql/aggregate/KllMerge.scala
index 77ef12a..cfcb5c1 100644
--- a/src/main/scala/org/apache/spark/sql/aggregate/KllMerge.scala
+++ b/src/main/scala/org/apache/spark/sql/aggregate/KllMerge.scala
@@ -69,7 +69,18 @@ case class KllDoublesMergeAgg(
   }
 
   // Constructors
-  def this(left: Expression) = this(left, Literal(KllSketch.DEFAULT_K), 0, 0)
+  def this(left: Expression) = {
+    this(left, Literal(KllSketch.DEFAULT_K), 0, 0)
+  }
+
+  def this(child: Expression, k: Expression) = {
+    this(child, k, 0, 0)
+  }
+
+  def this(child: Expression, k: Int) = {
+    this(child, Literal(k), 0, 0)
+  }
+
 
   // Copy constructors
   override def withNewMutableAggBufferOffset(newMutableAggBufferOffset: Int): 
KllDoublesMergeAgg =


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

Reply via email to