You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "endzeit (Jira)" <ji...@apache.org> on 2024/08/07 18:48:00 UTC
[jira] [Created] (NIFI-13643) mapOf returns a Record instead of the declared RecordFieldType.MAP
endzeit created NIFI-13643:
------------------------------
Summary: mapOf returns a Record instead of the declared RecordFieldType.MAP
Key: NIFI-13643
URL: https://issues.apache.org/jira/browse/NIFI-13643
Project: Apache NiFi
Issue Type: Bug
Reporter: endzeit
The Record Path standalone function {{mapOf}} introduced in NIFI-12538 returns a [Record|https://github.com/apache/nifi/blob/main/nifi-commons/nifi-record/src/main/java/org/apache/nifi/serialization/record/Record.java] (in the form of a [MapRecord|https://github.com/apache/nifi/blob/main/nifi-commons/nifi-record/src/main/java/org/apache/nifi/serialization/record/MapRecord.java]).
At the same time it declares the {{RecordFieldType}} of the {{RecordField}} returnes, as the function name might suggest, as
{code:java}
RecordFieldType.MAP.getMapDataType(RecordFieldType.STRING.getDataType())
{code}
The implementation should be adjusted to instead return a {{RecordField}} with a {{Map<String, String}} value to align with the declared schema.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)