make tests pass

This commit is contained in:
nishantmonu51 2014-08-13 10:55:20 +05:30
parent 1b0a72751b
commit 03d7ec04be
3 changed files with 4 additions and 4 deletions

View File

@ -407,7 +407,7 @@ public class QueryableIndexStorageAdapter implements StorageAdapter
if (cachedMetricVals == null) { if (cachedMetricVals == null) {
Column holder = index.getColumn(metricName); Column holder = index.getColumn(metricName);
if (holder != null && holder.getCapabilities().getType() == ValueType.LONG) { if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG || holder.getCapabilities().getType() == ValueType.FLOAT)) {
cachedMetricVals = holder.getGenericColumn(); cachedMetricVals = holder.getGenericColumn();
genericColumnCache.put(metricName, cachedMetricVals); genericColumnCache.put(metricName, cachedMetricVals);
} }
@ -898,7 +898,7 @@ public class QueryableIndexStorageAdapter implements StorageAdapter
if (cachedMetricVals == null) { if (cachedMetricVals == null) {
Column holder = index.getColumn(metricName); Column holder = index.getColumn(metricName);
if (holder != null && holder.getCapabilities().getType() == ValueType.LONG) { if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG || holder.getCapabilities().getType() == ValueType.FLOAT)) {
cachedMetricVals = holder.getGenericColumn(); cachedMetricVals = holder.getGenericColumn();
genericColumnCache.put(metricName, cachedMetricVals); genericColumnCache.put(metricName, cachedMetricVals);
} }

View File

@ -82,7 +82,7 @@ public class IndexedFloatsGenericColumn implements GenericColumn
@Override @Override
public long getLongSingleValueRow(int rowNum) public long getLongSingleValueRow(int rowNum)
{ {
throw new UnsupportedOperationException(); return (long) column.get(rowNum);
} }
@Override @Override

View File

@ -70,7 +70,7 @@ public class IndexedLongsGenericColumn implements GenericColumn
@Override @Override
public float getFloatSingleValueRow(int rowNum) public float getFloatSingleValueRow(int rowNum)
{ {
throw new UnsupportedOperationException(); return (float) column.get(rowNum);
} }
@Override @Override