You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by viirya <gi...@git.apache.org> on 2018/06/22 06:07:19 UTC

[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

GitHub user viirya opened a pull request:

    https://github.com/apache/spark/pull/21611

    [SPARK-24569][SQL] Aggregator with output type Option should produce consistent schema

    ## What changes were proposed in this pull request?
    
    SQL `Aggregator` with output type `Option[Boolean]` creates column of type `StructType`. It's not in consistency with a Dataset of similar java class.
    
    This changes the way `definedByConstructorParams` checks given type. For `Option[_]`, it goes to check its type argument.
    
    ## How was this patch tested?
    
    Added test.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/viirya/spark-1 SPARK-24569

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21611.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21611
    
----
commit dd4ea61ac1c2beaf8ee897b1533e2088c6f8364a
Author: Liang-Chi Hsieh <vi...@...>
Date:   2018-06-22T03:44:33Z

    Aggregator with output type Option[Boolean] should produce consistent schema.

----


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92670 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92670/testReport)** for PR 21611 at commit [`e67594a`](https://github.com/apache/spark/commit/e67594ab9caa2856bd0ba8cf9398ea9dd1244738).
     * This patch **fails SparkR unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92447/
    Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Based on the comment, this null check is for preventing encoding a Product type to a null top-level row. For `Option[Int]`, it is encoded to an int column in a top-level row.
    
    An example looks like:
    
    ```scala
    val df = Seq(Some(1), Some(2), null, None).toDS()
    df.show()
    ```
    
    ```
    +-----+
    |value|
    +-----+
    |    1|
    |    2|
    | null|
    | null|
    +-----+
    ```


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92661 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92661/testReport)** for PR 21611 at commit [`e67594a`](https://github.com/apache/spark/commit/e67594ab9caa2856bd0ba8cf9398ea9dd1244738).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92455/
    Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92670/
    Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92661/
    Test FAILed.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r198184841
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -148,6 +148,79 @@ object VeryComplexResultAgg extends Aggregator[Row, String, ComplexAggData] {
     }
     
     
    +case class OptionBooleanData(name: String, isGood: Option[Boolean])
    +case class OptionBooleanIntData(name: String, isGood: Option[(Boolean, Int)])
    +
    +case class OptionBooleanAggregator(colName: String)
    +    extends Aggregator[Row, Option[Boolean], Option[Boolean]] {
    +
    +  override def zero: Option[Boolean] = None
    +
    +  override def reduce(buffer: Option[Boolean], row: Row): Option[Boolean] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[Boolean]
    +    } else {
    +      Some(row.getBoolean(index))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(b1: Option[Boolean], b2: Option[Boolean]): Option[Boolean] = {
    +    if ((b1.isDefined && b1.get) || (b2.isDefined && b2.get)) {
    +      Some(true)
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[Boolean]): Option[Boolean] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +  override def outputEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +
    +  def OptionalBoolEncoder: Encoder[Option[Boolean]] = ExpressionEncoder()
    +}
    +
    +case class OptionBooleanIntAggregator(colName: String)
    +    extends Aggregator[Row, Option[(Boolean, Int)], Option[(Boolean, Int)]] {
    +
    +  override def zero: Option[(Boolean, Int)] = None
    +
    +  override def reduce(buffer: Option[(Boolean, Int)], row: Row): Option[(Boolean, Int)] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[(Boolean, Int)]
    +    } else {
    +      val nestedRow = row.getStruct(index)
    +      Some((nestedRow.getBoolean(0), nestedRow.getInt(1)))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(
    +      b1: Option[(Boolean, Int)],
    +      b2: Option[(Boolean, Int)]): Option[(Boolean, Int)] = {
    +    if ((b1.isDefined && b1.get._1) || (b2.isDefined && b2.get._1)) {
    +      val newInt = b1.map(_._2).getOrElse(0) + b2.map(_._2).getOrElse(0)
    +      Some((true, newInt))
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[(Boolean, Int)]): Option[(Boolean, Int)] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +  override def outputEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +
    +  def OptionalBoolIntEncoder: Encoder[Option[(Boolean, Int)]] = ExpressionEncoder(topLevel = false)
    --- End diff --
    
    `ExpressionEncoder` is not a public API, maybe we should create something in `Encoders`. I do see the need of creating an encoder for option of product.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92687 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92687/testReport)** for PR 21611 at commit [`65a16ec`](https://github.com/apache/spark/commit/65a16ec6bcf93763e26605aea7cec8860df158d9).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/528/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    ping @cloud-fan 


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92448 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92448/testReport)** for PR 21611 at commit [`69c0dde`](https://github.com/apache/spark/commit/69c0dde39c13ac0333a098cbc2f40197b392409f).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92661 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92661/testReport)** for PR 21611 at commit [`e67594a`](https://github.com/apache/spark/commit/e67594ab9caa2856bd0ba8cf9398ea9dd1244738).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Build finished. Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/560/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92447 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92447/testReport)** for PR 21611 at commit [`8cebc7d`](https://github.com/apache/spark/commit/8cebc7d4deede2ad37b140973921ba9c8296309b).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    LGTM except 2 minor comments


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r197348976
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -148,6 +148,79 @@ object VeryComplexResultAgg extends Aggregator[Row, String, ComplexAggData] {
     }
     
     
    +case class OptionBooleanData(name: String, isGood: Option[Boolean])
    +case class OptionBooleanIntData(name: String, isGood: Option[(Boolean, Int)])
    +
    +case class OptionBooleanAggregator(colName: String)
    +    extends Aggregator[Row, Option[Boolean], Option[Boolean]] {
    +
    +  override def zero: Option[Boolean] = None
    +
    +  override def reduce(buffer: Option[Boolean], row: Row): Option[Boolean] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[Boolean]
    +    } else {
    +      Some(row.getBoolean(index))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(b1: Option[Boolean], b2: Option[Boolean]): Option[Boolean] = {
    +    if ((b1.isDefined && b1.get) || (b2.isDefined && b2.get)) {
    +      Some(true)
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[Boolean]): Option[Boolean] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +  override def outputEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +
    +  def OptionalBoolEncoder: Encoder[Option[Boolean]] = ExpressionEncoder()
    +}
    +
    +case class OptionBooleanIntAggregator(colName: String)
    +    extends Aggregator[Row, Option[(Boolean, Int)], Option[(Boolean, Int)]] {
    +
    +  override def zero: Option[(Boolean, Int)] = None
    +
    +  override def reduce(buffer: Option[(Boolean, Int)], row: Row): Option[(Boolean, Int)] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[(Boolean, Int)]
    +    } else {
    +      val nestedRow = row.getStruct(index)
    +      Some((nestedRow.getBoolean(0), nestedRow.getInt(1)))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(
    +      b1: Option[(Boolean, Int)],
    +      b2: Option[(Boolean, Int)]): Option[(Boolean, Int)] = {
    +    if ((b1.isDefined && b1.get._1) || (b2.isDefined && b2.get._1)) {
    +      val newInt = b1.map(_._2).getOrElse(0) + b2.map(_._2).getOrElse(0)
    +      Some((true, newInt))
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[(Boolean, Int)]): Option[(Boolean, Int)] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +  override def outputEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +
    +  def OptionalBoolIntEncoder: Encoder[Option[(Boolean, Int)]] = ExpressionEncoder(topLevel = false)
    --- End diff --
    
    We can create Dataset like:
    
    ```scala
    scala> Seq((1, Some(1, 2)), (2, Some(3, 4))).toDS.printSchema
    root
     |-- _1: integer (nullable = false)
     |-- _2: struct (nullable = true)
     |    |-- _1: integer (nullable = false)
     |    |-- _2: integer (nullable = false)
    ```
    
    But now we can't use it as buffer/output encoding here. But the encoder here is not for top-level.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r200586898
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -148,6 +148,42 @@ object VeryComplexResultAgg extends Aggregator[Row, String, ComplexAggData] {
     }
     
     
    +case class OptionBooleanData(name: String, isGood: Option[Boolean])
    +case class OptionBooleanIntData(name: String, isGood: Option[(Boolean, Int)])
    --- End diff --
    
    Oops, forget to remove it.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    retest this please.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/21611


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    I agree with you. So I think this PR should be focused on the first problem. Is it ok for you?


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r200584986
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -148,6 +148,42 @@ object VeryComplexResultAgg extends Aggregator[Row, String, ComplexAggData] {
     }
     
     
    +case class OptionBooleanData(name: String, isGood: Option[Boolean])
    +case class OptionBooleanIntData(name: String, isGood: Option[(Boolean, Int)])
    --- End diff --
    
    this is not needed


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r198664098
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -333,4 +406,28 @@ class DatasetAggregatorSuite extends QueryTest with SharedSQLContext {
           df.groupBy($"i").agg(VeryComplexResultAgg.toColumn),
           Row(1, Row(Row(1, "a"), Row(1, "a"))) :: Row(2, Row(Row(2, "bc"), Row(2, "bc"))) :: Nil)
       }
    +
    +  test("SPARK-24569: Aggregator with output type Option[Boolean] creates column of type Row") {
    +    val df = Seq(
    +      OptionBooleanData("bob", Some(true)),
    +      OptionBooleanData("bob", Some(false)),
    +      OptionBooleanData("bob", None)).toDF()
    +    val group = df
    +      .groupBy("name")
    --- End diff --
    
    A test is added to demonstrate it.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92202/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92464 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92464/testReport)** for PR 21611 at commit [`69c0dde`](https://github.com/apache/spark/commit/69c0dde39c13ac0333a098cbc2f40197b392409f).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92687/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/713/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92447 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92447/testReport)** for PR 21611 at commit [`8cebc7d`](https://github.com/apache/spark/commit/8cebc7d4deede2ad37b140973921ba9c8296309b).
     * This patch **fails Java style tests**.
     * This patch **does not merge cleanly**.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    A test of `join` is added. The change of Option of product encoder is removed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    In `ExpressionEncoder.apply`, we have
    ```
        val flat = !ScalaReflection.definedByConstructorParams(tpe)
    
        val inputObject = BoundReference(0, ScalaReflection.dataTypeFor[T], nullable = !cls.isPrimitive)
        val nullSafeInput = if (flat) {
          inputObject
        } else {
          // For input object of Product type, we can't encode it to row if it's null, as Spark SQL
          // doesn't allow top-level row to be null, only its columns can be null.
          AssertNotNull(inputObject, Seq("top level Product input object"))
        }
    ```
    
    does it mean we will not have the null check for `Option[Int]`?


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r198664388
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -148,6 +148,79 @@ object VeryComplexResultAgg extends Aggregator[Row, String, ComplexAggData] {
     }
     
     
    +case class OptionBooleanData(name: String, isGood: Option[Boolean])
    +case class OptionBooleanIntData(name: String, isGood: Option[(Boolean, Int)])
    +
    +case class OptionBooleanAggregator(colName: String)
    +    extends Aggregator[Row, Option[Boolean], Option[Boolean]] {
    +
    +  override def zero: Option[Boolean] = None
    +
    +  override def reduce(buffer: Option[Boolean], row: Row): Option[Boolean] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[Boolean]
    +    } else {
    +      Some(row.getBoolean(index))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(b1: Option[Boolean], b2: Option[Boolean]): Option[Boolean] = {
    +    if ((b1.isDefined && b1.get) || (b2.isDefined && b2.get)) {
    +      Some(true)
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[Boolean]): Option[Boolean] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +  override def outputEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +
    +  def OptionalBoolEncoder: Encoder[Option[Boolean]] = ExpressionEncoder()
    +}
    +
    +case class OptionBooleanIntAggregator(colName: String)
    +    extends Aggregator[Row, Option[(Boolean, Int)], Option[(Boolean, Int)]] {
    +
    +  override def zero: Option[(Boolean, Int)] = None
    +
    +  override def reduce(buffer: Option[(Boolean, Int)], row: Row): Option[(Boolean, Int)] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[(Boolean, Int)]
    +    } else {
    +      val nestedRow = row.getStruct(index)
    +      Some((nestedRow.getBoolean(0), nestedRow.getInt(1)))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(
    +      b1: Option[(Boolean, Int)],
    +      b2: Option[(Boolean, Int)]): Option[(Boolean, Int)] = {
    +    if ((b1.isDefined && b1.get._1) || (b2.isDefined && b2.get._1)) {
    +      val newInt = b1.map(_._2).getOrElse(0) + b2.map(_._2).getOrElse(0)
    +      Some((true, newInt))
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[(Boolean, Int)]): Option[(Boolean, Int)] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +  override def outputEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +
    +  def OptionalBoolIntEncoder: Encoder[Option[(Boolean, Int)]] = ExpressionEncoder(topLevel = false)
    --- End diff --
    
    If we want to create the encoders in `Encoders`, maybe we should do it in another PR?


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    SGTM


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/732/
    Test PASSed.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r197997909
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -43,12 +43,17 @@ import org.apache.spark.util.Utils
      *    to the name `value`.
      */
     object ExpressionEncoder {
    -  def apply[T : TypeTag](): ExpressionEncoder[T] = {
    +  def apply[T : TypeTag](): ExpressionEncoder[T] = apply(topLevel = true)
    +
    +  /**
    +   * @param topLevel whether the encoders to construct are for top-level row.
    +   */
    +  def apply[T : TypeTag](topLevel: Boolean): ExpressionEncoder[T] = {
    --- End diff --
    
    who will call this method with `topLevel=false`?


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92464/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    retest this please.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92200 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92200/testReport)** for PR 21611 at commit [`dd4ea61`](https://github.com/apache/spark/commit/dd4ea61ac1c2beaf8ee897b1533e2088c6f8364a).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92455 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92455/testReport)** for PR 21611 at commit [`69c0dde`](https://github.com/apache/spark/commit/69c0dde39c13ac0333a098cbc2f40197b392409f).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/402/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92464 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92464/testReport)** for PR 21611 at commit [`69c0dde`](https://github.com/apache/spark/commit/69c0dde39c13ac0333a098cbc2f40197b392409f).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r198342219
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -148,6 +148,79 @@ object VeryComplexResultAgg extends Aggregator[Row, String, ComplexAggData] {
     }
     
     
    +case class OptionBooleanData(name: String, isGood: Option[Boolean])
    +case class OptionBooleanIntData(name: String, isGood: Option[(Boolean, Int)])
    +
    +case class OptionBooleanAggregator(colName: String)
    +    extends Aggregator[Row, Option[Boolean], Option[Boolean]] {
    +
    +  override def zero: Option[Boolean] = None
    +
    +  override def reduce(buffer: Option[Boolean], row: Row): Option[Boolean] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[Boolean]
    +    } else {
    +      Some(row.getBoolean(index))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(b1: Option[Boolean], b2: Option[Boolean]): Option[Boolean] = {
    +    if ((b1.isDefined && b1.get) || (b2.isDefined && b2.get)) {
    +      Some(true)
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[Boolean]): Option[Boolean] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +  override def outputEncoder: Encoder[Option[Boolean]] = OptionalBoolEncoder
    +
    +  def OptionalBoolEncoder: Encoder[Option[Boolean]] = ExpressionEncoder()
    +}
    +
    +case class OptionBooleanIntAggregator(colName: String)
    +    extends Aggregator[Row, Option[(Boolean, Int)], Option[(Boolean, Int)]] {
    +
    +  override def zero: Option[(Boolean, Int)] = None
    +
    +  override def reduce(buffer: Option[(Boolean, Int)], row: Row): Option[(Boolean, Int)] = {
    +    val index = row.fieldIndex(colName)
    +    val value = if (row.isNullAt(index)) {
    +      Option.empty[(Boolean, Int)]
    +    } else {
    +      val nestedRow = row.getStruct(index)
    +      Some((nestedRow.getBoolean(0), nestedRow.getInt(1)))
    +    }
    +    merge(buffer, value)
    +  }
    +
    +  override def merge(
    +      b1: Option[(Boolean, Int)],
    +      b2: Option[(Boolean, Int)]): Option[(Boolean, Int)] = {
    +    if ((b1.isDefined && b1.get._1) || (b2.isDefined && b2.get._1)) {
    +      val newInt = b1.map(_._2).getOrElse(0) + b2.map(_._2).getOrElse(0)
    +      Some((true, newInt))
    +    } else if (b1.isDefined) {
    +      b1
    +    } else {
    +      b2
    +    }
    +  }
    +
    +  override def finish(reduction: Option[(Boolean, Int)]): Option[(Boolean, Int)] = reduction
    +
    +  override def bufferEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +  override def outputEncoder: Encoder[Option[(Boolean, Int)]] = OptionalBoolIntEncoder
    +
    +  def OptionalBoolIntEncoder: Encoder[Option[(Boolean, Int)]] = ExpressionEncoder(topLevel = false)
    --- End diff --
    
    Top-level encoder for option of product is forbidden now. If you want to manually create an encoder like this case, you need an API like this to allow the creation.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r198185052
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -333,4 +406,28 @@ class DatasetAggregatorSuite extends QueryTest with SharedSQLContext {
           df.groupBy($"i").agg(VeryComplexResultAgg.toColumn),
           Row(1, Row(Row(1, "a"), Row(1, "a"))) :: Row(2, Row(Row(2, "bc"), Row(2, "bc"))) :: Nil)
       }
    +
    +  test("SPARK-24569: Aggregator with output type Option[Boolean] creates column of type Row") {
    +    val df = Seq(
    +      OptionBooleanData("bob", Some(true)),
    +      OptionBooleanData("bob", Some(false)),
    +      OptionBooleanData("bob", None)).toDF()
    +    val group = df
    +      .groupBy("name")
    --- End diff --
    
    do we have the same problem in `groupByKey`?


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    retest this please.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r198024130
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -43,12 +43,17 @@ import org.apache.spark.util.Utils
      *    to the name `value`.
      */
     object ExpressionEncoder {
    -  def apply[T : TypeTag](): ExpressionEncoder[T] = {
    +  def apply[T : TypeTag](): ExpressionEncoder[T] = apply(topLevel = true)
    +
    +  /**
    +   * @param topLevel whether the encoders to construct are for top-level row.
    +   */
    +  def apply[T : TypeTag](topLevel: Boolean): ExpressionEncoder[T] = {
    --- End diff --
    
    Please see my comment https://github.com/apache/spark/pull/21611/files#r197348976. It is used to create encoder `Encoder[Option[(Boolean, Int)]]`.



---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r200127948
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala ---
    @@ -798,7 +798,11 @@ object ScalaReflection extends ScalaReflection {
        * Whether the fields of the given type is defined entirely by its constructor parameters.
        */
       def definedByConstructorParams(tpe: Type): Boolean = cleanUpReflectionObjects {
    -    tpe.dealias <:< localTypeOf[Product] || tpe.dealias <:< localTypeOf[DefinedByConstructorParams]
    +    tpe.dealias match {
    +      case t if t <:< localTypeOf[Option[_]] => definedByConstructorParams(t.typeArgs.head)
    --- End diff --
    
    we should add some comments: Option is a Product but don't wanna treat `Option[Int]` as a struct type


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92670 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92670/testReport)** for PR 21611 at commit [`e67594a`](https://github.com/apache/spark/commit/e67594ab9caa2856bd0ba8cf9398ea9dd1244738).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/567/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/400/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92448 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92448/testReport)** for PR 21611 at commit [`69c0dde`](https://github.com/apache/spark/commit/69c0dde39c13ac0333a098cbc2f40197b392409f).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92200 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92200/testReport)** for PR 21611 at commit [`dd4ea61`](https://github.com/apache/spark/commit/dd4ea61ac1c2beaf8ee897b1533e2088c6f8364a).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    retest this please.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/574/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    There are 2 problems:
    1. `Option` is mistakenly mapped to a struct type. It's not only for aggregate, but join too
    ```
    scala> val a = Seq(Some(1)).toDS
    a: org.apache.spark.sql.Dataset[Some[Int]] = [value: int]
    
    scala> val b = Seq(Some(1.2)).toDS
    b: org.apache.spark.sql.Dataset[Some[Double]] = [value: double]
    
    scala> a.joinWith(b, lit(true))
    res2: org.apache.spark.sql.Dataset[(Some[Int], Some[Double])] = [_1: struct<value: int>, _2: struct<value: double>]
    ```
    
    2. `Aggregator` can't use option of product.
    
    I think these 2 problems can be solved separately, what do you think?


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/577/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    thanks, merging to master!


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92403/
    Test PASSed.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r200662612
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -333,4 +369,29 @@ class DatasetAggregatorSuite extends QueryTest with SharedSQLContext {
           df.groupBy($"i").agg(VeryComplexResultAgg.toColumn),
           Row(1, Row(Row(1, "a"), Row(1, "a"))) :: Row(2, Row(Row(2, "bc"), Row(2, "bc"))) :: Nil)
       }
    +
    +  test("SPARK-24569: Aggregator with output type Option[Boolean] creates column of type Row") {
    +    val df = Seq(
    +      OptionBooleanData("bob", Some(true)),
    +      OptionBooleanData("bob", Some(false)),
    +      OptionBooleanData("bob", None)).toDF()
    +    val group = df
    +      .groupBy("name")
    +      .agg(OptionBooleanAggregator("isGood").toColumn.alias("isGood"))
    +    assert(df.schema == group.schema)
    +    checkAnswer(group, Row("bob", true) :: Nil)
    +    checkDataset(group.as[OptionBooleanData], OptionBooleanData("bob", Some(true)))
    +  }
    +
    +  test("SPARK-24569: groupByKey with Aggregator of output type Option[Boolean]") {
    +    val df = Seq(
    --- End diff --
    
    Ah, it is a DataFrame because I want to reuse `OptionBooleanAggregator` whose input type is `Row`.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92403 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92403/testReport)** for PR 21611 at commit [`f04efa4`](https://github.com/apache/spark/commit/f04efa484e7b5dfbe709f65845bea58e53611604).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92202 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92202/testReport)** for PR 21611 at commit [`dd4ea61`](https://github.com/apache/spark/commit/dd4ea61ac1c2beaf8ee897b1533e2088c6f8364a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92202 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92202/testReport)** for PR 21611 at commit [`dd4ea61`](https://github.com/apache/spark/commit/dd4ea61ac1c2beaf8ee897b1533e2088c6f8364a).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r198509965
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -333,4 +406,28 @@ class DatasetAggregatorSuite extends QueryTest with SharedSQLContext {
           df.groupBy($"i").agg(VeryComplexResultAgg.toColumn),
           Row(1, Row(Row(1, "a"), Row(1, "a"))) :: Row(2, Row(Row(2, "bc"), Row(2, "bc"))) :: Nil)
       }
    +
    +  test("SPARK-24569: Aggregator with output type Option[Boolean] creates column of type Row") {
    +    val df = Seq(
    +      OptionBooleanData("bob", Some(true)),
    +      OptionBooleanData("bob", Some(false)),
    +      OptionBooleanData("bob", None)).toDF()
    +    val group = df
    +      .groupBy("name")
    --- End diff --
    
    Yes, if you use similar `Aggregator` with `groupByKey`, you gets a struct too:
    
    ```scala
    val df = Seq(
      OptionBooleanData("bob", Some(true)),
      OptionBooleanData("bob", Some(false)),
      OptionBooleanData("bob", None)).toDF()
    val df2 = df.groupByKey((r: Row) => r.getString(0))
      .agg(OptionBooleanAggregator("isGood").toColumn)
    df2.printSchema
    ```
    ```
    root
     |-- value: string (nullable = true)
     |-- OptionBooleanAggregator(org.apache.spark.sql.Row): struct (nullable = true)
     |    |-- value: boolean (nullable = true)
    ```


---

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


[GitHub] spark pull request #21611: [SPARK-24569][SQL] Aggregator with output type Op...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21611#discussion_r200585475
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetAggregatorSuite.scala ---
    @@ -333,4 +369,29 @@ class DatasetAggregatorSuite extends QueryTest with SharedSQLContext {
           df.groupBy($"i").agg(VeryComplexResultAgg.toColumn),
           Row(1, Row(Row(1, "a"), Row(1, "a"))) :: Row(2, Row(Row(2, "bc"), Row(2, "bc"))) :: Nil)
       }
    +
    +  test("SPARK-24569: Aggregator with output type Option[Boolean] creates column of type Row") {
    +    val df = Seq(
    +      OptionBooleanData("bob", Some(true)),
    +      OptionBooleanData("bob", Some(false)),
    +      OptionBooleanData("bob", None)).toDF()
    +    val group = df
    +      .groupBy("name")
    +      .agg(OptionBooleanAggregator("isGood").toColumn.alias("isGood"))
    +    assert(df.schema == group.schema)
    +    checkAnswer(group, Row("bob", true) :: Nil)
    +    checkDataset(group.as[OptionBooleanData], OptionBooleanData("bob", Some(true)))
    +  }
    +
    +  test("SPARK-24569: groupByKey with Aggregator of output type Option[Boolean]") {
    +    val df = Seq(
    --- End diff --
    
    can we create a ds not df here?


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    This affects the dataset with `Aggregator` of output type `Option`. 
    
    For normal dataset schema, it does affect the following case:
    
    ```scala
    val ds = Seq(Some(1), None, null).toDS()
    ds.show
    ds.printSchema
    ```
    
    Before:
    ```
    [info] If the schema is inferred from a Scala tuple/case class, or a Java bean, please try to use scala.Option[_] or other nullable types (
    e.g. java.lang.Integer instead of int/scala.Int).
    ```
    
    After:
    ```scala
    +-----+
    |value|
    +-----+
    |    1|
    | null|
    | null|
    +-----+
    
    root
     |-- value: integer (nullable = true)
    ```
    
    This dataset's schema is a row with a nullable integer. I feel that it should be allowed to have null.



---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    cc @cloud-fan for review.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/733/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92200/
    Test FAILed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    ping @cloud-fan for taking a look again.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    retest this please.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92687 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92687/testReport)** for PR 21611 at commit [`65a16ec`](https://github.com/apache/spark/commit/65a16ec6bcf93763e26605aea7cec8860df158d9).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/720/
    Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    does this affect normal dataset schema?


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92403 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92403/testReport)** for PR 21611 at commit [`f04efa4`](https://github.com/apache/spark/commit/f04efa484e7b5dfbe709f65845bea58e53611604).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    **[Test build #92455 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92455/testReport)** for PR 21611 at commit [`69c0dde`](https://github.com/apache/spark/commit/69c0dde39c13ac0333a098cbc2f40197b392409f).


---

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


[GitHub] spark issue #21611: [SPARK-24569][SQL] Aggregator with output type Option sh...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92448/
    Test FAILed.


---

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