kkhatua commented on a change in pull request #1483: DRILL-3988: Expose Drill 
built-in functions & UDFs  in a system table
URL: https://github.com/apache/drill/pull/1483#discussion_r224535223
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/expr/fn/registry/FunctionRegistryHolderTest.java
 ##########
 @@ -155,6 +162,47 @@ public void testGetAllJarNames() {
     compareTwoLists(expectedResult, registryHolder.getAllJarNames());
   }
 
+  @Test
+  public void testGetAllJarsWithFunctionHolders() {
+    Map<String, List<FunctionHolder>> fnHoldersInRegistry = 
registryHolder.getAllJarsWithFunctionHolders();
+    //Iterate and confirm lists are same
+    for (String jarName : newJars.keySet()) {
+      List<DrillFuncHolder> expectedHolderList = newJars.get(jarName).stream()
+          .map(FunctionHolder::getHolder) //Extract DrillFuncHolder
+          .collect(Collectors.toList());
+      List<DrillFuncHolder> testHolderList = 
fnHoldersInRegistry.get(jarName).stream()
+          .map(FunctionHolder::getHolder) //Extract DrillFuncHolder
+          .collect(Collectors.toList());
+
+      compareTwoLists(expectedHolderList, testHolderList);
+    }
+
+    Map<String, String> shuffleFunctionMap = new HashMap<>();
+    // Confirm that same function spans multiple jars with different signatures
+    //Init: Expected Map of items
+    for (String jarName : newJars.keySet()) {
+      for (FunctionHolder funcHolder : newJars.get(jarName)) {
+        if (funcHolder.getName().equals(SHUFFLE_FUNC_NAME)) {
 
 Review comment:
   👍 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to