Skip to content

Commit 0a080d5

Browse files
committed
Fix test for interpreter_explain
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 0e3a9d8 commit 0a080d5

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/query/service/tests/it/interpreters/interpreter_explain.rs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,28 @@ async fn test_explain_interpreter() -> Result<()> {
3131

3232
let (plan, _, _) = planner.plan_sql(query).await?;
3333
let executor = InterpreterFactoryV2::get(ctx.clone(), &plan).await?;
34-
assert_eq!(executor.name(), "ExplainInterpreter");
34+
assert_eq!(executor.name(), "ExplainInterpreterV2");
3535

3636
let stream = executor.execute(ctx).await?;
3737
let result = stream.try_collect::<Vec<_>>().await?;
3838
let block = &result[0];
3939
assert_eq!(block.num_columns(), 1);
40-
assert_eq!(block.column(0).len(), 4);
40+
assert_eq!(block.column(0).len(), 9);
4141

4242
let expected = vec![
43-
"+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+",
44-
"| explain |",
45-
"+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+",
46-
"| Projection: number:UInt64 |",
47-
"| Having: ((number + 1) = 4) |",
48-
"| Filter: ((number + 1) = 4) |",
49-
"| ReadDataSource: scan schema: [number:UInt64], statistics: [read_rows: 10, read_bytes: 80, partitions_scanned: 1, partitions_total: 1], push_downs: [projections: [0], filters: [((number + 1) = 4)]] |",
50-
"+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+",
43+
"+---------------------------------------------------------------------------------------+",
44+
"| explain |",
45+
"+---------------------------------------------------------------------------------------+",
46+
"| Filter |",
47+
"| ├── filters: [=(+(numbers_mt.number (#0), 1), 4), =(+(numbers_mt.number (#0), 1), 4)] |",
48+
"| └── TableScan |",
49+
"| ├── table: default.system.numbers_mt |",
50+
"| ├── read rows: 10 |",
51+
"| ├── read bytes: 80 |",
52+
"| ├── partitions total: 1 |",
53+
"| ├── partitions scanned: 1 |",
54+
"| └── push downs: [filters: [(+(number, 1) = 4)], limit: NONE] |",
55+
"+---------------------------------------------------------------------------------------+",
5156
];
5257
common_datablocks::assert_blocks_eq(expected, result.as_slice());
5358

0 commit comments

Comments
 (0)