Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2778#discussion_r194242453
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongoRecord.java
---
@@ -154,4 +154,28 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
}
session.commit();
}
+
+ private Document convertArrays(Document doc) {
+ Document retVal = new Document();
+ for (Map.Entry<String, Object> entry : doc.entrySet()) {
+ if (entry.getValue() != null &&
entry.getValue().getClass().isArray()) {
+ List items = new ArrayList();
+ Object[] values = (Object[])entry.getValue();
+ for (int index = 0; index < values.length; index++) {
--- End diff --
I just made a change that passes validation with the original schema and
that theoretically supports nested arrays. Thing is, from what I can tell you
can't even express this in Avro:
```
{
"arrayTest": [
[[0,1], [2,3]]
]
}
```
---