From a86b02635a6089d16a3830cf2adaecc1d6080c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Wed, 23 Oct 2013 22:02:06 -0700 Subject: [PATCH] remove DimensionSelectorFactory --- .../druid/segment/ColumnSelectorFactory.java | 1 + .../main/java/io/druid/segment/Cursor.java | 2 +- .../segment/DimensionSelectorFactory.java | 25 ------------------- .../segment/incremental/IncrementalIndex.java | 7 ++++++ 4 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 processing/src/main/java/io/druid/segment/DimensionSelectorFactory.java diff --git a/processing/src/main/java/io/druid/segment/ColumnSelectorFactory.java b/processing/src/main/java/io/druid/segment/ColumnSelectorFactory.java index df00a592b33..1e640591499 100644 --- a/processing/src/main/java/io/druid/segment/ColumnSelectorFactory.java +++ b/processing/src/main/java/io/druid/segment/ColumnSelectorFactory.java @@ -24,6 +24,7 @@ package io.druid.segment; */ public interface ColumnSelectorFactory { + public DimensionSelector makeDimensionSelector(String dimensionName); public FloatColumnSelector makeFloatColumnSelector(String columnName); public ObjectColumnSelector makeObjectColumnSelector(String columnName); } diff --git a/processing/src/main/java/io/druid/segment/Cursor.java b/processing/src/main/java/io/druid/segment/Cursor.java index 2ccf03827ff..42ed6b337af 100644 --- a/processing/src/main/java/io/druid/segment/Cursor.java +++ b/processing/src/main/java/io/druid/segment/Cursor.java @@ -21,7 +21,7 @@ package io.druid.segment;import org.joda.time.DateTime; /** */ -public interface Cursor extends ColumnSelectorFactory, DimensionSelectorFactory +public interface Cursor extends ColumnSelectorFactory { public DateTime getTime(); public void advance(); diff --git a/processing/src/main/java/io/druid/segment/DimensionSelectorFactory.java b/processing/src/main/java/io/druid/segment/DimensionSelectorFactory.java deleted file mode 100644 index b4a1f8ca2fb..00000000000 --- a/processing/src/main/java/io/druid/segment/DimensionSelectorFactory.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Druid - a distributed column store. - * Copyright (C) 2012, 2013 Metamarkets Group Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package io.druid.segment;/** - */ -public interface DimensionSelectorFactory -{ - public DimensionSelector makeDimensionSelector(String dimensionName); -} diff --git a/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java b/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java index dfdd83dab76..4f6c6016088 100644 --- a/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java +++ b/processing/src/main/java/io/druid/segment/incremental/IncrementalIndex.java @@ -42,6 +42,7 @@ import io.druid.query.aggregation.Aggregator; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.segment.ColumnSelectorFactory; +import io.druid.segment.DimensionSelector; import io.druid.segment.FloatColumnSelector; import io.druid.segment.ObjectColumnSelector; import io.druid.segment.serde.ComplexMetricExtractor; @@ -256,6 +257,12 @@ public class IncrementalIndex implements Iterable } }; } + + @Override + public DimensionSelector makeDimensionSelector(String dimension) { + // we should implement this, but this is going to be rewritten soon anyways + throw new UnsupportedOperationException("Incremental index aggregation does not support dimension selectors"); + } } ); }