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

ASF subversion and git services commented on NIFI-15981:
--------------------------------------------------------

Commit b91637fdeab23a024c20fab6f0bbf3e0a9767066 in nifi's branch 
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b91637fdeab ]

NIFI-15981 - Fix NPE in ResultSetRecordSet for ARRAY columns when no reader 
schema is provided (#11298)


Signed-off-by: Peter Turcsanyi <[email protected]>

> ClickHouse - LookupRecord fails when trying to return Array(String)
> -------------------------------------------------------------------
>
>                 Key: NIFI-15981
>                 URL: https://issues.apache.org/jira/browse/NIFI-15981
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Jordan Sammut
>            Assignee: Pierre Villard
>            Priority: Critical
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I have the following view in ClickHouse (Cloud):
> {code:java}
> CREATE OR REPLACE VIEW marts.dim_client
> AS SELECT
>        client_name,
>        max(updated_at) AS updated_at,
>        argMaxIfMerge(is_enabled) AS is_enabled,
>        nullIf(argMaxIfMerge(license), '<Empty>') AS license,
>        nullIf(argMaxIfMerge(client_group), '<Empty>') AS client_group,
>        nullIf(argMaxIfMerge(platform), '<Empty>') AS platform,
>        nullIf(argMaxIfMerge(reporting_currency), '<Empty>') AS 
> reporting_currency,
>        ['Test'] AS enabled_products
>    FROM marts._dim_client
>    GROUP BY client_name; {code}
> When setting up a lookup service to make use of this and include the 
> enabled_products, the LookupRecord returns this error:
> {code:java}
> LookupRecord[id=33edff77-c78b-367d-aafe-ebc375757016] Could not determine 
> schema to use for enriched FlowFiles: java.lang.NullPointerException: Cannot 
> invoke "org.apache.nifi.serialization.record.RecordSchema.getField(String)" 
> because "readerSchema" is null {code}
> The reader utilized is set to infer the schema, and it should be able to from 
> the result returned. When removing the field from the returned fields, the 
> Lookup works well



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

Reply via email to