Skip to content

Commit

Permalink
Merge branch 'ESPARK-111' into 'spark_2.1'
Browse files Browse the repository at this point in the history
[ESPARK-111]add sparksql support varchar no length

spark支持presto的 cast as varchar

See merge request !66
  • Loading branch information
cenyuhai committed Sep 11, 2017
2 parents 9e1f649 + 21ef80f commit 4102f20
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with Logging {
case ("timestamp", Nil) => TimestampType
case ("string", Nil) => StringType
case ("char", length :: Nil) => CharType(length.getText.toInt)
case ("varchar", Nil) => StringType
case ("varchar", length :: Nil) => VarcharType(length.getText.toInt)
case ("binary", Nil) => BinaryType
case ("decimal", Nil) => DecimalType.USER_DEFAULT
Expand Down

0 comments on commit 4102f20

Please sign in to comment.