exceptionfactory commented on code in PR #6757: URL: https://github.com/apache/nifi/pull/6757#discussion_r1041048312
########## nifi-nar-bundles/nifi-parquet-bundle/nifi-parquet-processors/src/test/java/org/apache/nifi/processors/parquet/TestConvertAvroToParquet.java: ########## @@ -228,8 +230,17 @@ public void testData() throws Exception { assertEquals(firstRecord.getGroup("myarray",0).getGroup("list",1).getInteger("element", 0), 2); // Map - assertEquals(firstRecord.getGroup("mymap",0).getGroup("key_value",0).getInteger("value", 0), 1); - assertEquals(firstRecord.getGroup("mymap",0).getGroup("key_value",1).getInteger("value", 0), 2); + String key1 = firstRecord.getGroup("mymap",0).getGroup("key_value",0).getValueToString(0,0); + String key2 = firstRecord.getGroup("mymap",0).getGroup("key_value",1).getValueToString(0,0); + int v1 = firstRecord.getGroup("mymap",0).getGroup("key_value",0).getInteger("value", 0); + int v2 = firstRecord.getGroup("mymap",0).getGroup("key_value",1).getInteger("value", 0); + Map<String,Integer> recordData = new LinkedHashMap<String,Integer>(); + recordData.put(key1,v1); + recordData.put(key2,v2); + Map<String,Integer> inputData = new HashMap<String,Integer>(); + inputData.put("a",1); + inputData.put("b",2); + assertEquals(inputData, recordData); Review Comment: Can this be simplified to the following? ```suggestion int v1 = firstRecord.getGroup("mymap",0).getGroup("key_value",0).getInteger("value", 0); int v2 = firstRecord.getGroup("mymap",0).getGroup("key_value",1).getInteger("value", 0); assertEquals(1, v1); assertEquals(2, v2); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org