Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2122#discussion_r138635543
--- Diff:
nifi-commons/nifi-record-path/src/main/java/org/apache/nifi/record/path/paths/WildcardIndexPath.java
---
@@ -67,7 +67,9 @@
return IntStream.range(0, array.length)
.mapToObj(index -> {
final DataType elementDataType =
((ArrayDataType) fieldValue.getField().getDataType()).getElementType();
- final RecordField elementField = new
RecordField(fieldValue.getField().getFieldName() + "[" + index + "]",
elementDataType);
+ final RecordField elementField =
elementDataType.getFieldType() == RecordFieldType.RECORD
--- End diff --
@pvillard31 can you help me to understand why we're doing this? If it is a
record then we include the index in the name but otherwise we don't -- why not
always include the index in the name?
---