[
https://issues.apache.org/jira/browse/NIFI-4749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317092#comment-16317092
]
ASF GitHub Bot commented on NIFI-4749:
--------------------------------------
GitHub user markap14 opened a pull request:
https://github.com/apache/nifi/pull/2386
NIFI-4749: Pass the record reader's schema along to the ResultSetReco…
…rdSet so that it is able to resolve the schema for Record fields
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number
you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target
branch (typically master)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] Have you ensured that the full suite of tests is executed via mvn
-Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to
.name (programmatic access) for each of the new properties?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in
which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check travis-ci for build
issues and submit an update to your PR as soon as possible.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/markap14/nifi NIFI-4749
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/2386.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2386
----
commit 5d36c49133e8bd2b205eaf9538f5cd9305d3e920
Author: Mark Payne <markap14@...>
Date: 2018-01-08T21:18:34Z
NIFI-4749: Pass the record reader's schema along to the ResultSetRecordSet
so that it is able to resolve the schema for Record fields
----
> QueryRecord throws NPE when selecting complex objects if writer inherits
> schema
> -------------------------------------------------------------------------------
>
> Key: NIFI-4749
> URL: https://issues.apache.org/jira/browse/NIFI-4749
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.4.0
> Reporter: Mark Payne
> Assignee: Mark Payne
> Fix For: 1.5.0
>
> Attachments: NIFI-4749.xml
>
>
> If we create a QueryRecord processor and choose a Record Writer that has a
> Schema Write Strategy of "Inherit Record," all works okay if the data being
> queried is 'flat' data. But if the data is hierarchical it can fail when
> attempting to write out the data, throwing a NullPointerException:
> {code}
> 2018-01-08 15:15:07,645 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> java.lang.NullPointerException
> 2018-01-08 15:15:07,648 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.json.WriteJsonResult.writeRecord(WriteJsonResult.java:167)
> 2018-01-08 15:15:07,648 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at org.apache.nifi.json.WriteJsonResult.writeValue(WriteJsonResult.java:348)
> 2018-01-08 15:15:07,648 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at org.apache.nifi.json.WriteJsonResult.writeArray(WriteJsonResult.java:385)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at org.apache.nifi.json.WriteJsonResult.writeValue(WriteJsonResult.java:372)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.json.WriteJsonResult.writeRecord(WriteJsonResult.java:181)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.json.WriteJsonResult.writeRecord(WriteJsonResult.java:128)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.serialization.AbstractRecordSetWriter.write(AbstractRecordSetWriter.java:59)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.serialization.AbstractRecordSetWriter.write(AbstractRecordSetWriter.java:52)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.processors.standard.QueryRecord$1.process(QueryRecord.java:305)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2571)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.processors.standard.QueryRecord.onTrigger(QueryRecord.java:290)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 2018-01-08 15:15:07,649 ERROR [NiFi logging handler] org.apache.nifi.StdErr
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)