diff --git a/benchmarks/src/test/java/org/apache/druid/benchmark/compression/BaseColumnarLongsBenchmark.java b/benchmarks/src/test/java/org/apache/druid/benchmark/compression/BaseColumnarLongsBenchmark.java
index f912f5e70b29..1a6fc81e4eb8 100644
--- a/benchmarks/src/test/java/org/apache/druid/benchmark/compression/BaseColumnarLongsBenchmark.java
+++ b/benchmarks/src/test/java/org/apache/druid/benchmark/compression/BaseColumnarLongsBenchmark.java
@@ -304,9 +304,7 @@ static int encodeToFile(long[] vals, String encoding, FileChannel output)throws
}
serializer.open();
- for (long val : vals) {
- serializer.add(val);
- }
+ serializer.addAll(vals, 0, vals.length);
serializer.writeTo(output, null);
return (int) serializer.getSerializedSize();
}
diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/CompactionTaskTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/CompactionTaskTest.java
index 134f5305169d..ae6babe76618 100644
--- a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/CompactionTaskTest.java
+++ b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/CompactionTaskTest.java
@@ -907,7 +907,7 @@ public void testSegmentProviderFindSegmentsWithEmptySegmentsThrowException()
);
provider.checkSegments(LockGranularity.TIME_CHUNK, ImmutableList.of());
}
-
+
@Test
public void testCreateIngestionSchema() throws IOException
{
@@ -2033,14 +2033,6 @@ private static class TestIndexIO extends IndexIO
}
}
- final Metadata metadata = new Metadata(
- null,
- aggregatorFactories.toArray(new AggregatorFactory[0]),
- null,
- null,
- null
- );
-
queryableIndexMap.put(
entry.getValue(),
new SimpleQueryableIndex(
@@ -2049,9 +2041,21 @@ private static class TestIndexIO extends IndexIO
null,
columnMap,
null,
- metadata,
false
)
+ {
+ @Override
+ public Metadata getMetadata()
+ {
+ return new Metadata(
+ null,
+ aggregatorFactories.toArray(new AggregatorFactory[0]),
+ null,
+ null,
+ null
+ );
+ }
+ }
);
}
}
@@ -2074,10 +2078,15 @@ void removeMetadata(File file)
index.getBitmapFactoryForDimensions(),
index.getColumns(),
index.getFileMapper(),
- null,
false
)
- );
+ {
+ @Override
+ public Metadata getMetadata()
+ {
+ return null;
+ }
+ });
}
}
diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/SemanticCreator.java b/processing/src/main/java/org/apache/druid/common/semantic/SemanticCreator.java
similarity index 84%
rename from processing/src/main/java/org/apache/druid/query/rowsandcols/SemanticCreator.java
rename to processing/src/main/java/org/apache/druid/common/semantic/SemanticCreator.java
index bb1af0e4d9f1..0142b3e8ed0a 100644
--- a/processing/src/main/java/org/apache/druid/query/rowsandcols/SemanticCreator.java
+++ b/processing/src/main/java/org/apache/druid/common/semantic/SemanticCreator.java
@@ -17,7 +17,9 @@
* under the License.
*/
-package org.apache.druid.query.rowsandcols;
+package org.apache.druid.common.semantic;
+
+import org.apache.druid.query.rowsandcols.RowsAndColumns;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -26,8 +28,8 @@
/**
* Annotation used to indicate that the method is used as a creator for a semantic interface.
- *
- * Used in conjuction with {@link RowsAndColumns#makeAsMap(Class)} to build maps for simplified implementation of
+ *
+ * Used in conjuction with {@link SemanticUtils#makeAsMap(Class)} to build maps for simplified implementation of
* the {@link RowsAndColumns#as(Class)} method.
*/
@Retention(RetentionPolicy.RUNTIME)
diff --git a/processing/src/main/java/org/apache/druid/common/semantic/SemanticUtils.java b/processing/src/main/java/org/apache/druid/common/semantic/SemanticUtils.java
new file mode 100644
index 000000000000..4424b5fcccc7
--- /dev/null
+++ b/processing/src/main/java/org/apache/druid/common/semantic/SemanticUtils.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF 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 org.apache.druid.common.semantic;
+
+import org.apache.druid.error.DruidException;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.function.Function;
+
+public class SemanticUtils
+{
+ private static final Map, Map, Function, ?>>> OVERRIDES = new LinkedHashMap<>();
+
+ /**
+ * Allows the registration of overrides, which allows overriding of already existing mappings.
+ * This allows extensions to register mappings.
+ */
+ @SuppressWarnings("unused")
+ public static void registerAsOverride(Class clazz, Class asInterface, Function fn)
+ {
+ final Map, Function, ?>> classOverrides = OVERRIDES.computeIfAbsent(
+ clazz,
+ theClazz -> new LinkedHashMap<>()
+ );
+
+ final Function, ?> oldVal = classOverrides.get(asInterface);
+ if (oldVal != null) {
+ throw DruidException.defensive(
+ "Attempt to side-override the same interface [%s] multiple times for the same class [%s].",
+ asInterface,
+ clazz
+ );
+ } else {
+ classOverrides.put(asInterface, fn);
+ }
+ }
+
+ public static Map, Function> makeAsMap(Class clazz)
+ {
+ final Map, Function> retVal = new HashMap<>();
+
+ for (Method method : clazz.getMethods()) {
+ if (method.isAnnotationPresent(SemanticCreator.class)) {
+ if (method.getParameterCount() != 0) {
+ throw DruidException.defensive("Method [%s] annotated with SemanticCreator was not 0-argument.", method);
+ }
+
+ retVal.put(method.getReturnType(), arg -> {
+ try {
+ return method.invoke(arg);
+ }
+ catch (InvocationTargetException | IllegalAccessException e) {
+ throw DruidException.defensive().build(e, "Problem invoking method [%s]", method);
+ }
+ });
+ }
+ }
+
+ final Map, Function, ?>> classOverrides = OVERRIDES.get(clazz);
+ if (classOverrides != null) {
+ for (Map.Entry, Function, ?>> overrideEntry : classOverrides.entrySet()) {
+ //noinspection unchecked
+ retVal.put(overrideEntry.getKey(), (Function) overrideEntry.getValue());
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/processing/src/main/java/org/apache/druid/error/DruidException.java b/processing/src/main/java/org/apache/druid/error/DruidException.java
index a04f3f6512cf..f4cc3065c7f6 100644
--- a/processing/src/main/java/org/apache/druid/error/DruidException.java
+++ b/processing/src/main/java/org/apache/druid/error/DruidException.java
@@ -176,6 +176,17 @@ public static DruidException defensive(String format, Object... args)
return defensive().build(format, args);
}
+ /**
+ * Build a "defensive" exception, this is an exception that should never actually be triggered, but we are
+ * throwing it inside a defensive check.
+ *
+ * @return A builder for a defensive exception.
+ */
+ public static DruidException defensive(Throwable cause, String format, Object... args)
+ {
+ return defensive().build(cause, format, args);
+ }
+
/**
* Build a "defensive" exception, this is an exception that should never actually be triggered. Throw to
* allow messages to be seen by developers
diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/ArrayListRowsAndColumns.java b/processing/src/main/java/org/apache/druid/query/rowsandcols/ArrayListRowsAndColumns.java
index 6f5460095113..14b6f8a851a4 100644
--- a/processing/src/main/java/org/apache/druid/query/rowsandcols/ArrayListRowsAndColumns.java
+++ b/processing/src/main/java/org/apache/druid/query/rowsandcols/ArrayListRowsAndColumns.java
@@ -23,6 +23,8 @@
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntComparator;
import it.unimi.dsi.fastutil.ints.IntList;
+import org.apache.druid.common.semantic.SemanticCreator;
+import org.apache.druid.common.semantic.SemanticUtils;
import org.apache.druid.java.util.common.ISE;
import org.apache.druid.java.util.common.guava.Sequences;
import org.apache.druid.query.operator.ColumnWithDirection;
@@ -73,7 +75,7 @@
public class ArrayListRowsAndColumns implements AppendableRowsAndColumns
{
@SuppressWarnings("rawtypes")
- private static final Map, Function> AS_MAP = RowsAndColumns
+ private static final Map, Function> AS_MAP = SemanticUtils
.makeAsMap(ArrayListRowsAndColumns.class);
private final ArrayList rows;
diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/LazilyDecoratedRowsAndColumns.java b/processing/src/main/java/org/apache/druid/query/rowsandcols/LazilyDecoratedRowsAndColumns.java
index 0dae40467f3f..ce199a7803c5 100644
--- a/processing/src/main/java/org/apache/druid/query/rowsandcols/LazilyDecoratedRowsAndColumns.java
+++ b/processing/src/main/java/org/apache/druid/query/rowsandcols/LazilyDecoratedRowsAndColumns.java
@@ -20,6 +20,8 @@
package org.apache.druid.query.rowsandcols;
import com.google.common.collect.ImmutableList;
+import org.apache.druid.common.semantic.SemanticCreator;
+import org.apache.druid.common.semantic.SemanticUtils;
import org.apache.druid.frame.Frame;
import org.apache.druid.frame.allocation.ArenaMemoryAllocatorFactory;
import org.apache.druid.frame.key.KeyColumn;
@@ -66,7 +68,7 @@
public class LazilyDecoratedRowsAndColumns implements RowsAndColumns
{
- private static final Map, Function> AS_MAP = RowsAndColumns
+ private static final Map, Function> AS_MAP = SemanticUtils
.makeAsMap(LazilyDecoratedRowsAndColumns.class);
private RowsAndColumns base;
diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/RowsAndColumns.java b/processing/src/main/java/org/apache/druid/query/rowsandcols/RowsAndColumns.java
index d139265d147d..7b6a1f6215d3 100644
--- a/processing/src/main/java/org/apache/druid/query/rowsandcols/RowsAndColumns.java
+++ b/processing/src/main/java/org/apache/druid/query/rowsandcols/RowsAndColumns.java
@@ -19,19 +19,13 @@
package org.apache.druid.query.rowsandcols;
-import org.apache.druid.error.DruidException;
import org.apache.druid.query.rowsandcols.column.Column;
import org.apache.druid.query.rowsandcols.semantic.AppendableRowsAndColumns;
import org.apache.druid.query.rowsandcols.semantic.FramedOnHeapAggregatable;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.function.Function;
/**
* An interface representing a chunk of RowsAndColumns. Essentially a RowsAndColumns is just a batch of rows
@@ -75,31 +69,6 @@ static AppendableRowsAndColumns expectAppendable(RowsAndColumns input)
return retVal;
}
- static Map, Function> makeAsMap(Class clazz)
- {
- Map, Function> retVal = new HashMap<>();
-
- for (Method method : clazz.getMethods()) {
- if (method.isAnnotationPresent(SemanticCreator.class)) {
- if (method.getParameterCount() != 0) {
- throw DruidException.defensive("Method [%s] annotated with SemanticCreator was not 0-argument.", method);
- }
-
- retVal.put(method.getReturnType(), arg -> {
- try {
- return method.invoke(arg);
- }
- catch (InvocationTargetException | IllegalAccessException e) {
- throw DruidException.defensive().build(e, "Problem invoking method [%s]", method);
- }
- });
- }
- }
-
- return retVal;
- }
-
-
/**
* The set of column names available from the RowsAndColumns
*
diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/concrete/QueryableIndexRowsAndColumns.java b/processing/src/main/java/org/apache/druid/query/rowsandcols/concrete/QueryableIndexRowsAndColumns.java
index 209d4430b1d1..73fc72a1ee48 100644
--- a/processing/src/main/java/org/apache/druid/query/rowsandcols/concrete/QueryableIndexRowsAndColumns.java
+++ b/processing/src/main/java/org/apache/druid/query/rowsandcols/concrete/QueryableIndexRowsAndColumns.java
@@ -19,10 +19,11 @@
package org.apache.druid.query.rowsandcols.concrete;
+import org.apache.druid.common.semantic.SemanticCreator;
+import org.apache.druid.common.semantic.SemanticUtils;
import org.apache.druid.error.DruidException;
import org.apache.druid.java.util.common.io.Closer;
import org.apache.druid.query.rowsandcols.RowsAndColumns;
-import org.apache.druid.query.rowsandcols.SemanticCreator;
import org.apache.druid.query.rowsandcols.column.Column;
import org.apache.druid.segment.CloseableShapeshifter;
import org.apache.druid.segment.QueryableIndex;
@@ -41,7 +42,7 @@
public class QueryableIndexRowsAndColumns implements RowsAndColumns, AutoCloseable, CloseableShapeshifter
{
- private static final Map, Function> AS_MAP = RowsAndColumns
+ private static final Map, Function> AS_MAP = SemanticUtils
.makeAsMap(QueryableIndexRowsAndColumns.class);
private final QueryableIndex index;
diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultFrameMaker.java b/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultFrameMaker.java
new file mode 100644
index 000000000000..204b5bd85489
--- /dev/null
+++ b/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultFrameMaker.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF 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 org.apache.druid.query.rowsandcols.semantic;
+
+import org.apache.druid.frame.Frame;
+import org.apache.druid.frame.allocation.ArenaMemoryAllocatorFactory;
+import org.apache.druid.frame.write.FrameWriter;
+import org.apache.druid.frame.write.FrameWriters;
+import org.apache.druid.query.rowsandcols.RowsAndColumns;
+import org.apache.druid.query.rowsandcols.column.Column;
+import org.apache.druid.segment.ColumnSelectorFactory;
+import org.apache.druid.segment.column.RowSignature;
+
+import java.util.Collections;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class DefaultFrameMaker implements FrameMaker
+{
+ private final RowsAndColumns rac;
+
+ public DefaultFrameMaker(RowsAndColumns rac)
+ {
+ this.rac = rac;
+ }
+
+ @Override
+ public RowSignature computeSignature()
+ {
+ final RowSignature.Builder signatureBuilder = RowSignature.builder();
+ for (String column : rac.getColumnNames()) {
+ final Column racColumn = rac.findColumn(column);
+ if (racColumn == null) {
+ continue;
+ }
+ signatureBuilder.add(column, racColumn.toAccessor().getType());
+ }
+
+ return signatureBuilder.build();
+ }
+
+ @Override
+ public Frame toColumnBasedFrame()
+ {
+ final AtomicInteger rowId = new AtomicInteger(0);
+ final int numRows = rac.numRows();
+ final ColumnSelectorFactoryMaker csfm = ColumnSelectorFactoryMaker.fromRAC(rac);
+ final ColumnSelectorFactory selectorFactory = csfm.make(rowId);
+
+ final ArenaMemoryAllocatorFactory memFactory = new ArenaMemoryAllocatorFactory(200 << 20); // 200 MB
+
+ final FrameWriter frameWriter = FrameWriters.makeColumnBasedFrameWriterFactory(
+ memFactory,
+ computeSignature(),
+ Collections.emptyList()
+ ).newFrameWriter(selectorFactory);
+
+ rowId.set(0);
+ for (; rowId.get() < numRows; rowId.incrementAndGet()) {
+ frameWriter.addSelection();
+ }
+
+ return Frame.wrap(frameWriter.toByteArray());
+ }
+}
diff --git a/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/FrameMaker.java b/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/FrameMaker.java
new file mode 100644
index 000000000000..095bfe1ed87c
--- /dev/null
+++ b/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/FrameMaker.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF 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 org.apache.druid.query.rowsandcols.semantic;
+
+import org.apache.druid.frame.Frame;
+import org.apache.druid.query.rowsandcols.RowsAndColumns;
+import org.apache.druid.segment.column.RowSignature;
+
+public interface FrameMaker
+{
+ static FrameMaker fromRAC(RowsAndColumns rac)
+ {
+ FrameMaker retVal = rac.as(FrameMaker.class);
+ if (retVal == null) {
+ retVal = new DefaultFrameMaker(rac);
+ }
+ return retVal;
+ }
+
+ RowSignature computeSignature();
+
+ Frame toColumnBasedFrame();
+}
diff --git a/processing/src/main/java/org/apache/druid/segment/IndexIO.java b/processing/src/main/java/org/apache/druid/segment/IndexIO.java
index dd0ac9ab1177..966de4052066 100644
--- a/processing/src/main/java/org/apache/druid/segment/IndexIO.java
+++ b/processing/src/main/java/org/apache/druid/segment/IndexIO.java
@@ -510,9 +510,15 @@ public QueryableIndex load(File inDir, ObjectMapper mapper, boolean lazy, Segmen
new ConciseBitmapFactory(),
columns,
index.getFileMapper(),
- null,
lazy
- );
+ )
+ {
+ @Override
+ public Metadata getMetadata()
+ {
+ return null;
+ }
+ };
}
private Supplier getColumnHolderSupplier(ColumnBuilder builder, boolean lazy)
@@ -604,25 +610,6 @@ public QueryableIndex load(File inDir, ObjectMapper mapper, boolean lazy, Segmen
allDims = null;
}
- Metadata metadata = null;
- ByteBuffer metadataBB = smooshedFiles.mapFile("metadata.drd");
- if (metadataBB != null) {
- try {
- metadata = mapper.readValue(
- SERIALIZER_UTILS.readBytes(metadataBB, metadataBB.remaining()),
- Metadata.class
- );
- }
- catch (JsonParseException | JsonMappingException ex) {
- // Any jackson deserialization errors are ignored e.g. if metadata contains some aggregator which
- // is no longer supported then it is OK to not use the metadata instead of failing segment loading
- log.warn(ex, "Failed to load metadata for segment [%s]", inDir);
- }
- catch (IOException ex) {
- throw new IOException("Failed to read metadata", ex);
- }
- }
-
Map> columns = new LinkedHashMap<>();
// Register the time column
@@ -663,9 +650,32 @@ public QueryableIndex load(File inDir, ObjectMapper mapper, boolean lazy, Segmen
segmentBitmapSerdeFactory.getBitmapFactory(),
columns,
smooshedFiles,
- metadata,
lazy
- );
+ )
+ {
+ @Override
+ public Metadata getMetadata()
+ {
+ try {
+ ByteBuffer metadataBB = smooshedFiles.mapFile("metadata.drd");
+ if (metadataBB != null) {
+ return mapper.readValue(
+ SERIALIZER_UTILS.readBytes(metadataBB, metadataBB.remaining()),
+ Metadata.class
+ );
+ }
+ }
+ catch (JsonParseException | JsonMappingException ex) {
+ // Any jackson deserialization errors are ignored e.g. if metadata contains some aggregator which
+ // is no longer supported then it is OK to not use the metadata instead of failing segment loading
+ log.warn(ex, "Failed to load metadata for segment [%s]", inDir);
+ }
+ catch (IOException ex) {
+ log.warn(ex, "Failed to read metadata for segment [%s]", inDir);
+ }
+ return null;
+ }
+ };
log.debug("Mapped v9 index[%s] in %,d millis", inDir, System.currentTimeMillis() - startTime);
diff --git a/processing/src/main/java/org/apache/druid/segment/QueryableIndexSegment.java b/processing/src/main/java/org/apache/druid/segment/QueryableIndexSegment.java
index 9d75748b4162..b8d4d2d16cf9 100644
--- a/processing/src/main/java/org/apache/druid/segment/QueryableIndexSegment.java
+++ b/processing/src/main/java/org/apache/druid/segment/QueryableIndexSegment.java
@@ -19,17 +19,24 @@
package org.apache.druid.segment;
+import org.apache.druid.common.semantic.SemanticCreator;
+import org.apache.druid.common.semantic.SemanticUtils;
import org.apache.druid.query.rowsandcols.concrete.QueryableIndexRowsAndColumns;
import org.apache.druid.timeline.SegmentId;
import org.joda.time.Interval;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import java.util.Map;
+import java.util.function.Function;
/**
*/
public class QueryableIndexSegment implements Segment
{
+ private static final Map, Function> AS_MAP = SemanticUtils
+ .makeAsMap(QueryableIndexSegment.class);
+
private final QueryableIndex index;
private final QueryableIndexStorageAdapter storageAdapter;
private final SegmentId segmentId;
@@ -77,10 +84,18 @@ public void close()
@Override
public T as(@Nonnull Class clazz)
{
- if (CloseableShapeshifter.class.equals(clazz)) {
- return (T) new QueryableIndexRowsAndColumns(index);
+ final Function fn = AS_MAP.get(clazz);
+ if (fn != null) {
+ return (T) fn.apply(this);
}
return Segment.super.as(clazz);
}
+
+ @SemanticCreator
+ @SuppressWarnings("unused")
+ public CloseableShapeshifter toCloseableShapeshifter()
+ {
+ return new QueryableIndexRowsAndColumns(index);
+ }
}
diff --git a/processing/src/main/java/org/apache/druid/segment/SimpleQueryableIndex.java b/processing/src/main/java/org/apache/druid/segment/SimpleQueryableIndex.java
index 924c7911f8a3..013a634fdc4b 100644
--- a/processing/src/main/java/org/apache/druid/segment/SimpleQueryableIndex.java
+++ b/processing/src/main/java/org/apache/druid/segment/SimpleQueryableIndex.java
@@ -38,7 +38,7 @@
/**
*
*/
-public class SimpleQueryableIndex implements QueryableIndex
+public abstract class SimpleQueryableIndex implements QueryableIndex
{
private final Interval dataInterval;
private final List columnNames;
@@ -46,8 +46,6 @@ public class SimpleQueryableIndex implements QueryableIndex
private final BitmapFactory bitmapFactory;
private final Map> columns;
private final SmooshedFileMapper fileMapper;
- @Nullable
- private final Metadata metadata;
private final Supplier