ijokarumawak commented on a change in pull request #3478: NIFI-6304 added trim,
toLowerCase and toUpperCase to record path oper…
URL: https://github.com/apache/nifi/pull/3478#discussion_r286288057
##########
File path:
nifi-commons/nifi-record-path/src/main/java/org/apache/nifi/record/path/paths/RecordPathCompiler.java
##########
@@ -237,14 +240,16 @@ public static RecordPathSegment buildPath(final Tree
tree, final RecordPathSegme
return new ReplaceNull(args[0], args[1], absolute);
}
case "concat": {
- final int numArgs = argumentListTree.getChildCount();
-
- final RecordPathSegment[] argPaths = new
RecordPathSegment[numArgs];
- for (int i = 0; i < numArgs; i++) {
- argPaths[i] =
buildPath(argumentListTree.getChild(i), null, absolute);
- }
-
- return new Concat(argPaths, absolute);
+ return new
Concat(getArgumentsForStringFunction(absolute, argumentListTree), absolute);
+ }
+ case "toLowerCase": {
+ return new
ToLowerCase(getArgumentsForStringFunction(absolute, argumentListTree),
absolute);
+ }
+ case "toUpperCase": {
+ return new
ToUpperCase(getArgumentsForStringFunction(absolute, argumentListTree),
absolute);
+ }
+ case "trim": {
+ return new
TrimString(getArgumentsForStringFunction(absolute, argumentListTree), absolute);
Review comment:
Please add these new functions to 'Standalone Functions' section of
'record-path-guide.adoc'.
----------------------------------------------------------------
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