krisztina-zsihovszki commented on code in PR #8686:
URL: https://github.com/apache/nifi/pull/8686#discussion_r1576584416


##########
nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/WriteJsonResult.java:
##########
@@ -165,19 +177,44 @@ public WriteResult writeRawRecord(final Record record) 
throws IOException {
         return WriteResult.of(incrementRecordCount(), attributes);
     }
 
+    private boolean isUseSerializeForm(final Record record, final RecordSchema 
writeSchema) {
+        final Optional<SerializedForm> serializedForm = 
record.getSerializedForm();
+        if (!serializedForm.isPresent()) {
+            return false;
+        }
+
+        final SerializedForm form = serializedForm.get();
+        if (!form.getMimeType().equals(getMimeType()) || 
!record.getSchema().equals(writeSchema)) {
+            return false;
+        }
+
+        final Object serialized = form.getSerialized();
+        String serializedString;
+
+        if (!(serialized instanceof String)) {
+            return false;
+        } else {
+            serializedString = (String) serialized;
+        }
+

Review Comment:
   @tpalfy Thank you for the comment, I agree, we need to avoid possible merge 
issues.
   I think it would be the best if I backported 
[NIFI-12480](https://issues.apache.org/jira/browse/NIFI-12480) first and when 
it is merged to support/nifi-1.x, we can continue with the actual ticket. 
   I created another ticket for backporting NIFI-12480, will create the PR for 
it soon: https://issues.apache.org/jira/browse/NIFI-13090



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

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to