mattyb149 commented on a change in pull request #3223: NIFI-5903: Allow 
RecordPath to be used in QueryRecord processor. Also…
URL: https://github.com/apache/nifi/pull/3223#discussion_r251891955
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java
 ##########
 @@ -556,6 +566,23 @@ public int getRecordsRead() {
         }
     }
 
+    private SchemaPlus createRootSchema(final CalciteConnection 
calciteConnection) {
+        final SchemaPlus rootSchema = calciteConnection.getRootSchema();
+        // TODO: Document how to use RPATH functions in additionalDetails.html!
+        // TODO: Be sure to explain how/when to use each. For example, can 
just use RPATH when SELECTing the value but if using in a LIKE expression,
+        //       need a String so use RPATH_STRING
+        // TODO: Probably worth writing a blog post
+        rootSchema.add("RPATH", 
ScalarFunctionImpl.create(ObjectRecordPath.class, "eval"));
+        rootSchema.add("RPATH_STRING", 
ScalarFunctionImpl.create(StringRecordPath.class, "eval"));
 
 Review comment:
   From the user perspective, is it better to have separate functions for the 
data types, or a single (perhaps overloaded) function that takes the data type 
as a string parameter?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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