Skip to content

Commit

Permalink
delta row count only plus to analyzed row count, but to be reported row
Browse files Browse the repository at this point in the history
count
  • Loading branch information
englefly committed Sep 29, 2024
1 parent 9bd671f commit ad96f77
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ private double getOlapTableRowCount(OlapScan olapScan) {
rowCount = olapTable.getRowCountForIndex(olapScan.getSelectedIndexId(), true);
if (rowCount == -1) {
if (tableMeta != null) {
rowCount = tableMeta.getRowCount(olapScan.getSelectedIndexId());
rowCount = tableMeta.getRowCount(olapScan.getSelectedIndexId()) + computeDeltaRowCount(olapScan);
}
}
}
Expand Down Expand Up @@ -489,7 +489,7 @@ private Statistics computeOlapScan(OlapScan olapScan) {
builder.putColumnStatistics(slot, colStatsBuilder.build());
}
checkIfUnknownStatsUsedAsKey(builder);
builder.setRowCount(selectedPartitionsRowCount + deltaRowCount);
builder.setRowCount(selectedPartitionsRowCount);
}
}
// 1. no partition is pruned, or
Expand All @@ -503,7 +503,7 @@ private Statistics computeOlapScan(OlapScan olapScan) {
builder.putColumnStatistics(slot, colStatsBuilder.build());
}
checkIfUnknownStatsUsedAsKey(builder);
builder.setRowCount(tableRowCount + deltaRowCount);
builder.setRowCount(tableRowCount);
}
return builder.build();
}
Expand Down

0 comments on commit ad96f77

Please sign in to comment.