You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Daniel Stieglitz (Jira)" <ji...@apache.org> on 2026/02/27 17:53:00 UTC

[jira] [Commented] (NIFI-7930) QueryRecord fails with RPATH on arrays

    [ https://issues.apache.org/jira/browse/NIFI-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18061701#comment-18061701 ] 

Daniel Stieglitz commented on NIFI-7930:
----------------------------------------

[~pvillard] I know this ticket a bit old but now running this unit test in 2.8, I am getting a different error and that is
 
{code:java}
[pool-23-thread-1] INFO org.apache.nifi.processors.standard.QueryRecord - QueryRecord[id=ffd8b0c4-05a4-4784-89fc-80b1c4f225e6] Successfully queried FlowFile[0,fields-value-name.json,413B] in 30 millis   org.opentest4j.AssertionFailedError: Expected all Transferred FlowFiles to go to success but 1 were routed to original   at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:42) at org.junit.jupiter.api.Assertions.fail(Assertions.java:143) at org.apache.nifi.util.MockProcessSession.assertAllFlowFilesTransferred(MockProcessSession.java:1361) at org.apache.nifi.util.MockProcessSession.assertAllFlowFilesTransferred(MockProcessSession.java:1346) at org.apache.nifi.util.StandardProcessorTestRunner.assertAllFlowFilesTransferred(StandardProcessorTestRunner.java:324) at org.apache.nifi.util.StandardProcessorTestRunner.assertAllFlowFilesTransferred(StandardProcessorTestRunner.java:337) at org.apache.nifi.processors.standard.TestQueryRecord.testRecordPathWithArrayWithJSONReaderWriter(TestQueryRecord.java:1448){code}
 

> QueryRecord fails with RPATH on arrays
> --------------------------------------
>
>                 Key: NIFI-7930
>                 URL: https://issues.apache.org/jira/browse/NIFI-7930
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Pierre Villard
>            Priority: Major
>
> When executing QueryRecord using a query with RPATH on arrays like the one provided in the additional details of the processor's documentation, it fails with the following stack trace:
> {noformat}
> 2793 [pool-1-thread-1] ERROR org.apache.nifi.processors.standard.QueryRecord - QueryRecord[id=56b8b985-0609-4e52-9124-1bcbbbb8afab] Unable to query FlowFile[0,fields-value-name.json,465B] due to java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.List: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.List
> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.List
> 	at Baz$1$1.moveNext(Unknown Source)
> 	at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.<init>(Linq4j.java:675)
> 	at org.apache.calcite.linq4j.Linq4j.enumeratorIterator(Linq4j.java:95)
> 	at org.apache.calcite.linq4j.AbstractEnumerable.iterator(AbstractEnumerable.java:33)
> 	at org.apache.calcite.avatica.MetaImpl.createCursor(MetaImpl.java:82)
> 	at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184)
> 	at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64)
> 	at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43)
> 	at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:573)
> 	at org.apache.calcite.avatica.AvaticaPreparedStatement.executeQuery(AvaticaPreparedStatement.java:137)
> 	at org.apache.nifi.processors.standard.QueryRecord.query(QueryRecord.java:465)
> 	at org.apache.nifi.processors.standard.QueryRecord.onTrigger(QueryRecord.java:320)
> 	at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> 	at org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:270)
> 	at org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:264)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 	at java.lang.Thread.run(Thread.java:748) {noformat}
> A unit test reproducing the issue is available here:
> [https://github.com/pvillard31/nifi/commit/1016b4a540fab22bcad119e7ffe2363b99c07a0c]
> I didn't get the time/opportunity to work on a fix for this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)