[ 
https://issues.apache.org/jira/browse/DRILL-7115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807612#comment-16807612
 ] 

ASF GitHub Bot commented on DRILL-7115:
---------------------------------------

ihuzenko commented on pull request #1706: DRILL-7115: Improve Hive schema show 
tables performance
URL: https://github.com/apache/drill/pull/1706#discussion_r271222800
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaFilter.java
 ##########
 @@ -206,11 +203,11 @@ private Result evaluateHelperFunction(Map<String, 
String> recordValues, Function
 
         for(ExprNode arg : exprNode.args) {
           Result exprResult = evaluateHelper(recordValues, arg);
-          if (exprResult == Result.FALSE) {
-            return exprResult;
-          }
-          if (exprResult == Result.INCONCLUSIVE) {
-            result = Result.INCONCLUSIVE;
+          switch (exprResult) {
 
 Review comment:
   Suggested change will break the logic, here is a loop and when invocation of 
```evaluateHelper(recordValues, arg)``` returned ```Result.INCONCLUSIVE``` once 
it's still a chance that next iteration will return false I guess. Previously 
here was the chunk:
   ```java
           for(ExprNode arg : exprNode.args) {
             Result exprResult = evaluateHelper(recordValues, arg);
             if (exprResult == Result.FALSE) {
               return exprResult;
             }
             if (exprResult == Result.INCONCLUSIVE) {
               result = Result.INCONCLUSIVE;
             }
           }
   ```
   I see that my change made it more confusing, so I'll revert it back. 
 
----------------------------------------------------------------
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:
us...@infra.apache.org


> Improve Hive schema show tables performance
> -------------------------------------------
>
>                 Key: DRILL-7115
>                 URL: https://issues.apache.org/jira/browse/DRILL-7115
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - Hive, Storage - Information Schema
>    Affects Versions: 1.15.0
>            Reporter: Igor Guzenko
>            Assignee: Igor Guzenko
>            Priority: Major
>             Fix For: 1.16.0
>
>
> In Sqlline(Drill), "show tables" on a Hive schema is taking nearly 15mins to 
> 20mins. The schema has nearly ~8000 tables.
> Whereas the same in beeline(Hive) is throwing the result in a split second(~ 
> 0.2 secs).
> I tested the same in my test cluster by creating 6000 tables(empty!) in Hive 
> and then doing "show tables" in Drill. It took more than 2 mins(~140 secs).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to