Skip to content

Commit

Permalink
ut
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Oct 18, 2023
1 parent 6d323b8 commit 8ae0ac3
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,14 @@ private Statistics computeCatalogRelation(CatalogRelation catalogRelation) {
if (colName == null) {
throw new RuntimeException(String.format("Invalid slot: %s", slotReference.getExprId()));
}
ColumnStatistic cache = ConnectContext.get().getSessionVariable().enableStats
&& FeConstants.enableInternalSchemaDb
? shouldIgnoreThisCol
? ColumnStatistic.UNKNOWN : getColumnStatistic(table, colName) : ColumnStatistic.UNKNOWN;
ColumnStatistic cache;
if (ConnectContext.get() == null || !ConnectContext.get().getSessionVariable().enableStats
|| !FeConstants.enableInternalSchemaDb
|| shouldIgnoreThisCol) {
cache = ColumnStatistic.UNKNOWN;
} else {
cache = getColumnStatistic(table, colName);
}
if (cache.avgSizeByte <= 0) {
cache = new ColumnStatisticBuilder(cache)
.setAvgSizeByte(slotReference.getColumn().get().getType().getSlotSize())
Expand Down

0 comments on commit 8ae0ac3

Please sign in to comment.