Skip to content
Snippets Groups Projects
Commit 5f7b7cda authored by Santiago M. Mola's avatar Santiago M. Mola Committed by Michael Armbrust
Browse files

[SPARK-6611][SQL] Add support for INTEGER as synonym of INT.

https://issues.apache.org/jira/browse/SPARK-6611

Author: Santiago M. Mola <santiago.mola@sap.com>

Closes #5271 from smola/features/integer-parse and squashes the following commits:

f5c1c64 [Santiago M. Mola] [SPARK-6611] Add support for INTEGER as synonym of INT.
parent 198cf2a3
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ private[sql] trait DataTypeParser extends StandardTokenParsers {
protected lazy val primitiveType: Parser[DataType] =
"(?i)string".r ^^^ StringType |
"(?i)float".r ^^^ FloatType |
"(?i)int".r ^^^ IntegerType |
"(?i)(?:int|integer)".r ^^^ IntegerType |
"(?i)tinyint".r ^^^ ByteType |
"(?i)smallint".r ^^^ ShortType |
"(?i)double".r ^^^ DoubleType |
......
......@@ -34,10 +34,12 @@ class DataTypeParserSuite extends FunSuite {
}
checkDataType("int", IntegerType)
checkDataType("integer", IntegerType)
checkDataType("BooLean", BooleanType)
checkDataType("tinYint", ByteType)
checkDataType("smallINT", ShortType)
checkDataType("INT", IntegerType)
checkDataType("INTEGER", IntegerType)
checkDataType("bigint", LongType)
checkDataType("float", FloatType)
checkDataType("dOUBle", DoubleType)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment