Skip to content

Commit f10fee3

Browse files
committed
fix test
1 parent d2d14be commit f10fee3

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

src/query/service/src/interpreters/interpreter_table_analyze.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,16 @@ impl Interpreter for AnalyzeTableInterpreter {
132132
return Ok(PipelineBuildResult::create());
133133
}
134134

135+
let table_statistics = table
136+
.read_table_snapshot_statistics(Some(&snapshot))
137+
.await?;
138+
if let Some(table_statistics) = &table_statistics {
139+
let prev_snapshot_id = snapshot.prev_snapshot_id.map(|(id, _)| id);
140+
if Some(table_statistics.snapshot_id) == prev_snapshot_id {
141+
return Ok(PipelineBuildResult::create());
142+
}
143+
}
144+
135145
let mut parts = Vec::with_capacity(snapshot.segments.len());
136146
for (idx, segment_location) in snapshot.segments.iter().enumerate() {
137147
parts.push(FuseLazyPartInfo::create(idx, segment_location.clone()));

tests/sqllogictests/suites/tpch/join_order.test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -312,21 +312,21 @@ HashJoin: INNER
312312
├── Build
313313
│ └── HashJoin: INNER
314314
│ ├── Build
315-
│ │ └── Scan: default.tpch_test.nation (#4) (read rows: 25)
315+
│ │ └── HashJoin: INNER
316+
│ │ ├── Build
317+
│ │ │ └── Scan: default.tpch_test.nation (#5) (read rows: 25)
318+
│ │ └── Probe
319+
│ │ └── Scan: default.tpch_test.customer (#3) (read rows: 150000)
316320
│ └── Probe
317-
│ └── Scan: default.tpch_test.supplier (#0) (read rows: 10000)
321+
│ └── Scan: default.tpch_test.orders (#2) (read rows: 1500000)
318322
└── Probe
319323
└── HashJoin: INNER
320324
├── Build
321325
│ └── HashJoin: INNER
322326
│ ├── Build
323-
│ │ └── HashJoin: INNER
324-
│ │ ├── Build
325-
│ │ │ └── Scan: default.tpch_test.nation (#5) (read rows: 25)
326-
│ │ └── Probe
327-
│ │ └── Scan: default.tpch_test.customer (#3) (read rows: 150000)
327+
│ │ └── Scan: default.tpch_test.nation (#4) (read rows: 25)
328328
│ └── Probe
329-
│ └── Scan: default.tpch_test.orders (#2) (read rows: 1500000)
329+
│ └── Scan: default.tpch_test.supplier (#0) (read rows: 10000)
330330
└── Probe
331331
└── Scan: default.tpch_test.lineitem (#1) (read rows: 6001215)
332332

0 commit comments

Comments
 (0)