From 70f489098acc94d9e1af1aa05c35e2dfe01198c6 Mon Sep 17 00:00:00 2001 From: Padma Penumarthy Date: Wed, 15 Nov 2017 20:31:23 -0800 Subject: [PATCH] DRILL-5972: Slow performance for query on INFORMATION_SCHEMA.TABLE --- .../drill/exec/store/ischema/InfoSchemaFilter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaFilter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaFilter.java index 6d4d8ceed41..92464e740fd 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaFilter.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaFilter.java @@ -202,14 +202,19 @@ private Result evaluateHelperFunction(Map recordValues, Function // If at least one arg returns FALSE, then the AND function value is FALSE // If at least one arg returns INCONCLUSIVE, then the AND function value is INCONCLUSIVE // If all args return TRUE, then the AND function value is TRUE + Result result = Result.TRUE; + for(ExprNode arg : exprNode.args) { Result exprResult = evaluateHelper(recordValues, arg); - if (exprResult != Result.TRUE) { + if (exprResult == Result.FALSE) { return exprResult; } + if (exprResult == Result.INCONCLUSIVE) { + result = Result.INCONCLUSIVE; + } } - return Result.TRUE; + return result; } case "in": {