You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/04 09:27:09 UTC

[GitHub] [spark] dongjoon-hyun opened a new pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

dongjoon-hyun opened a new pull request #30246:
URL: https://github.com/apache/spark/pull/30246


   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] viirya commented on a change in pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #30246:
URL: https://github.com/apache/spark/pull/30246#discussion_r517605777



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
##########
@@ -316,6 +316,8 @@ case class Literal (value: Any, dataType: DataType) extends LeafExpression {
       (value, o.value) match {
         case (null, null) => true
         case (a: Array[Byte], b: Array[Byte]) => util.Arrays.equals(a, b)
+        case (a: ArrayBasedMapData, b: ArrayBasedMapData) =>
+          a.keyArray == b.keyArray && a.valueArray == b.valueArray

Review comment:
       Thanks!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun closed pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #30246:
URL: https://github.com/apache/spark/pull/30246


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721790893






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721619311


   **[Test build #130596 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/130596/testReport)** for PR 30246 at commit [`8c29c48`](https://github.com/apache/spark/commit/8c29c4825458c0db298eb17182fd7ceeedae9110).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721692117


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35198/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721655077






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] viirya commented on a change in pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #30246:
URL: https://github.com/apache/spark/pull/30246#discussion_r517515681



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
##########
@@ -316,6 +316,8 @@ case class Literal (value: Any, dataType: DataType) extends LeafExpression {
       (value, o.value) match {
         case (null, null) => true
         case (a: Array[Byte], b: Array[Byte]) => util.Arrays.equals(a, b)
+        case (a: ArrayBasedMapData, b: ArrayBasedMapData) =>
+          a.keyArray == b.keyArray && a.valueArray == b.valueArray

Review comment:
       Quick question, why we don't have `equals` in `ArrayBasedMapData`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721655077






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721661968


   Could you review this, @cloud-fan and @maropu and @viirya ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721748886


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30246:
URL: https://github.com/apache/spark/pull/30246#discussion_r517385544



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -3706,6 +3706,18 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
       }
     }
   }
+
+  test("SPARK-33338: GROUP BY using literal map should not fail") {
+    withTempDir { dir =>
+      sql(s"CREATE TABLE t USING ORC LOCATION '${dir.toURI}' AS SELECT map('k1', 'v1') m, 'k1' k")
+      Seq(
+        "SELECT map('k1', 'v1')[k] FROM t GROUP BY 1",
+        "SELECT map('k1', 'v1')[k] FROM t GROUP BY map('k1', 'v1')[k]",

Review comment:
       how about `SELECT map('k1', 'v1', 'k2', 'v2')[k] FROM t GROUP BY map('k2', 'v2', 'k1', 'v1')[k]`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721679929


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35198/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721790893






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721838797


   Thank you, @HyukjinKwon and @cloud-fan .
   Merged to master/3.0/2.4.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721655047


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35197/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721619311


   **[Test build #130596 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/130596/testReport)** for PR 30246 at commit [`8c29c48`](https://github.com/apache/spark/commit/8c29c4825458c0db298eb17182fd7ceeedae9110).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721789682


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721640251


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35197/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721750124






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30246:
URL: https://github.com/apache/spark/pull/30246#discussion_r517520010



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
##########
@@ -316,6 +316,8 @@ case class Literal (value: Any, dataType: DataType) extends LeafExpression {
       (value, o.value) match {
         case (null, null) => true
         case (a: Array[Byte], b: Array[Byte]) => util.Arrays.equals(a, b)
+        case (a: ArrayBasedMapData, b: ArrayBasedMapData) =>
+          a.keyArray == b.keyArray && a.valueArray == b.valueArray

Review comment:
       I also considered that way first, but I didn't do that because of this.
   ```scala
   /**
    * This is an internal data representation for map type in Spark SQL. This should not implement
    * `equals` and `hashCode` because the type cannot be used as join keys, grouping keys, or
    * in equality tests. See SPARK-9415 and PR#13847 for the discussions.
    */
   abstract class MapData extends Serializable
   ```
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721660767


   **[Test build #130597 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/130597/testReport)** for PR 30246 at commit [`b7367d7`](https://github.com/apache/spark/commit/b7367d71d02d1938ea0bf74c42db50b10fda1fab).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30246:
URL: https://github.com/apache/spark/pull/30246#discussion_r517473791



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -3706,6 +3706,18 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
       }
     }
   }
+
+  test("SPARK-33338: GROUP BY using literal map should not fail") {
+    withTempDir { dir =>
+      sql(s"CREATE TABLE t USING ORC LOCATION '${dir.toURI}' AS SELECT map('k1', 'v1') m, 'k1' k")
+      Seq(
+        "SELECT map('k1', 'v1')[k] FROM t GROUP BY 1",
+        "SELECT map('k1', 'v1')[k] FROM t GROUP BY map('k1', 'v1')[k]",

Review comment:
       Since we don't normalize the literal maps, they are not the same maps, @cloud-fan . We should not handle it here, @cloud-fan . 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721692135






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721660767


   **[Test build #130597 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/130597/testReport)** for PR 30246 at commit [`b7367d7`](https://github.com/apache/spark/commit/b7367d71d02d1938ea0bf74c42db50b10fda1fab).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30246:
URL: https://github.com/apache/spark/pull/30246#discussion_r517206586



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
##########
@@ -316,6 +316,8 @@ case class Literal (value: Any, dataType: DataType) extends LeafExpression {
       (value, o.value) match {
         case (null, null) => true
         case (a: Array[Byte], b: Array[Byte]) => util.Arrays.equals(a, b)
+        case (a: ArrayBasedMapData, b: ArrayBasedMapData) =>
+          a.keyArray == b.keyArray && a.valueArray == b.valueArray

Review comment:
       `GenericArrayData` has `equals`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30246:
URL: https://github.com/apache/spark/pull/30246#discussion_r517520551



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
##########
@@ -316,6 +316,8 @@ case class Literal (value: Any, dataType: DataType) extends LeafExpression {
       (value, o.value) match {
         case (null, null) => true
         case (a: Array[Byte], b: Array[Byte]) => util.Arrays.equals(a, b)
+        case (a: ArrayBasedMapData, b: ArrayBasedMapData) =>
+          a.keyArray == b.keyArray && a.valueArray == b.valueArray

Review comment:
       That's the reason why I focused on `literal map equality` only.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721750124






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #30246: [SPARK-33338][SQL] semanticEquals should handle static GetMapValue correctly

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721661968


   Could you review this, @cloud-fan and @maropu ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30246: [SPARK-33338][SQL] GROUP BY using literal map should not fail

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30246:
URL: https://github.com/apache/spark/pull/30246#issuecomment-721692135






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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