review comments

This commit is contained in:
nishantmonu51 2014-09-30 18:26:43 +05:30
parent e525562767
commit 7ba914d379
4 changed files with 11 additions and 7 deletions

View File

@ -79,7 +79,7 @@ public class CardinalityBufferAggregator implements BufferAggregator
@Override
public float getFloat(ByteBuffer buf, int position)
{
throw new UnsupportedOperationException();
throw new UnsupportedOperationException("CardinalityBufferAggregator does not support getFloat()");
}

View File

@ -79,7 +79,7 @@ public class HyperUniquesBufferAggregator implements BufferAggregator
@Override
public float getFloat(ByteBuffer buf, int position)
{
throw new UnsupportedOperationException();
throw new UnsupportedOperationException("HyperUniquesBufferAggregator does not support getFloat()");
}

View File

@ -358,7 +358,8 @@ public class QueryableIndexStorageAdapter implements StorageAdapter
if (cachedMetricVals == null) {
Column holder = index.getColumn(metricName);
if (holder != null && holder.getCapabilities().getType() == ValueType.FLOAT) {
if (holder != null && (holder.getCapabilities().getType() == ValueType.FLOAT
|| holder.getCapabilities().getType() == ValueType.LONG)) {
cachedMetricVals = holder.getGenericColumn();
genericColumnCache.put(metricName, cachedMetricVals);
}
@ -394,7 +395,8 @@ public class QueryableIndexStorageAdapter implements StorageAdapter
if (cachedMetricVals == null) {
Column holder = index.getColumn(metricName);
if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG || holder.getCapabilities().getType() == ValueType.FLOAT)) {
if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG
|| holder.getCapabilities().getType() == ValueType.FLOAT)) {
cachedMetricVals = holder.getGenericColumn();
genericColumnCache.put(metricName, cachedMetricVals);
}
@ -836,7 +838,8 @@ public class QueryableIndexStorageAdapter implements StorageAdapter
if (cachedMetricVals == null) {
Column holder = index.getColumn(metricName);
if (holder != null && holder.getCapabilities().getType() == ValueType.FLOAT) {
if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG
|| holder.getCapabilities().getType() == ValueType.FLOAT)) {
cachedMetricVals = holder.getGenericColumn();
genericColumnCache.put(metricName, cachedMetricVals);
}
@ -872,7 +875,8 @@ public class QueryableIndexStorageAdapter implements StorageAdapter
if (cachedMetricVals == null) {
Column holder = index.getColumn(metricName);
if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG || holder.getCapabilities().getType() == ValueType.FLOAT)) {
if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG
|| holder.getCapabilities().getType() == ValueType.FLOAT)) {
cachedMetricVals = holder.getGenericColumn();
genericColumnCache.put(metricName, cachedMetricVals);
}

View File

@ -23,7 +23,7 @@ package io.druid.segment.column;
*/
public interface Column
{
public static String TIME_COLUMN_NAME = "__time";
public static final String TIME_COLUMN_NAME = "__time";
public ColumnCapabilities getCapabilities();
public int getLength();