mirror of https://github.com/apache/druid.git
return size = 0 in ColumnAnalysis if its unknown
that is if complex agg did not implement inputSizeFn() so that segment metadata query shows atleast some information. also instead of COMPLEX, return type of data stored.
This commit is contained in:
parent
3c3db7229c
commit
2fd3e9e8e5
|
@ -47,7 +47,7 @@ The format of the result is:
|
||||||
```
|
```
|
||||||
|
|
||||||
Dimension columns will have type `STRING`.
|
Dimension columns will have type `STRING`.
|
||||||
Metric columns will have type `FLOAT`.
|
Metric columns will have type `FLOAT` or `LONG` or name of the underlying complex type such as `hyperUnique` in case of COMPLEX metric.
|
||||||
Timestamp column will have type `LONG`.
|
Timestamp column will have type `LONG`.
|
||||||
|
|
||||||
Only columns which are dimensions (ie, have type `STRING`) will have any cardinality. Rest of the columns (timestamp and metric columns) will show cardinality as `null`.
|
Only columns which are dimensions (ie, have type `STRING`) will have any cardinality. Rest of the columns (timestamp and metric columns) will show cardinality as `null`.
|
||||||
|
|
|
@ -143,7 +143,7 @@ public class SegmentAnalyzer
|
||||||
|
|
||||||
final Function<Object, Long> inputSizeFn = serde.inputSizeFn();
|
final Function<Object, Long> inputSizeFn = serde.inputSizeFn();
|
||||||
if (inputSizeFn == null) {
|
if (inputSizeFn == null) {
|
||||||
return ColumnAnalysis.error("noSizeFn");
|
return new ColumnAnalysis(typeName, 0, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
final int length = column.getLength();
|
final int length = column.getLength();
|
||||||
|
@ -152,6 +152,6 @@ public class SegmentAnalyzer
|
||||||
size += inputSizeFn.apply(complexColumn.getRowValue(i));
|
size += inputSizeFn.apply(complexColumn.getRowValue(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ColumnAnalysis(capabilities.getType().name(), size, null, null);
|
return new ColumnAnalysis(typeName, size, null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue