Skip to content

Commit

Permalink
apache#44, cast varchar/char as string when no precision.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaaaaaron authored and 7mming7 committed Aug 30, 2019
1 parent 851487a commit 989a6b0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,9 @@ class AstBuilder(conf: SQLConf) extends SqlBaseBaseVisitor[AnyRef] with Logging
case ("date", Nil) => DateType
case ("timestamp", Nil) => TimestampType
case ("string", Nil) => StringType
case ("char", 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 989a6b0

Please sign in to comment.