@@ -109,16 +109,14 @@ public static Optional<String> getFilterClause(TupleDomain<ColumnHandle> tupleDo
109109 ImmutableList .Builder <String > conjunctsBuilder = ImmutableList .builder ();
110110 checkState ((forHavingClause && timePredicate .isEmpty ()) || !forHavingClause , "Unexpected time predicate with having clause" );
111111 timePredicate .ifPresent (conjunctsBuilder ::add );
112- if (!tupleDomain .equals (TupleDomain .all ())) {
113- Map <ColumnHandle , Domain > domains = tupleDomain .getDomains ().orElseThrow ();
114- for (Map .Entry <ColumnHandle , Domain > entry : domains .entrySet ()) {
115- PinotColumnHandle pinotColumnHandle = (PinotColumnHandle ) entry .getKey ();
116- // If this is for a having clause, only include aggregate columns.
117- // If this is for a where clause, only include non-aggregate columns.
118- // i.e. (forHavingClause && isAggregate) || (!forHavingClause && !isAggregate)
119- if (forHavingClause == pinotColumnHandle .isAggregate ()) {
120- toPredicate (pinotColumnHandle , entry .getValue ()).ifPresent (conjunctsBuilder ::add );
121- }
112+ Map <ColumnHandle , Domain > domains = tupleDomain .getDomains ().orElseThrow ();
113+ for (Map .Entry <ColumnHandle , Domain > entry : domains .entrySet ()) {
114+ PinotColumnHandle pinotColumnHandle = (PinotColumnHandle ) entry .getKey ();
115+ // If this is for a having clause, only include aggregate columns.
116+ // If this is for a where clause, only include non-aggregate columns.
117+ // i.e. (forHavingClause && isAggregate) || (!forHavingClause && !isAggregate)
118+ if (forHavingClause == pinotColumnHandle .isAggregate ()) {
119+ toPredicate (pinotColumnHandle , entry .getValue ()).ifPresent (conjunctsBuilder ::add );
122120 }
123121 }
124122 List <String > conjuncts = conjunctsBuilder .build ();
0 commit comments