mirror of https://github.com/apache/druid.git
make tests pass
This commit is contained in:
parent
1b0a72751b
commit
03d7ec04be
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue