[GitHub] HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…

2018-12-29 Thread GitBox
HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] 
JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…
URL: https://github.com/apache/spark/pull/23400#discussion_r244523793
 
 

 ##
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ##
 @@ -239,7 +239,7 @@ object JdbcUtils extends Logging {
   case java.sql.Types.TIMESTAMP => TimestampType
   case java.sql.Types.TIMESTAMP_WITH_TIMEZONE
 => null
-  case java.sql.Types.TINYINT   => IntegerType
+  case java.sql.Types.TINYINT   => ByteType
 
 Review comment:
   In that case, I think we don;t need to update migration guide.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…

2018-12-29 Thread GitBox
HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] 
JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…
URL: https://github.com/apache/spark/pull/23400#discussion_r244523789
 
 

 ##
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ##
 @@ -239,7 +239,7 @@ object JdbcUtils extends Logging {
   case java.sql.Types.TIMESTAMP => TimestampType
   case java.sql.Types.TIMESTAMP_WITH_TIMEZONE
 => null
-  case java.sql.Types.TINYINT   => IntegerType
+  case java.sql.Types.TINYINT   => ByteType
 
 Review comment:
   SGTM


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…

2018-12-29 Thread GitBox
HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] 
JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…
URL: https://github.com/apache/spark/pull/23400#discussion_r244474776
 
 

 ##
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ##
 @@ -239,7 +239,7 @@ object JdbcUtils extends Logging {
   case java.sql.Types.TIMESTAMP => TimestampType
   case java.sql.Types.TIMESTAMP_WITH_TIMEZONE
 => null
-  case java.sql.Types.TINYINT   => IntegerType
+  case java.sql.Types.TINYINT   => ByteType
 
 Review comment:
   Since `TINYINT` can represent an 8-bit unsigned integer value between 0 and 
255, wouldn't it be more correct to use `ShortType`?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…

2018-12-29 Thread GitBox
HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] 
JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…
URL: https://github.com/apache/spark/pull/23400#discussion_r244523378
 
 

 ##
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ##
 @@ -239,7 +239,7 @@ object JdbcUtils extends Logging {
   case java.sql.Types.TIMESTAMP => TimestampType
   case java.sql.Types.TIMESTAMP_WITH_TIMEZONE
 => null
-  case java.sql.Types.TINYINT   => IntegerType
+  case java.sql.Types.TINYINT   => ByteType
 
 Review comment:
   Also, in case of MySQL, I think we should always treat the worst case. it 
can be `TINYINT UNSIGNED`, which range from 0 to 255.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…

2018-12-29 Thread GitBox
HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] 
JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…
URL: https://github.com/apache/spark/pull/23400#discussion_r244523342
 
 

 ##
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ##
 @@ -239,7 +239,7 @@ object JdbcUtils extends Logging {
   case java.sql.Types.TIMESTAMP => TimestampType
   case java.sql.Types.TIMESTAMP_WITH_TIMEZONE
 => null
-  case java.sql.Types.TINYINT   => IntegerType
+  case java.sql.Types.TINYINT   => ByteType
 
 Review comment:
   If that can be varied per implementation, we should choose the most 
conservative one here and let other dialects handle it as you said. Can you 
check JDBC type mapping? I think we don't have to fix it then.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…

2018-12-29 Thread GitBox
HyukjinKwon commented on a change in pull request #23400: [SPARK-26499] [SQL] 
JdbcUtils.getCatalystType maps TINYINT to IntegerType instead of Byte…
URL: https://github.com/apache/spark/pull/23400#discussion_r244474776
 
 

 ##
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ##
 @@ -239,7 +239,7 @@ object JdbcUtils extends Logging {
   case java.sql.Types.TIMESTAMP => TimestampType
   case java.sql.Types.TIMESTAMP_WITH_TIMEZONE
 => null
-  case java.sql.Types.TINYINT   => IntegerType
+  case java.sql.Types.TINYINT   => ByteType
 
 Review comment:
   Since `TINYINT` represents an 8-bit unsigned integer value between 0 and 
255, wouldn't it be more correct to use `ShortType`?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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