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/09/09 03:56:26 UTC

[GitHub] [spark] yaooqinn opened a new pull request #29687: [SPARK-32826][SQL] Add test case for get null columns using SparkGetColumnsOperation

yaooqinn opened a new pull request #29687:
URL: https://github.com/apache/spark/pull/29687


   
   ### What changes were proposed in this pull request?
   
   In Spark 3.0.0, the SparkGetColumnsOperation can not recognize NULL columns but now we can because the side effect of https://issues.apache.org/jira/browse/SPARK-32696 / https://github.com/apache/spark/commit/f14f3742e0c98dd306abf02e93d2f10d89bc423f
   
   In this PR, we add a test case for it to improve the test coverage and set the right column size for the null type 
   
   ### 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.
   -->
   
   test coverage
   
   ### 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'.
   -->
   
   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.
   -->
   added ut


----------------------------------------------------------------
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 closed pull request #29687: [SPARK-32826][SQL] Set the right column size for the null type in SparkGetColumnsOperation

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #29687:
URL: https://github.com/apache/spark/pull/29687


   


----------------------------------------------------------------
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 #29687: [SPARK-32826][SQL][TESTS] Add test case for get null columns using SparkGetColumnsOperation

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






----------------------------------------------------------------
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 #29687: [SPARK-32826][SQL][TESTS] Add test case for get null columns using SparkGetColumnsOperation

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


   **[Test build #128433 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128433/testReport)** for PR 29687 at commit [`2e6914d`](https://github.com/apache/spark/commit/2e6914ded7582cc02d215d7d435d76b9bf90a720).


----------------------------------------------------------------
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 #29687: [SPARK-32826][SQL][TESTS] Add test case for get null columns using SparkGetColumnsOperation

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


   **[Test build #128433 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128433/testReport)** for PR 29687 at commit [`2e6914d`](https://github.com/apache/spark/commit/2e6914ded7582cc02d215d7d435d76b9bf90a720).


----------------------------------------------------------------
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 #29687: [SPARK-32826][SQL][TESTS] Add test case for get null columns using SparkGetColumnsOperation

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






----------------------------------------------------------------
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 #29687: [SPARK-32826][SQL][TESTS] Add test case for get null columns using SparkGetColumnsOperation

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






----------------------------------------------------------------
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 pull request #29687: [SPARK-32826][SQL] Set the right column size for the null type in SparkGetColumnsOperation

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29687:
URL: https://github.com/apache/spark/pull/29687#issuecomment-689980129


   thanks, merging to master!


----------------------------------------------------------------
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] yaooqinn commented on a change in pull request #29687: [SPARK-32826][SQL][TEST] Add test case for get null columns using SparkGetColumnsOperation

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -130,7 +130,8 @@ private[hive] class SparkGetColumnsOperation(
    * For array, map, string, and binaries, the column size is variable, return null as unknown.
    */
   private def getColumnSize(typ: DataType): Option[Int] = typ match {
-    case dt @ (BooleanType | _: NumericType | DateType | TimestampType | CalendarIntervalType) =>
+    case dt @ (BooleanType | _: NumericType | DateType | TimestampType |
+               CalendarIntervalType | NullType) =>

Review comment:
       OK~




----------------------------------------------------------------
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 #29687: [SPARK-32826][SQL][TESTS] Add test case for get null columns using SparkGetColumnsOperation

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


   **[Test build #128433 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128433/testReport)** for PR 29687 at commit [`2e6914d`](https://github.com/apache/spark/commit/2e6914ded7582cc02d215d7d435d76b9bf90a720).
    * 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] AmplabJenkins removed a comment on pull request #29687: [SPARK-32826][SQL][TESTS] Add test case for get null columns using SparkGetColumnsOperation

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






----------------------------------------------------------------
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 pull request #29687: [SPARK-32826][SQL] Add test case for get null columns using SparkGetColumnsOperation

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29687:
URL: https://github.com/apache/spark/pull/29687#issuecomment-689952870


   please also update the PR description to mention the non-test change.


----------------------------------------------------------------
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] yaooqinn commented on pull request #29687: [SPARK-32826][SQL] Set the right column size for the null type in SparkGetColumnsOperation

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


   updated, thanks for suggestions


----------------------------------------------------------------
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 #29687: [SPARK-32826][SQL][TEST] Add test case for get null columns using SparkGetColumnsOperation

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -130,7 +130,8 @@ private[hive] class SparkGetColumnsOperation(
    * For array, map, string, and binaries, the column size is variable, return null as unknown.
    */
   private def getColumnSize(typ: DataType): Option[Int] = typ match {
-    case dt @ (BooleanType | _: NumericType | DateType | TimestampType | CalendarIntervalType) =>
+    case dt @ (BooleanType | _: NumericType | DateType | TimestampType |
+               CalendarIntervalType | NullType) =>

Review comment:
       so it's not a test only PR. Can we remove [TEST] from PR title?




----------------------------------------------------------------
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] yaooqinn commented on pull request #29687: [SPARK-32826][SQL] Add test case for get null columns using SparkGetColumnsOperation

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


   cc @cloud-fan @maropu @dongjoon-hyun, and thanks very much~


----------------------------------------------------------------
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