File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/query/storages/fuse/src/io/write/stream Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,12 @@ impl ColumnStatisticsState {
101
101
col_stats. distinct_of_values = Some ( distinct_of_values) ;
102
102
} else if let Some ( estimator) = self . distinct_columns . get ( & id) {
103
103
col_stats. distinct_of_values = Some ( estimator. finalize ( ) ) ;
104
- } else {
105
- if col_stats. min == col_stats. max {
106
- if col_stats. min . is_null ( ) {
107
- col_stats. distinct_of_values = Some ( 0 ) ;
108
- } else {
109
- col_stats. distinct_of_values = Some ( 1 ) ;
110
- }
104
+ } else if col_stats. min == col_stats. max {
105
+ // Bloom index will skip the large string column, it also no need to calc distinct values.
106
+ if col_stats. min . is_null ( ) {
107
+ col_stats. distinct_of_values = Some ( 0 ) ;
108
+ } else {
109
+ col_stats. distinct_of_values = Some ( 1 ) ;
111
110
}
112
111
}
113
112
statistics. insert ( id, col_stats) ;
You can’t perform that action at this time.
0 commit comments