Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2122#discussion_r138090059
--- Diff:
nifi-commons/nifi-record-path/src/main/java/org/apache/nifi/record/path/paths/WildcardIndexPath.java
---
@@ -65,9 +65,13 @@
} else {
final Object[] array = (Object[]) value;
return IntStream.range(0, array.length)
+ .filter(index -> array[index] != null
+ || (((ArrayDataType)
fieldValue.getField().getDataType()).getElementType()).getFieldType() !=
RecordFieldType.RECORD)
--- End diff --
@pvillard31 I think this still is not exactly what we need. Even a null
record should be returned when given a Wildcard. I contend that in all cases we
should return the array value, null or otherwise. I think perhaps the issue
that you're hitting is not related to WildcardIndexPath but rather ChildPath /
DescendantPath.
---