Skip to content

Commit a4aafe5

Browse files
marmbrusrxin
authored andcommitted
[SQL] Fix tiny/small ints from HiveMetastore.
Author: Michael Armbrust <[email protected]> Closes apache#797 from marmbrus/smallInt and squashes the following commits: 2db9dae [Michael Armbrust] Fix tiny/small ints from HiveMetastore.
1 parent e66e31b commit a4aafe5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala

+4-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ object HiveMetastoreTypes extends RegexParsers {
183183
"string" ^^^ StringType |
184184
"float" ^^^ FloatType |
185185
"int" ^^^ IntegerType |
186-
"tinyint" ^^^ ShortType |
186+
"tinyint" ^^^ ByteType |
187+
"smallint" ^^^ ShortType |
187188
"double" ^^^ DoubleType |
188189
"bigint" ^^^ LongType |
189190
"binary" ^^^ BinaryType |
@@ -227,7 +228,8 @@ object HiveMetastoreTypes extends RegexParsers {
227228
case StringType => "string"
228229
case FloatType => "float"
229230
case IntegerType => "int"
230-
case ShortType =>"tinyint"
231+
case ByteType => "tinyint"
232+
case ShortType => "smallint"
231233
case DoubleType => "double"
232234
case LongType => "bigint"
233235
case BinaryType => "binary"

0 commit comments

Comments
 (0)