mgaido91 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_r309410648
 
 

 ##########
 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:
   yes, but if you put them in the list with `SUBSTRING | FORMAT`, you allow 2 
parameters, don't you?

----------------------------------------------------------------
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

Reply via email to