Skip to content

Commit

Permalink
[opt](nereids) refine operator estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjian.xzj authored and zhongjian.xzj committed Sep 19, 2024
1 parent 3842d9f commit dd61c8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public ColumnStatistic visitLiteral(Literal literal, Statistics context) {
.setMinValue(literalVal)
.setNdv(literal.isNullLiteral() ? 0 : 1)
.setNumNulls(literal.isNullLiteral() ? 1 : 0)
.setAvgSizeByte(1)
.setAvgSizeByte(literal.getDataType().width())
.setMinExpr(literal.toLegacyLiteral())
.setMaxExpr(literal.toLegacyLiteral())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ private Statistics computeOlapScan(OlapScan olapScan) {
derivedStats.addColumnStats(slot,
new ColumnStatisticBuilder(ColumnStatistic.UNKNOWN)
.setCount(derivedRowCount)
.setAvgSizeByte(slot.getDataType().width())
//.setAvgSizeByte(slot.getDataType().width())
.build());
}
}
Expand Down Expand Up @@ -436,7 +436,7 @@ private Statistics computeOlapScan(OlapScan olapScan) {
builder.putColumnStatistics(slot,
new ColumnStatisticBuilder(ColumnStatistic.UNKNOWN)
.setCount(tableRowCount)
.setAvgSizeByte(slot.getDataType().width())
//.setAvgSizeByte(slot.getDataType().width())
.build());
}
setHasUnknownColStatsInStatementContext();
Expand Down

0 comments on commit dd61c8f

Please sign in to comment.