From e67fe98efb6e30c73f325e364ad4ddb2780e631c Mon Sep 17 00:00:00 2001 From: Gor Hayrapetyan Date: Wed, 28 Nov 2018 15:57:21 +0400 Subject: [PATCH] Fix short to smallint mapping. --- .../com/databricks/spark/redshift/RedshiftJDBCWrapper.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/scala/com/databricks/spark/redshift/RedshiftJDBCWrapper.scala b/src/main/scala/com/databricks/spark/redshift/RedshiftJDBCWrapper.scala index dc72dccf..7510158f 100644 --- a/src/main/scala/com/databricks/spark/redshift/RedshiftJDBCWrapper.scala +++ b/src/main/scala/com/databricks/spark/redshift/RedshiftJDBCWrapper.scala @@ -247,8 +247,7 @@ private[redshift] class JDBCWrapper { case LongType => "BIGINT" case DoubleType => "DOUBLE PRECISION" case FloatType => "REAL" - case ShortType => "INTEGER" - case ByteType => "SMALLINT" // Redshift does not support the BYTE type. + case ShortType | ByteType => "SMALLINT" // Redshift does not support the BYTE type. case BooleanType => "BOOLEAN" case StringType => if (field.metadata.contains("maxlength")) {