AxelSync commented on a change in pull request #3615: NIFI-6500 Support Padding
functions in Expression Language
URL: https://github.com/apache/nifi/pull/3615#discussion_r309393486
##########
File path:
nifi-commons/nifi-expression-language/src/main/antlr3/org/apache/nifi/attribute/expression/language/antlr/AttributeExpressionParser.g
##########
@@ -77,8 +77,9 @@ zeroArgString : (TO_UPPER | TO_LOWER | TRIM | TO_STRING |
URL_ENCODE | URL_DECOD
oneArgString : ((SUBSTRING_BEFORE | SUBSTRING_BEFORE_LAST | SUBSTRING_AFTER |
SUBSTRING_AFTER_LAST | REPLACE_NULL | REPLACE_EMPTY |
PREPEND | APPEND | STARTS_WITH | ENDS_WITH |
CONTAINS | JOIN | JSON_PATH | FROM_RADIX) LPAREN! anyArg RPAREN!) |
(TO_RADIX LPAREN! anyArg (COMMA! anyArg)? RPAREN!);
-twoArgString : ((REPLACE | REPLACE_FIRST | REPLACE_ALL | IF_ELSE) LPAREN!
anyArg COMMA! anyArg RPAREN!) |
- ((SUBSTRING | FORMAT) LPAREN! anyArg (COMMA!
anyArg)? RPAREN!);
+twoArgString : ((REPLACE | REPLACE_FIRST | REPLACE_ALL | IF_ELSE | ) LPAREN!
anyArg COMMA! anyArg RPAREN!) |
+ ((SUBSTRING | FORMAT) LPAREN! anyArg (COMMA!
anyArg)? RPAREN!) | (PAD_LEFT LPAREN! anyArg (COMMA! anyArg)? RPAREN!) |
Review comment:
My intent here is to allow both 1 or 2 parameters, if I just add them to the
declared functions (i.e. in the list, after the IF_ELSE function), won't I
allow only two parameters?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services