Zoltan Borok-Nagy has posted comments on this change. ( https://gerrit.cloudera.org/25459 )
Change subject: IMPALA-15811: Support DECIMAL(p,s) as a variant_get() target type ...................................................................... Patch Set 6: (1 comment) Thanks for the comments! https://gerrit.cloudera.org/#/c/25459/5/fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java File fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java: https://gerrit.cloudera.org/#/c/25459/5/fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java@1010 PS5, Line 1010: : parseDecimalTagNumber(typeTag, m.group(2), "scale", ScalarType.MAX_SCALE); > Isn't there already a way to parse these? E.g. type.parseColumnType()? Type.parseColumnType() parses the tag as a column of 'CREATE TABLE $DUMMY ($DUMMY <tag>)', so it also accepts text after the type, e.g. 'decimal(10,2), x int' or 'int primary key'. The grammar also keeps only the low 32 bits of the numbers, so 'decimal(4294967306,2)' becomes DECIMAL(10,2) (CAST has the same bug, filed IMPALA-15869). Rejecting these takes about as much code as the regex, so I kept it, and added a comment and tests for these cases. -- To view, visit https://gerrit.cloudera.org/25459 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I07a1aab68238b4af8760f647848aaf07cc5d497d Gerrit-Change-Number: 25459 Gerrit-PatchSet: 6 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Tue, 24 Nov 2026 17:25:52 +0000 Gerrit-HasComments: Yes
