@@ -31,23 +31,28 @@ async fn test_explain_interpreter() -> Result<()> {
31
31
32
32
let ( plan, _, _) = planner. plan_sql ( query) . await ?;
33
33
let executor = InterpreterFactoryV2 :: get ( ctx. clone ( ) , & plan) . await ?;
34
- assert_eq ! ( executor. name( ) , "ExplainInterpreter " ) ;
34
+ assert_eq ! ( executor. name( ) , "ExplainInterpreterV2 " ) ;
35
35
36
36
let stream = executor. execute ( ctx) . await ?;
37
37
let result = stream. try_collect :: < Vec < _ > > ( ) . await ?;
38
38
let block = & result[ 0 ] ;
39
39
assert_eq ! ( block. num_columns( ) , 1 ) ;
40
- assert_eq ! ( block. column( 0 ) . len( ) , 4 ) ;
40
+ assert_eq ! ( block. column( 0 ) . len( ) , 9 ) ;
41
41
42
42
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
+ "+---------------------------------------------------------------------------------------+" ,
51
56
] ;
52
57
common_datablocks:: assert_blocks_eq ( expected, result. as_slice ( ) ) ;
53
58
0 commit comments