@@ -422,3 +422,26 @@ Projection_3 10000.00 root plus(1, ifnull(test.t.a, 0))
422
422
└─TableScan_4 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
423
423
drop table if exists t;
424
424
drop table if exists t;
425
+ create table t(a int);
426
+ explain select * from t where _tidb_rowid = 0;
427
+ id count task operator info
428
+ Projection_4 8000.00 root test.t.a
429
+ └─TableReader_6 10000.00 root data:TableScan_5
430
+ └─TableScan_5 10000.00 cop table:t, range:[0,0], keep order:false, stats:pseudo
431
+ explain select * from t where _tidb_rowid > 0;
432
+ id count task operator info
433
+ Projection_4 8000.00 root test.t.a
434
+ └─TableReader_6 10000.00 root data:TableScan_5
435
+ └─TableScan_5 10000.00 cop table:t, range:(0,+inf], keep order:false, stats:pseudo
436
+ explain select a, _tidb_rowid from t where a > 0;
437
+ id count task operator info
438
+ TableReader_7 3333.33 root data:Selection_6
439
+ └─Selection_6 3333.33 cop gt(test.t.a, 0)
440
+ └─TableScan_5 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
441
+ explain select * from t where _tidb_rowid > 0 and a > 0;
442
+ id count task operator info
443
+ Projection_4 2666.67 root test.t.a
444
+ └─TableReader_7 2666.67 root data:Selection_6
445
+ └─Selection_6 2666.67 cop gt(test.t.a, 0)
446
+ └─TableScan_5 3333.33 cop table:t, range:(0,+inf], keep order:false, stats:pseudo
447
+ drop table if exists t;
0 commit comments