Skip to content

Commit

Permalink
[fix](stats) Add logic for data size calculation (#23103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikyou1997 authored Aug 17, 2023
1 parent 96983d7 commit 5130528
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ public long getJobId() {

// 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();
}

protected String getSampleExpression() {
Expand Down

0 comments on commit 5130528

Please sign in to comment.