drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] ihuzenko commented on a change in pull request #1829: DRILL-7096: Develop vector for canonical Map<K, V>
Date Mon, 02 Sep 2019 11:58:26 GMT
ihuzenko commented on a change in pull request #1829: DRILL-7096: Develop vector for canonical
Map<K,V>
URL: https://github.com/apache/drill/pull/1829#discussion_r319898307
 
 

 ##########
 File path: logical/src/main/java/org/apache/drill/common/expression/SchemaPath.java
 ##########
 @@ -74,6 +74,26 @@ public static SchemaPath getCompoundPath(String... strings) {
     return new SchemaPath(s);
   }
 
+  /**
+   * Constructs {@code SchemaPath} based on given {@code path} array up to {@literal n}th
element (inclusively).
+   *
+   * Example: for case when {@code n = 2} and {@code path = {"a", "b", "c", "d", "e", ...}}
+   * the method returns {@code a.b}
+   *
+   * @param n number of elements in {@literal path} array to take when constructing {@code
SchemaPath}
+   * @param path column path used to construct schema path
+   * @return schema path containing {@literal n - 1} children
+   */
+  public static SchemaPath getCompoundPath(int n, String... path) {
 
 Review comment:
   This is cool that you added more flexible method, now method above with signature ```public
static SchemaPath getCompoundPath(String... strings)``` may be rewritten to : 
   ```java
     public static SchemaPath getCompoundPath(String... strings) {
       return getCompoundPath(strings.length, strings);
     }
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message