diff --git a/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTimelineTest.java b/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTimelineTest.java index 14a52cbfcad..a66873329ae 100644 --- a/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTimelineTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTimelineTest.java @@ -53,7 +53,7 @@ import io.druid.java.util.common.DateTimes; import io.druid.java.util.common.Intervals; import io.druid.java.util.common.JodaUtils; import io.druid.query.aggregation.LongSumAggregatorFactory; -import io.druid.query.filter.NoopDimFilter; +import io.druid.query.filter.TrueDimFilter; import io.druid.segment.IndexIO; import io.druid.segment.IndexMergerV9; import io.druid.segment.IndexSpec; @@ -350,7 +350,7 @@ public class IngestSegmentFirehoseFactoryTimelineTest final IngestSegmentFirehoseFactory factory = new IngestSegmentFirehoseFactory( DATA_SOURCE, testCase.interval, - new NoopDimFilter(), + new TrueDimFilter(), Arrays.asList(DIMENSIONS), Arrays.asList(METRICS), INDEX_IO diff --git a/processing/src/main/java/io/druid/query/filter/DimFilterUtils.java b/processing/src/main/java/io/druid/query/filter/DimFilterUtils.java index 337a5819cdc..fb3e691c7b1 100644 --- a/processing/src/main/java/io/druid/query/filter/DimFilterUtils.java +++ b/processing/src/main/java/io/druid/query/filter/DimFilterUtils.java @@ -36,7 +36,6 @@ import java.util.Set; */ public class DimFilterUtils { - static final byte NOOP_CACHE_ID = -0x4; static final byte SELECTOR_CACHE_ID = 0x0; static final byte AND_CACHE_ID = 0x1; static final byte OR_CACHE_ID = 0x2; diff --git a/processing/src/main/java/io/druid/query/filter/NoopDimFilter.java b/processing/src/main/java/io/druid/query/filter/NoopDimFilter.java deleted file mode 100644 index 86041a877f1..00000000000 --- a/processing/src/main/java/io/druid/query/filter/NoopDimFilter.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to Metamarkets Group Inc. (Metamarkets) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Metamarkets licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package io.druid.query.filter; - -import com.google.common.collect.RangeSet; - -import java.nio.ByteBuffer; -import java.util.HashSet; - -/** - */ -public class NoopDimFilter implements DimFilter -{ - @Override - public byte[] getCacheKey() - { - return ByteBuffer.allocate(1).put(DimFilterUtils.NOOP_CACHE_ID).array(); - } - - @Override - public DimFilter optimize() - { - return this; - } - - @Override - public Filter toFilter() - { - return null; - } - - @Override - public RangeSet getDimensionRangeSet(String dimension) - { - return null; - } - - @Override - public HashSet getRequiredColumns() - { - return null; - } -} diff --git a/processing/src/main/java/io/druid/query/filter/TrueDimFilter.java b/processing/src/main/java/io/druid/query/filter/TrueDimFilter.java index 5294bfda573..23fff788eb3 100644 --- a/processing/src/main/java/io/druid/query/filter/TrueDimFilter.java +++ b/processing/src/main/java/io/druid/query/filter/TrueDimFilter.java @@ -23,11 +23,14 @@ import com.google.common.collect.RangeSet; import io.druid.segment.filter.TrueFilter; import java.nio.ByteBuffer; +import java.util.HashSet; /** */ public class TrueDimFilter implements DimFilter { + private static HashSet REQUIRED_COLUMNS = new HashSet<>(); + @Override public byte[] getCacheKey() { @@ -51,4 +54,10 @@ public class TrueDimFilter implements DimFilter { return null; } + + @Override + public HashSet getRequiredColumns() + { + return REQUIRED_COLUMNS; + } }