vdiravka commented on a change in pull request #1706: DRILL-7115: Improve Hive 
schema show tables performance
URL: https://github.com/apache/drill/pull/1706#discussion_r267937301
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java
 ##########
 @@ -275,29 +274,14 @@ public void dropTable(String tableName) {
         .build(logger);
   }
 
-  /**
-   * Get the collection of {@link Table} tables specified in the tableNames 
with bulk-load (if the underlying storage
-   * plugin supports).
-   * It is not guaranteed that the retrieved tables would have RowType and 
Statistic being fully populated.
-   *
-   * Specifically, calling {@link 
Table#getRowType(org.apache.calcite.rel.type.RelDataTypeFactory)} or {@link 
Table#getStatistic()} might incur
-   * {@link UnsupportedOperationException} being thrown.
-   *
-   * @param  tableNames the requested tables, specified by the table names
-   * @return the collection of requested tables
-   */
-  public List<Pair<String, ? extends Table>> getTablesByNamesByBulkLoad(final 
List<String> tableNames, int bulkSize) {
-    return getTablesByNames(tableNames);
-  }
-
   /**
    * Get the collection of {@link Table} tables specified in the tableNames.
    *
-   * @param  tableNames the requested tables, specified by the table names
+   * @param  tableNames the requested tables, specified by the table 
namesbulkSize
    * @return the collection of requested tables
    */
   public List<Pair<String, ? extends Table>> getTablesByNames(final 
List<String> tableNames) {
-    final List<Pair<String, ? extends Table>> tables = Lists.newArrayList();
+    final List<Pair<String, ? extends Table>> tables = new 
ArrayList<>(tableNames.size());
     for (String tableName : tableNames) {
 
 Review comment:
   ```
       return tableNames.stream()
           // Schema may return NULL for table if the query user doesn't have 
permissions to load the table. Ignore such
           // tables as INFO SCHEMA is about showing tables which the use has 
access to query.
           .map(tableName -> Pair.of(tableName, getTable(tableName)))
           .filter(pair -> Objects.nonNull(pair.getRight()))
           .collect(Collectors.toList());
   ```

----------------------------------------------------------------
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

Reply via email to