From bd1cff24a21e2c14ce55955eb0135363e753b851 Mon Sep 17 00:00:00 2001 From: Suneet Saldanha <44787917+suneet-s@users.noreply.github.com> Date: Fri, 10 Apr 2020 10:41:29 -0700 Subject: [PATCH] Remove no-op assert statement in ClientQuerySegmentWalker (#9607) * Remove no-op assert statement The assert statement in ClientQuerySegmentWalker will always be true because of the preceeding while loop which has the same condition. This change removes dead code to fix an error reported by LGTM * Suppress lgtm * cleanup whitespace --- .../java/org/apache/druid/server/ClientQuerySegmentWalker.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/main/java/org/apache/druid/server/ClientQuerySegmentWalker.java b/server/src/main/java/org/apache/druid/server/ClientQuerySegmentWalker.java index c3379bab021..fa35ff7b8a9 100644 --- a/server/src/main/java/org/apache/druid/server/ClientQuerySegmentWalker.java +++ b/server/src/main/java/org/apache/druid/server/ClientQuerySegmentWalker.java @@ -274,8 +274,7 @@ public class ClientQuerySegmentWalker implements QuerySegmentWalker current = Iterables.getOnlyElement(current.getChildren()); } - assert !(current instanceof QueryDataSource); - + assert !(current instanceof QueryDataSource); // lgtm [java/contradictory-type-checks] current = inlineIfNecessary(current, null, subqueryRowLimitAccumulator, maxSubqueryRows, dryRun); while (!stack.isEmpty()) {