[revert](nereids) Revert data size agg (#21216)

To make stats derivation more precise
This commit is contained in:
AKIRA
2023-07-04 19:02:15 +09:00
committed by GitHub
parent 1b86e658fd
commit 9d997b9349

View File

@ -182,7 +182,10 @@ public abstract class BaseAnalysisTask {
// TODO : time cost is intolerable when column is string type, return 0 directly for now.
protected String getDataSizeFunction(Column column) {
return "0";
if (column.getType().isStringType()) {
return "SUM(LENGTH(`${colName}`))";
}
return "COUNT(1) * " + column.getType().getSlotSize();
}
private boolean isUnsupportedType(PrimitiveType type) {