diff --git a/cmd/explaintest/r/partition_pruning.result b/cmd/explaintest/r/partition_pruning.result index 51d7e2c5145a9..5aa9fc8a31060 100644 --- a/cmd/explaintest/r/partition_pruning.result +++ b/cmd/explaintest/r/partition_pruning.result @@ -1039,151 +1039,89 @@ INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), (1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07'); EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info @@ -1224,516 +1162,833 @@ Union_11 16666.67 root └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03) + └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03'; id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03'; +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +EXPLAIN SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +DROP TABLE t1; +# Test with DATE column NOT NULL +CREATE TABLE t1 ( +a int(10) unsigned NOT NULL, +b DATE NOT NULL, +PRIMARY KEY (a, b) +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), +PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), +PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), +PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), +PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), +(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), +(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), +(1, '2009-04-07'); +EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +id count task operator info +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) + └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +EXPLAIN SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) + └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03'; +EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03'; +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03'; +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03'; +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +id count task operator info +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03'; +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03'; +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03'; +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03'; +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info @@ -1773,11 +2028,10 @@ Union_11 16666.67 root └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo DROP TABLE t1; -# Test with DATE column NOT NULL +# Test with DATETIME column NULL CREATE TABLE t1 ( a int(10) unsigned NOT NULL, -b DATE NOT NULL, -PRIMARY KEY (a, b) +b DATETIME NULL ) PARTITION BY RANGE (TO_DAYS(b)) (PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), @@ -1785,156 +2039,94 @@ PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), PARTITION p20090405 VALUES LESS THAN MAXVALUE); INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), -(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), -(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), -(1, '2009-04-07'); +(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'), +(1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'), +(1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07'); EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info @@ -1975,1466 +2167,468 @@ Union_11 16666.67 root └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +id count task operator info +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; -id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03'; -id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); -id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); -id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -DROP TABLE t1; -# Test with DATETIME column NULL -CREATE TABLE t1 ( -a int(10) unsigned NOT NULL, -b DATETIME NULL -) PARTITION BY RANGE (TO_DAYS(b)) -(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), -PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), -PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), -PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), -PARTITION p20090405 VALUES LESS THAN MAXVALUE); -INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), -(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'), -(1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'), -(1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07'); -EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); -id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); -id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; -id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; -id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03'; -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03'; id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03'; id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03'; id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 -WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); -id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -DROP TABLE t1; -# Test with DATE column NULL -CREATE TABLE t1 ( -a int(10) unsigned NOT NULL, -b DATE NULL -) PARTITION BY RANGE (TO_DAYS(b)) -(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), -PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), -PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), -PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), -PARTITION p20090405 VALUES LESS THAN MAXVALUE); -INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), -(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), -(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), -(1, '2009-04-07'); -EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); -id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) + └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-02 23:59:58) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo -EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +EXPLAIN SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info Union_11 16666.67 root ├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo ├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) │ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo └─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) + └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-02 23:59:58) └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +DROP TABLE t1; +# Test with DATE column NULL +CREATE TABLE t1 ( +a int(10) unsigned NOT NULL, +b DATE NULL +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), +PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), +PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), +PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), +PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), +(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), +(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), +(1, '2009-04-07'); +EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +id count task operator info +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +id count task operator info +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +id count task operator info +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); id count task operator info @@ -3475,238 +2669,145 @@ Union_11 16666.67 root └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-02 23:59:59.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; id count task operator info Union_11 16666.67 root @@ -3745,246 +2846,153 @@ Union_11 16666.67 root └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < '2009-04-03'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= '2009-04-03'; id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = '2009-04-03'; id count task operator info -Union_11 50.00 root -├─TableReader_14 10.00 root data:Selection_13 -│ └─Selection_13 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 10.00 root data:Selection_16 -│ └─Selection_16 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 10.00 root data:Selection_19 -│ └─Selection_19 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 10.00 root data:Selection_22 -│ └─Selection_22 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 10.00 root data:Selection_25 - └─Selection_25 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= '2009-04-03'; id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > '2009-04-03'; id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:00.000000) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop lt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_9 9970.00 root +├─TableReader_12 3323.33 root data:Selection_11 +│ └─Selection_11 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_10 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_15 3323.33 root data:Selection_14 +│ └─Selection_14 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_13 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_18 3323.33 root data:Selection_17 + └─Selection_17 3323.33 cop le(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_16 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_6 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop ge(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); id count task operator info -Union_11 16666.67 root -├─TableReader_14 3333.33 root data:Selection_13 -│ └─Selection_13 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3333.33 root data:Selection_16 -│ └─Selection_16 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3333.33 root data:Selection_19 -│ └─Selection_19 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3333.33 root data:Selection_22 -│ └─Selection_22 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3333.33 root data:Selection_25 - └─Selection_25 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_10 13333.33 root +├─TableReader_13 3333.33 root data:Selection_12 +│ └─Selection_12 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_11 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_16 3333.33 root data:Selection_15 +│ └─Selection_15 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_14 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo +├─TableReader_19 3333.33 root data:Selection_18 +│ └─Selection_18 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) +│ └─TableScan_17 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_22 3333.33 root data:Selection_21 + └─Selection_21 3333.33 cop gt(test.t1.b, 2009-04-03 00:00:01) + └─TableScan_20 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 16616.67 root -├─TableReader_14 3323.33 root data:Selection_13 -│ └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 3323.33 root data:Selection_16 -│ └─Selection_16 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 3323.33 root data:Selection_19 -│ └─Selection_19 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 3323.33 root data:Selection_22 -│ └─Selection_22 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 3323.33 root data:Selection_25 - └─Selection_25 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) +│ └─TableScan_9 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_12 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info -Union_11 0.00 root -├─TableReader_14 0.00 root data:Selection_13 -│ └─Selection_13 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_12 10000.00 cop table:t1, partition:p20090401, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_17 0.00 root data:Selection_16 -│ └─Selection_16 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_15 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_20 0.00 root data:Selection_19 -│ └─Selection_19 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_18 10000.00 cop table:t1, partition:p20090403, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_23 0.00 root data:Selection_22 -│ └─Selection_22 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) -│ └─TableScan_21 10000.00 cop table:t1, partition:p20090404, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_26 0.00 root data:Selection_25 - └─Selection_25 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) - └─TableScan_24 10000.00 cop table:t1, partition:p20090405, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 0.00 root data:Selection_7 +└─Selection_7 0.00 cop eq(test.t1.b, 2009-04-02 23:59:58) + └─TableScan_6 10000.00 cop table:t1, partition:p20090402, range:[-inf,+inf], keep order:false, stats:pseudo EXPLAIN SELECT * FROM t1 WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); id count task operator info @@ -4077,40 +3085,20 @@ partition p1 values less than (20) insert into t3 values (5),(15); explain select * from t3 where a=11; id count task operator info -Union_8 20.00 root -├─TableReader_11 10.00 root data:Selection_10 -│ └─Selection_10 10.00 cop eq(test.t3.a, 11) -│ └─TableScan_9 10000.00 cop table:t3, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_14 10.00 root data:Selection_13 - └─Selection_13 10.00 cop eq(test.t3.a, 11) - └─TableScan_12 10000.00 cop table:t3, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t3.a, 11) + └─TableScan_6 10000.00 cop table:t3, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo explain select * from t3 where a=10; id count task operator info -Union_8 20.00 root -├─TableReader_11 10.00 root data:Selection_10 -│ └─Selection_10 10.00 cop eq(test.t3.a, 10) -│ └─TableScan_9 10000.00 cop table:t3, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_14 10.00 root data:Selection_13 - └─Selection_13 10.00 cop eq(test.t3.a, 10) - └─TableScan_12 10000.00 cop table:t3, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t3.a, 10) + └─TableScan_6 10000.00 cop table:t3, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo explain select * from t3 where a=20; id count task operator info -Union_8 20.00 root -├─TableReader_11 10.00 root data:Selection_10 -│ └─Selection_10 10.00 cop eq(test.t3.a, 20) -│ └─TableScan_9 10000.00 cop table:t3, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_14 10.00 root data:Selection_13 - └─Selection_13 10.00 cop eq(test.t3.a, 20) - └─TableScan_12 10000.00 cop table:t3, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo +TableDual_6 0.00 root rows:0 explain select * from t3 where a=30; id count task operator info -Union_8 20.00 root -├─TableReader_11 10.00 root data:Selection_10 -│ └─Selection_10 10.00 cop eq(test.t3.a, 30) -│ └─TableScan_9 10000.00 cop table:t3, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_14 10.00 root data:Selection_13 - └─Selection_13 10.00 cop eq(test.t3.a, 30) - └─TableScan_12 10000.00 cop table:t3, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo +TableDual_6 0.00 root rows:0 create table t7 (a int not null) partition by RANGE(a) ( partition p10 values less than (10), partition p30 values less than (30), @@ -4562,28 +3550,22 @@ partition p2 values less than (732664) -- 2005-12-19 insert into t9 values ('2005-05-05'), ('2005-04-04'); explain select * from t9 where a < '2004-12-19'; id count task operator info -Union_9 9970.00 root -├─TableReader_12 3323.33 root data:Selection_11 -│ └─Selection_11 3323.33 cop lt(test.t9.a, 2004-12-19 00:00:00.000000) -│ └─TableScan_10 10000.00 cop table:t9, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_15 3323.33 root data:Selection_14 -│ └─Selection_14 3323.33 cop lt(test.t9.a, 2004-12-19 00:00:00.000000) -│ └─TableScan_13 10000.00 cop table:t9, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_18 3323.33 root data:Selection_17 - └─Selection_17 3323.33 cop lt(test.t9.a, 2004-12-19 00:00:00.000000) - └─TableScan_16 10000.00 cop table:t9, partition:p2, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop lt(test.t9.a, 2004-12-19 00:00:00.000000) +│ └─TableScan_9 10000.00 cop table:t9, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop lt(test.t9.a, 2004-12-19 00:00:00.000000) + └─TableScan_12 10000.00 cop table:t9, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo explain select * from t9 where a <= '2004-12-19'; id count task operator info -Union_9 9970.00 root -├─TableReader_12 3323.33 root data:Selection_11 -│ └─Selection_11 3323.33 cop le(test.t9.a, 2004-12-19 00:00:00.000000) -│ └─TableScan_10 10000.00 cop table:t9, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_15 3323.33 root data:Selection_14 -│ └─Selection_14 3323.33 cop le(test.t9.a, 2004-12-19 00:00:00.000000) -│ └─TableScan_13 10000.00 cop table:t9, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_18 3323.33 root data:Selection_17 - └─Selection_17 3323.33 cop le(test.t9.a, 2004-12-19 00:00:00.000000) - └─TableScan_16 10000.00 cop table:t9, partition:p2, range:[-inf,+inf], keep order:false, stats:pseudo +Union_8 6646.67 root +├─TableReader_11 3323.33 root data:Selection_10 +│ └─Selection_10 3323.33 cop le(test.t9.a, 2004-12-19 00:00:00.000000) +│ └─TableScan_9 10000.00 cop table:t9, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo +└─TableReader_14 3323.33 root data:Selection_13 + └─Selection_13 3323.33 cop le(test.t9.a, 2004-12-19 00:00:00.000000) + └─TableScan_12 10000.00 cop table:t9, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo drop table t7,t8,t9; create table t1 ( a1 int not null @@ -5055,16 +4037,9 @@ TableReader_8 10.00 root data:Selection_7 └─TableScan_6 10000.00 cop table:t1, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo explain select * from t2 where a=0; id count task operator info -Union_9 30.00 root -├─TableReader_12 10.00 root data:Selection_11 -│ └─Selection_11 10.00 cop eq(test.t2.a, 0) -│ └─TableScan_10 10000.00 cop table:t2, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_15 10.00 root data:Selection_14 -│ └─Selection_14 10.00 cop eq(test.t2.a, 0) -│ └─TableScan_13 10000.00 cop table:t2, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_18 10.00 root data:Selection_17 - └─Selection_17 10.00 cop eq(test.t2.a, 0) - └─TableScan_16 10000.00 cop table:t2, partition:p2, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t2.a, 0) + └─TableScan_6 10000.00 cop table:t2, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo explain select * from t1 where a=0xFE; id count task operator info TableReader_8 10.00 root data:Selection_7 @@ -5072,16 +4047,9 @@ TableReader_8 10.00 root data:Selection_7 └─TableScan_6 10000.00 cop table:t1, partition:p2, range:[-inf,+inf], keep order:false, stats:pseudo explain select * from t2 where a=0xFE; id count task operator info -Union_9 30.00 root -├─TableReader_12 10.00 root data:Selection_11 -│ └─Selection_11 10.00 cop eq(test.t2.a, 254) -│ └─TableScan_10 10000.00 cop table:t2, partition:p0, range:[-inf,+inf], keep order:false, stats:pseudo -├─TableReader_15 10.00 root data:Selection_14 -│ └─Selection_14 10.00 cop eq(test.t2.a, 254) -│ └─TableScan_13 10000.00 cop table:t2, partition:p1, range:[-inf,+inf], keep order:false, stats:pseudo -└─TableReader_18 10.00 root data:Selection_17 - └─Selection_17 10.00 cop eq(test.t2.a, 254) - └─TableScan_16 10000.00 cop table:t2, partition:p2, range:[-inf,+inf], keep order:false, stats:pseudo +TableReader_8 10.00 root data:Selection_7 +└─Selection_7 10.00 cop eq(test.t2.a, 254) + └─TableScan_6 10000.00 cop table:t2, partition:p2, range:[-inf,+inf], keep order:false, stats:pseudo explain select * from t1 where a > 0xFE AND a <= 0xFF; id count task operator info TableDual_6 0.00 root rows:0 diff --git a/expression/constraint_propagation.go b/expression/constraint_propagation.go index 573191a3ca97b..69e8694313635 100644 --- a/expression/constraint_propagation.go +++ b/expression/constraint_propagation.go @@ -249,7 +249,21 @@ func ruleColumnOPConst(ctx sessionctx.Context, i, j int, exprs *exprSet) { return } } - if !col1.Equal(ctx, col2) { + + // Make sure col1 and col2 are the same column. + // Can't use col1.Equal(ctx, col2) here, because they are not generated in one + // expression and their UniqueID are not the same. + if col1.ColName.L != col2.ColName.L { + return + } + if col1.OrigColName.L != "" && + col2.OrigColName.L != "" && + col1.OrigColName.L != col2.OrigColName.L { + return + } + if col1.OrigTblName.L != "" && + col2.OrigTblName.L != "" && + col1.OrigColName.L != col2.OrigColName.L { return } v, isNull, err := compareConstant(ctx, negOP(OP2), fc1, con2) @@ -300,3 +314,8 @@ func compareConstant(ctx sessionctx.Context, fn string, c1, c2 Expression) (int6 } return cmp.EvalInt(ctx, chunk.Row{}) } + +// NewPartitionPruneSolver returns a constraintSolver for partition pruning. +func NewPartitionPruneSolver() constraintSolver { + return newConstraintSolver(ruleColumnOPConst) +} diff --git a/go.mod b/go.mod index 72678225a4e54..6fed4379a49ca 100644 --- a/go.mod +++ b/go.mod @@ -81,7 +81,6 @@ require ( golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb // indirect golang.org/x/text v0.3.0 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect - golang.org/x/tools v0.0.0-20190110015856-aa033095749b // indirect google.golang.org/genproto v0.0.0-20190108161440-ae2f86662275 // indirect google.golang.org/grpc v1.17.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 diff --git a/go.sum b/go.sum index 1a8e8baaa654e..ddbe4c0f41a25 100644 --- a/go.sum +++ b/go.sum @@ -200,8 +200,6 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuA golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52 h1:JG/0uqcGdTNgq7FdU+61l5Pdmb8putNZlXb65bJBROs= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110015856-aa033095749b h1:G5tsw1T5VA7PD7VmXyGtX/hQp3ABPSCPRKVfsdUcVxs= -golang.org/x/tools v0.0.0-20190110015856-aa033095749b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= diff --git a/planner/core/logical_plans.go b/planner/core/logical_plans.go index 7eef59fb8ac99..acecedc3f9c35 100644 --- a/planner/core/logical_plans.go +++ b/planner/core/logical_plans.go @@ -300,6 +300,9 @@ type DataSource struct { // pushedDownConds are the conditions that will be pushed down to coprocessor. pushedDownConds []expression.Expression + // allConds contains all the filters on this table. For now it's maintained + // in predicate push down and used only in partition pruning. + allConds []expression.Expression // relevantIndices means the indices match the push down conditions relevantIndices []bool diff --git a/planner/core/partition_pruning_test.go b/planner/core/partition_pruning_test.go new file mode 100644 index 0000000000000..3a50fa6610f8d --- /dev/null +++ b/planner/core/partition_pruning_test.go @@ -0,0 +1,63 @@ +// Copyright 2018 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// // Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package core + +import ( + . "github.com/pingcap/check" + "github.com/pingcap/parser" + "github.com/pingcap/parser/ast" + "github.com/pingcap/parser/model" + "github.com/pingcap/tidb/ddl" + "github.com/pingcap/tidb/expression" + "github.com/pingcap/tidb/util/mock" +) + +var _ = Suite(&testPartitionPruningSuite{}) + +type testPartitionPruningSuite struct { + partitionProcessor +} + +func (s *testPartitionPruningSuite) TestCanBePrune(c *C) { + p := parser.New() + stmt, err := p.ParseOneStmt("create table t (d datetime not null)", "", "") + c.Assert(err, IsNil) + tblInfo, err := ddl.BuildTableInfoFromAST(stmt.(*ast.CreateTableStmt)) + c.Assert(err, IsNil) + + // For the following case: + // CREATE TABLE t1 ( recdate DATETIME NOT NULL ) + // PARTITION BY RANGE( TO_DAYS(recdate) ) ( + // PARTITION p0 VALUES LESS THAN ( TO_DAYS('2007-03-08') ), + // PARTITION p1 VALUES LESS THAN ( TO_DAYS('2007-04-01') ) + // ); + // SELECT * FROM t1 WHERE recdate < '2007-03-08 00:00:00'; + // SELECT * FROM t1 WHERE recdate > '2018-03-08 00:00:00'; + + ctx := mock.NewContext() + columns := expression.ColumnInfos2ColumnsWithDBName(ctx, model.NewCIStr("t"), tblInfo.Name, tblInfo.Columns) + schema := expression.NewSchema(columns...) + partitionExpr, err := expression.ParseSimpleExprsWithSchema(ctx, "to_days(d) < to_days('2007-03-08') and to_days(d) >= to_days('2007-03-07')", schema) + c.Assert(err, IsNil) + queryExpr, err := expression.ParseSimpleExprsWithSchema(ctx, "d < '2000-03-08 00:00:00'", schema) + c.Assert(err, IsNil) + succ, err := s.canBePruned(ctx, nil, partitionExpr[0], queryExpr) + c.Assert(err, IsNil) + c.Assert(succ, IsTrue) + + queryExpr, err = expression.ParseSimpleExprsWithSchema(ctx, "d > '2018-03-08 00:00:00'", schema) + c.Assert(err, IsNil) + succ, err = s.canBePruned(ctx, nil, partitionExpr[0], queryExpr) + c.Assert(err, IsNil) + c.Assert(succ, IsTrue) +} diff --git a/planner/core/rule_partition_processor.go b/planner/core/rule_partition_processor.go index 4463a38e30169..8a21430b98e91 100644 --- a/planner/core/rule_partition_processor.go +++ b/planner/core/rule_partition_processor.go @@ -18,6 +18,7 @@ import ( "github.com/pingcap/tidb/expression" "github.com/pingcap/tidb/sessionctx" "github.com/pingcap/tidb/table/tables" + "github.com/pingcap/tidb/util/chunk" "github.com/pingcap/tidb/util/ranger" ) @@ -38,9 +39,6 @@ import ( type partitionProcessor struct{} func (s *partitionProcessor) optimize(lp LogicalPlan) (LogicalPlan, error) { - // NOTE: partitionProcessor will assume all filter conditions are pushed down to - // DataSource, there will not be a Selection->DataSource case, so the rewrite just - // handle the DataSource node. return s.rewriteDataSource(lp) } @@ -89,15 +87,13 @@ func (s *partitionProcessor) prune(ds *DataSource) (LogicalPlan, error) { // partitions according to the filter conditions pushed to the DataSource. children := make([]LogicalPlan, 0, len(pi.Definitions)) for i, expr := range partitionExprs { - if col != nil { - // If the selection condition would never be satisified, prune that partition. - prune, err := s.canBePrune(ds.context(), col, expr, ds.pushedDownConds) - if err != nil { - return nil, errors.Trace(err) - } - if prune { - continue - } + // If the select condition would never be satisified, prune that partition. + pruned, err := s.canBePruned(ds.context(), col, expr, ds.allConds) + if err != nil { + return nil, errors.Trace(err) + } + if pruned { + continue } // This is for `table partition (p0,p1)` syntax, only union the specified partition if has specified partitions. if len(ds.partitionNames) != 0 { @@ -134,17 +130,41 @@ func (s *partitionProcessor) prune(ds *DataSource) (LogicalPlan, error) { return unionAll, nil } -// canBePrune checks if partition expression will never meets the selection condition. +var solver = expression.NewPartitionPruneSolver() + +// canBePruned checks if partition expression will never meets the selection condition. // For example, partition by column a > 3, and select condition is a < 3, then canBePrune returns true. -func (s *partitionProcessor) canBePrune(ctx sessionctx.Context, col *expression.Column, partitionCond expression.Expression, copConds []expression.Expression) (bool, error) { - conds := make([]expression.Expression, 0, 1+len(copConds)) - conds = append(conds, partitionCond) - conds = append(conds, copConds...) - conds = expression.PropagateConstant(ctx, conds) - - // Calculate the column range to prune. - accessConds := ranger.ExtractAccessConditionsForColumn(conds, col.UniqueID) - r, err := ranger.BuildColumnRange(accessConds, ctx.GetSessionVars().StmtCtx, col.RetType) +func (s *partitionProcessor) canBePruned(sctx sessionctx.Context, partCol *expression.Column, partExpr expression.Expression, filterExprs []expression.Expression) (bool, error) { + conds := make([]expression.Expression, 0, 1+len(filterExprs)) + conds = append(conds, partExpr) + conds = append(conds, filterExprs...) + conds = expression.PropagateConstant(sctx, conds) + conds = solver.Solve(sctx, conds) + + if len(conds) == 1 { + // Constant false. + if con, ok := conds[0].(*expression.Constant); ok && con.DeferredExpr == nil { + ret, err := expression.EvalBool(sctx, expression.CNFExprs{con}, chunk.Row{}) + if err == nil && ret == false { + return true, nil + } + } + // Not a constant false, but this is the only condition, it can't be pruned. + return false, nil + } + + // Calculates the column range to prune. + if partCol == nil { + // If partition column is nil, we can't calculate range, so we can't prune + // partition by range. + return false, nil + } + + // TODO: Remove prune by calculating range. Current constraint propagate doesn't + // handle the null condition, while calculate range can prune something like: + // "select * from t where t is null" + accessConds := ranger.ExtractAccessConditionsForColumn(conds, partCol.UniqueID) + r, err := ranger.BuildColumnRange(accessConds, sctx.GetSessionVars().StmtCtx, partCol.RetType) if err != nil { return false, errors.Trace(err) } diff --git a/planner/core/rule_predicate_push_down.go b/planner/core/rule_predicate_push_down.go index 0dc17328a11a2..4de48547de1eb 100644 --- a/planner/core/rule_predicate_push_down.go +++ b/planner/core/rule_predicate_push_down.go @@ -97,6 +97,7 @@ func (p *LogicalUnionScan) PredicatePushDown(predicates []expression.Expression) // PredicatePushDown implements LogicalPlan PredicatePushDown interface. func (ds *DataSource) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan) { + ds.allConds = predicates _, ds.pushedDownConds, predicates = expression.ExpressionsToPB(ds.ctx.GetSessionVars().StmtCtx, predicates, ds.ctx.GetClient()) return predicates, ds }