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 2021/04/26 06:50:55 UTC

[GitHub] [spark] beliefer opened a new pull request #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

beliefer opened a new pull request #32345:
URL: https://github.com/apache/spark/pull/32345


   ### What changes were proposed in this pull request?
   This PR let JDBC clients identify ANSI interval columns properly.
   
   
   ### 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] beliefer commented on a change in pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -171,8 +171,8 @@ private[hive] class SparkGetColumnsOperation(
     case BooleanType => java.sql.Types.BOOLEAN
     case ByteType => java.sql.Types.TINYINT
     case ShortType => java.sql.Types.SMALLINT
-    case IntegerType => java.sql.Types.INTEGER
-    case LongType => java.sql.Types.BIGINT
+    case IntegerType | YearMonthIntervalType => java.sql.Types.INTEGER
+    case LongType | DayTimeIntervalType => java.sql.Types.BIGINT

Review comment:
       Good question! I have the confusion too.
   cc @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] beliefer commented on pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   @MaxGekk @cloud-fan Thank you.


-- 
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] beliefer commented on pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   > @beliefer Could you fill in the PR description, please.
   
   I'm sorry! I forgot it.


-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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






-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #137936 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137936/testReport)** for PR 32345 at commit [`23c8cf2`](https://github.com/apache/spark/commit/23c8cf2489d77af8bd754705d6aec07544e36a85).


-- 
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 #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #138023 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138023/testReport)** for PR 32345 at commit [`4c594bb`](https://github.com/apache/spark/commit/4c594bb749f67fa50042f626668a94fe151e40c2).


-- 
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 #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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






-- 
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] beliefer commented on a change in pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -131,7 +131,7 @@ private[hive] class SparkGetColumnsOperation(
    */
   private def getColumnSize(typ: DataType): Option[Int] = typ match {
     case dt @ (BooleanType | _: NumericType | DateType | TimestampType |
-               CalendarIntervalType | NullType) =>
+               CalendarIntervalType | NullType | YearMonthIntervalType | DayTimeIntervalType) =>

Review comment:
       `CalendarIntervalType` return it's `defaultSize` (4 + 4 + 8 = 16).
   It seems `YearMonthIntervalType` and `DayTimeIntervalType` should return `defaultSize` too.




-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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






-- 
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 #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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






-- 
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] MaxGekk commented on a change in pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -171,8 +171,8 @@ private[hive] class SparkGetColumnsOperation(
     case BooleanType => java.sql.Types.BOOLEAN
     case ByteType => java.sql.Types.TINYINT
     case ShortType => java.sql.Types.SMALLINT
-    case IntegerType => java.sql.Types.INTEGER
-    case LongType => java.sql.Types.BIGINT
+    case IntegerType | YearMonthIntervalType => java.sql.Types.INTEGER
+    case LongType | DayTimeIntervalType => java.sql.Types.BIGINT

Review comment:
       See the PR https://github.com/apache/spark/pull/32121. We should return strings. Since there is no appropriate type in `java.sql.*` for intervals. I believe we should return the same as for `CalendarIntervalType` - `java.sql.Types.OTHER`.
   
   @beliefer Could you handle `YearMonthIntervalType` and `DayTimeIntervalType` separately, and return `java.sql.Types.OTHER`




-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137939/
   


-- 
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] MaxGekk commented on pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   +1, LGTM. Merging to master.
   Thank you, @beliefer and @cloud-fan for review.


-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #137936 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137936/testReport)** for PR 32345 at commit [`23c8cf2`](https://github.com/apache/spark/commit/23c8cf2489d77af8bd754705d6aec07544e36a85).


-- 
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] MaxGekk closed pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #32345:
URL: https://github.com/apache/spark/pull/32345


   


-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   Kubernetes integration test unable to build dist.
   
   exiting with code: 1
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42458/
   


-- 
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] beliefer commented on a change in pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -171,8 +171,8 @@ private[hive] class SparkGetColumnsOperation(
     case BooleanType => java.sql.Types.BOOLEAN
     case ByteType => java.sql.Types.TINYINT
     case ShortType => java.sql.Types.SMALLINT
-    case IntegerType => java.sql.Types.INTEGER
-    case LongType => java.sql.Types.BIGINT
+    case IntegerType | YearMonthIntervalType => java.sql.Types.INTEGER
+    case LongType | DayTimeIntervalType => java.sql.Types.BIGINT

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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #137939 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137939/testReport)** for PR 32345 at commit [`211dbf2`](https://github.com/apache/spark/commit/211dbf2c28c91c6a6977ddf84306252e89946038).
    * 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] MaxGekk commented on a change in pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -131,7 +131,7 @@ private[hive] class SparkGetColumnsOperation(
    */
   private def getColumnSize(typ: DataType): Option[Int] = typ match {
     case dt @ (BooleanType | _: NumericType | DateType | TimestampType |
-               CalendarIntervalType | NullType) =>
+               CalendarIntervalType | NullType | YearMonthIntervalType | DayTimeIntervalType) =>

Review comment:
       Size of what does it return? `CalendarIntervalType`, `YearMonthIntervalType`, `DayTimeIntervalType` are returned as strings in rowSets.




-- 
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 #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #138023 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138023/testReport)** for PR 32345 at commit [`4c594bb`](https://github.com/apache/spark/commit/4c594bb749f67fa50042f626668a94fe151e40c2).
    * 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 removed a comment on pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #138023 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138023/testReport)** for PR 32345 at commit [`4c594bb`](https://github.com/apache/spark/commit/4c594bb749f67fa50042f626668a94fe151e40c2).


-- 
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] beliefer commented on a change in pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -171,8 +171,8 @@ private[hive] class SparkGetColumnsOperation(
     case BooleanType => java.sql.Types.BOOLEAN
     case ByteType => java.sql.Types.TINYINT
     case ShortType => java.sql.Types.SMALLINT
-    case IntegerType => java.sql.Types.INTEGER
-    case LongType => java.sql.Types.BIGINT
+    case IntegerType | YearMonthIntervalType => java.sql.Types.INTEGER
+    case LongType | DayTimeIntervalType => java.sql.Types.BIGINT

Review comment:
       Good question! I have the confusion too.




-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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






-- 
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 #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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






-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #137939 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137939/testReport)** for PR 32345 at commit [`211dbf2`](https://github.com/apache/spark/commit/211dbf2c28c91c6a6977ddf84306252e89946038).


-- 
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] beliefer commented on pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   ping @MaxGekk 


-- 
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 #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   Kubernetes integration test unable to build dist.
   
   exiting with code: 1
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42542/
   


-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42461/
   


-- 
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 #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -171,8 +171,8 @@ private[hive] class SparkGetColumnsOperation(
     case BooleanType => java.sql.Types.BOOLEAN
     case ByteType => java.sql.Types.TINYINT
     case ShortType => java.sql.Types.SMALLINT
-    case IntegerType => java.sql.Types.INTEGER
-    case LongType => java.sql.Types.BIGINT
+    case IntegerType | YearMonthIntervalType => java.sql.Types.INTEGER
+    case LongType | DayTimeIntervalType => java.sql.Types.BIGINT

Review comment:
       This is the metadata, where do we handle the data? e.g. if we want to return string or Duration/Period, where shall we instantiate string or Duration/Period values?




-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   **[Test build #137939 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137939/testReport)** for PR 32345 at commit [`211dbf2`](https://github.com/apache/spark/commit/211dbf2c28c91c6a6977ddf84306252e89946038).


-- 
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] MaxGekk commented on a change in pull request #32345: [SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -171,8 +171,8 @@ private[hive] class SparkGetColumnsOperation(
     case BooleanType => java.sql.Types.BOOLEAN
     case ByteType => java.sql.Types.TINYINT
     case ShortType => java.sql.Types.SMALLINT
-    case IntegerType => java.sql.Types.INTEGER
-    case LongType => java.sql.Types.BIGINT
+    case IntegerType | YearMonthIntervalType => java.sql.Types.INTEGER
+    case LongType | DayTimeIntervalType => java.sql.Types.BIGINT

Review comment:
       hmm, I am not sure that we should expose ANSI intervals as raw integers/longs via JDBC. I would consider strings (preferable) or java.time.Duration/Period. @cloud-fan @srielau WDYT?




-- 
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 #32345: [WIP][SPARK-35085][SQL] Get columns operation should handle ANSI interval column properly

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


   Kubernetes integration test unable to build dist.
   
   exiting with code: 1
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42461/
   


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