suneet-s commented on a change in pull request #9384: Add join prefix 
duplicate/shadowing check
URL: https://github.com/apache/druid/pull/9384#discussion_r382873381
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/segment/join/Joinables.java
 ##########
 @@ -114,4 +118,37 @@ public static boolean isPrefixedBy(final String 
columnName, final String prefix)
       );
     }).collect(Collectors.toList());
   }
+
+  public static void checkPreJoinableClausesForDuplicatesAndShadowing(
+      final List<PreJoinableClause> preJoinableClauses
+  )
+  {
+    List<String> prefixes = new ArrayList<>();
+    for (PreJoinableClause clause : preJoinableClauses) {
+      prefixes.add(clause.getPrefix());
+    }
+
+    checkPrefixesForDuplicatesAndShadowing(prefixes);
 
 Review comment:
   I think this should use a Trie of some sort here so the complexity isn't `n 
+ n^2 * k`
   
   I don't know the best data structure to use here off the top of my head, but 
I can search. How many clauses is reasonable - if it's just 5, this may not 
matter in the big picture?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to