Skip to content

Commit

Permalink
HIVE-27439: Support space in Decimal(precision, scale) format (#4417)…
Browse files Browse the repository at this point in the history
…. (leesf, reviewed by Ayush Saxena, Butao Zhang)
  • Loading branch information
leesf committed Jun 23, 2023
1 parent 62c07ca commit ac60b97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private static ArrayList<Token> tokenize(String typeInfoString) {
|| !isTypeChar(typeInfoString.charAt(end))) {
Token t = new Token();
t.position = begin;
t.text = typeInfoString.substring(begin, end);
t.text = typeInfoString.substring(begin, end).trim();
t.isType = isTypeChar(typeInfoString.charAt(begin));
tokens.add(t);
begin = end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ public void testTypeInfoParser() {
"string",
"varchar(10)",
"char(15)",
"array<int>"
"array<int>",
"decimal(10,2)",
"decimal(10, 2)",
"decimal(10, 2 )",
"decimal( 10, 2 )",
"struct<user id:int,user group: int>"
};

String[] invalidTypeStrings = {
Expand Down

0 comments on commit ac60b97

Please sign in to comment.