From 788406ab1291f75349a586f95fc64fd6d70f56eb Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 19 May 2021 22:36:41 +0200 Subject: [PATCH] add range partition boundary testing with LT/GT expressions --- executor/partition_table_test.go | 46 + executor/testdata/executor_suite_in.json | 335 ++ executor/testdata/executor_suite_out.json | 3811 +++++++++++++++++++++ 3 files changed, 4192 insertions(+) diff --git a/executor/partition_table_test.go b/executor/partition_table_test.go index 446e689184086..7398789eadba5 100644 --- a/executor/partition_table_test.go +++ b/executor/partition_table_test.go @@ -1829,3 +1829,49 @@ PARTITION BY RANGE (a) ( s.testData.GetTestCases(c, &input, &output) s.verifyPartitionResult(tk, input, output) } + +func (s *testSuiteWithData) TestRangePartitionBoundariesLtM(c *C) { + tk := testkit.NewTestKit(c, s.store) + + tk.MustExec("set @@tidb_partition_prune_mode = 'dynamic'") + tk.MustExec("create database TestRangePartitionBoundariesLtM") + defer tk.MustExec("drop database TestRangePartitionBoundariesLtM") + tk.MustExec("use TestRangePartitionBoundariesLtM") + tk.MustExec("drop table if exists t") + tk.MustExec(`CREATE TABLE t +(a INT, b varchar(255)) +PARTITION BY RANGE (a) ( + PARTITION p0 VALUES LESS THAN (1000000), + PARTITION p1 VALUES LESS THAN (2000000), + PARTITION p2 VALUES LESS THAN (3000000))`) + + var input []string + var output []testOutput + s.testData.GetTestCases(c, &input, &output) + s.verifyPartitionResult(tk, input, output) +} + +func (s *testSuiteWithData) TestRangePartitionBoundariesLtS(c *C) { + tk := testkit.NewTestKit(c, s.store) + + tk.MustExec("set @@tidb_partition_prune_mode = 'dynamic'") + tk.MustExec("create database TestRangePartitionBoundariesLtS") + defer tk.MustExec("drop database TestRangePartitionBoundariesLtS") + tk.MustExec("use TestRangePartitionBoundariesLtS") + tk.MustExec("drop table if exists t") + tk.MustExec(`CREATE TABLE t +(a INT, b varchar(255)) +PARTITION BY RANGE (a) ( + PARTITION p0 VALUES LESS THAN (1), + PARTITION p1 VALUES LESS THAN (2), + PARTITION p2 VALUES LESS THAN (3), + PARTITION p3 VALUES LESS THAN (4), + PARTITION p4 VALUES LESS THAN (5), + PARTITION p5 VALUES LESS THAN (6), + PARTITION p6 VALUES LESS THAN (7))`) + + var input []string + var output []testOutput + s.testData.GetTestCases(c, &input, &output) + s.verifyPartitionResult(tk, input, output) +} diff --git a/executor/testdata/executor_suite_in.json b/executor/testdata/executor_suite_in.json index a8db9425a7078..cd8fa234c0117 100644 --- a/executor/testdata/executor_suite_in.json +++ b/executor/testdata/executor_suite_in.json @@ -273,5 +273,340 @@ "SELECT * FROM t WHERE a BETWEEN 2 AND 7", "SELECT * FROM t WHERE a BETWEEN 7 AND 4" ] + }, + { + "name": "TestRangePartitionBoundariesLtM", + "cases": [ + "INSERT INTO t VALUES (999998, '999998 Filler ...'), (999999, '999999 Filler ...'), (1000000, '1000000 Filler ...'), (1000001, '1000001 Filler ...'), (1000002, '1000002 Filler ...')", + "INSERT INTO t VALUES (1999998, '1999998 Filler ...'), (1999999, '1999999 Filler ...'), (2000000, '2000000 Filler ...'), (2000001, '2000001 Filler ...'), (2000002, '2000002 Filler ...')", + "INSERT INTO t VALUES (2999998, '2999998 Filler ...'), (2999999, '2999999 Filler ...')", + "INSERT INTO t VALUES (-2147483648, 'MIN_INT filler...'), (0, '0 Filler...')", + "ANALYZE TABLE t", + "SELECT * FROM t WHERE a < -2147483648", + "SELECT * FROM t WHERE a > -2147483648", + "SELECT * FROM t WHERE a <= -2147483648", + "SELECT * FROM t WHERE a >= -2147483648", + "SELECT * FROM t WHERE a < 0", + "SELECT * FROM t WHERE a > 0", + "SELECT * FROM t WHERE a <= 0", + "SELECT * FROM t WHERE a >= 0", + "SELECT * FROM t WHERE a < 999998", + "SELECT * FROM t WHERE a > 999998", + "SELECT * FROM t WHERE a <= 999998", + "SELECT * FROM t WHERE a >= 999998", + "SELECT * FROM t WHERE a < 999999", + "SELECT * FROM t WHERE a > 999999", + "SELECT * FROM t WHERE a <= 999999", + "SELECT * FROM t WHERE a >= 999999", + "SELECT * FROM t WHERE a < 1000000", + "SELECT * FROM t WHERE a > 1000000", + "SELECT * FROM t WHERE a <= 1000000", + "SELECT * FROM t WHERE a >= 1000000", + "SELECT * FROM t WHERE a < 1000001", + "SELECT * FROM t WHERE a > 1000001", + "SELECT * FROM t WHERE a <= 1000001", + "SELECT * FROM t WHERE a >= 1000001", + "SELECT * FROM t WHERE a < 1000002", + "SELECT * FROM t WHERE a > 1000002", + "SELECT * FROM t WHERE a <= 1000002", + "SELECT * FROM t WHERE a >= 1000002", + "SELECT * FROM t WHERE a < 3000000", + "SELECT * FROM t WHERE a > 3000000", + "SELECT * FROM t WHERE a <= 3000000", + "SELECT * FROM t WHERE a >= 3000000", + "SELECT * FROM t WHERE a < 3000001", + "SELECT * FROM t WHERE a > 3000001", + "SELECT * FROM t WHERE a <= 3000001", + "SELECT * FROM t WHERE a >= 3000001", + "SELECT * FROM t WHERE a < 999997", + "SELECT * FROM t WHERE a > 999997", + "SELECT * FROM t WHERE a <= 999997", + "SELECT * FROM t WHERE a >= 999997", + "SELECT * FROM t WHERE a >= 999997 AND a <= 999999", + "SELECT * FROM t WHERE a > 999997 AND a <= 999999", + "SELECT * FROM t WHERE a > 999997 AND a < 999999", + "SELECT * FROM t WHERE a > 999997 AND a <= 999999", + "SELECT * FROM t WHERE a < 999998", + "SELECT * FROM t WHERE a > 999998", + "SELECT * FROM t WHERE a <= 999998", + "SELECT * FROM t WHERE a >= 999998", + "SELECT * FROM t WHERE a >= 999998 AND a <= 1000000", + "SELECT * FROM t WHERE a > 999998 AND a <= 1000000", + "SELECT * FROM t WHERE a > 999998 AND a < 1000000", + "SELECT * FROM t WHERE a > 999998 AND a <= 1000000", + "SELECT * FROM t WHERE a < 999999", + "SELECT * FROM t WHERE a > 999999", + "SELECT * FROM t WHERE a <= 999999", + "SELECT * FROM t WHERE a >= 999999", + "SELECT * FROM t WHERE a >= 999999 AND a <= 1000001", + "SELECT * FROM t WHERE a > 999999 AND a <= 1000001", + "SELECT * FROM t WHERE a > 999999 AND a < 1000001", + "SELECT * FROM t WHERE a > 999999 AND a <= 1000001", + "SELECT * FROM t WHERE a < 1000000", + "SELECT * FROM t WHERE a > 1000000", + "SELECT * FROM t WHERE a <= 1000000", + "SELECT * FROM t WHERE a >= 1000000", + "SELECT * FROM t WHERE a >= 1000000 AND a <= 1000002", + "SELECT * FROM t WHERE a > 1000000 AND a <= 1000002", + "SELECT * FROM t WHERE a > 1000000 AND a < 1000002", + "SELECT * FROM t WHERE a > 1000000 AND a <= 1000002", + "SELECT * FROM t WHERE a < 1999997", + "SELECT * FROM t WHERE a > 1999997", + "SELECT * FROM t WHERE a <= 1999997", + "SELECT * FROM t WHERE a >= 1999997", + "SELECT * FROM t WHERE a >= 1999997 AND a <= 1999999", + "SELECT * FROM t WHERE a > 1999997 AND a <= 1999999", + "SELECT * FROM t WHERE a > 1999997 AND a < 1999999", + "SELECT * FROM t WHERE a > 1999997 AND a <= 1999999", + "SELECT * FROM t WHERE a < 1999998", + "SELECT * FROM t WHERE a > 1999998", + "SELECT * FROM t WHERE a <= 1999998", + "SELECT * FROM t WHERE a >= 1999998", + "SELECT * FROM t WHERE a >= 1999998 AND a <= 2000000", + "SELECT * FROM t WHERE a > 1999998 AND a <= 2000000", + "SELECT * FROM t WHERE a > 1999998 AND a < 2000000", + "SELECT * FROM t WHERE a > 1999998 AND a <= 2000000", + "SELECT * FROM t WHERE a < 1999999", + "SELECT * FROM t WHERE a > 1999999", + "SELECT * FROM t WHERE a <= 1999999", + "SELECT * FROM t WHERE a >= 1999999", + "SELECT * FROM t WHERE a >= 1999999 AND a <= 2000001", + "SELECT * FROM t WHERE a > 1999999 AND a <= 2000001", + "SELECT * FROM t WHERE a > 1999999 AND a < 2000001", + "SELECT * FROM t WHERE a > 1999999 AND a <= 2000001", + "SELECT * FROM t WHERE a < 2000000", + "SELECT * FROM t WHERE a > 2000000", + "SELECT * FROM t WHERE a <= 2000000", + "SELECT * FROM t WHERE a >= 2000000", + "SELECT * FROM t WHERE a >= 2000000 AND a <= 2000002", + "SELECT * FROM t WHERE a > 2000000 AND a <= 2000002", + "SELECT * FROM t WHERE a > 2000000 AND a < 2000002", + "SELECT * FROM t WHERE a > 2000000 AND a <= 2000002", + "SELECT * FROM t WHERE a < 2999997", + "SELECT * FROM t WHERE a > 2999997", + "SELECT * FROM t WHERE a <= 2999997", + "SELECT * FROM t WHERE a >= 2999997", + "SELECT * FROM t WHERE a >= 2999997 AND a <= 2999999", + "SELECT * FROM t WHERE a > 2999997 AND a <= 2999999", + "SELECT * FROM t WHERE a > 2999997 AND a < 2999999", + "SELECT * FROM t WHERE a > 2999997 AND a <= 2999999", + "SELECT * FROM t WHERE a < 2999998", + "SELECT * FROM t WHERE a > 2999998", + "SELECT * FROM t WHERE a <= 2999998", + "SELECT * FROM t WHERE a >= 2999998", + "SELECT * FROM t WHERE a >= 2999998 AND a <= 3000000", + "SELECT * FROM t WHERE a > 2999998 AND a <= 3000000", + "SELECT * FROM t WHERE a > 2999998 AND a < 3000000", + "SELECT * FROM t WHERE a > 2999998 AND a <= 3000000", + "SELECT * FROM t WHERE a < 2999999", + "SELECT * FROM t WHERE a > 2999999", + "SELECT * FROM t WHERE a <= 2999999", + "SELECT * FROM t WHERE a >= 2999999", + "SELECT * FROM t WHERE a >= 2999999 AND a <= 3000001", + "SELECT * FROM t WHERE a > 2999999 AND a <= 3000001", + "SELECT * FROM t WHERE a > 2999999 AND a < 3000001", + "SELECT * FROM t WHERE a > 2999999 AND a <= 3000001", + "SELECT * FROM t WHERE a < 3000000", + "SELECT * FROM t WHERE a > 3000000", + "SELECT * FROM t WHERE a <= 3000000", + "SELECT * FROM t WHERE a >= 3000000", + "SELECT * FROM t WHERE a >= 3000000 AND a <= 3000002", + "SELECT * FROM t WHERE a > 3000000 AND a <= 3000002", + "SELECT * FROM t WHERE a > 3000000 AND a < 3000002", + "SELECT * FROM t WHERE a > 3000000 AND a <= 3000002" + ] + }, + { + "name": "TestRangePartitionBoundariesLtS", + "cases": [ + "INSERT INTO t VALUES (0, '0 Filler...')", + "INSERT INTO t VALUES (1, '1 Filler...')", + "INSERT INTO t VALUES (2, '2 Filler...')", + "INSERT INTO t VALUES (3, '3 Filler...')", + "INSERT INTO t VALUES (4, '4 Filler...')", + "INSERT INTO t VALUES (5, '5 Filler...')", + "INSERT INTO t VALUES (6, '6 Filler...')", + "ANALYZE TABLE t", + "SELECT * FROM t WHERE a < -1", + "SELECT * FROM t WHERE a > -1", + "SELECT * FROM t WHERE a <= -1", + "SELECT * FROM t WHERE a >= -1", + "SELECT * FROM t WHERE a < 2 OR a > -1", + "SELECT * FROM t WHERE a > 2 AND a < -1", + "SELECT * FROM t WHERE NOT (a < 2 OR a > -1)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < -1)", + "SELECT * FROM t WHERE a < 2 OR a >= -1", + "SELECT * FROM t WHERE a >= 2 AND a < -1", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= -1)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < -1)", + "SELECT * FROM t WHERE a <= 2 OR a > -1", + "SELECT * FROM t WHERE a > 2 AND a <= -1", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > -1)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= -1)", + "SELECT * FROM t WHERE a <= 2 OR a >= -1", + "SELECT * FROM t WHERE a >= 2 AND a <= -1", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= -1)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= -1)", + "SELECT * FROM t WHERE a < 0", + "SELECT * FROM t WHERE a > 0", + "SELECT * FROM t WHERE a <= 0", + "SELECT * FROM t WHERE a >= 0", + "SELECT * FROM t WHERE a < 2 OR a > 0", + "SELECT * FROM t WHERE a > 2 AND a < 0", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 0)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 0)", + "SELECT * FROM t WHERE a < 2 OR a >= 0", + "SELECT * FROM t WHERE a >= 2 AND a < 0", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 0)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 0)", + "SELECT * FROM t WHERE a <= 2 OR a > 0", + "SELECT * FROM t WHERE a > 2 AND a <= 0", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 0)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 0)", + "SELECT * FROM t WHERE a <= 2 OR a >= 0", + "SELECT * FROM t WHERE a >= 2 AND a <= 0", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 0)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 0)", + "SELECT * FROM t WHERE a < 1", + "SELECT * FROM t WHERE a > 1", + "SELECT * FROM t WHERE a <= 1", + "SELECT * FROM t WHERE a >= 1", + "SELECT * FROM t WHERE a < 2 OR a > 1", + "SELECT * FROM t WHERE a > 2 AND a < 1", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 1)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 1)", + "SELECT * FROM t WHERE a < 2 OR a >= 1", + "SELECT * FROM t WHERE a >= 2 AND a < 1", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 1)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 1)", + "SELECT * FROM t WHERE a <= 2 OR a > 1", + "SELECT * FROM t WHERE a > 2 AND a <= 1", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 1)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 1)", + "SELECT * FROM t WHERE a <= 2 OR a >= 1", + "SELECT * FROM t WHERE a >= 2 AND a <= 1", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 1)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 1)", + "SELECT * FROM t WHERE a < 2", + "SELECT * FROM t WHERE a > 2", + "SELECT * FROM t WHERE a <= 2", + "SELECT * FROM t WHERE a >= 2", + "SELECT * FROM t WHERE a < 2 OR a > 2", + "SELECT * FROM t WHERE a > 2 AND a < 2", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 2)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 2)", + "SELECT * FROM t WHERE a < 2 OR a >= 2", + "SELECT * FROM t WHERE a >= 2 AND a < 2", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 2)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 2)", + "SELECT * FROM t WHERE a <= 2 OR a > 2", + "SELECT * FROM t WHERE a > 2 AND a <= 2", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 2)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 2)", + "SELECT * FROM t WHERE a <= 2 OR a >= 2", + "SELECT * FROM t WHERE a >= 2 AND a <= 2", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 2)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 2)", + "SELECT * FROM t WHERE a < 3", + "SELECT * FROM t WHERE a > 3", + "SELECT * FROM t WHERE a <= 3", + "SELECT * FROM t WHERE a >= 3", + "SELECT * FROM t WHERE a < 2 OR a > 3", + "SELECT * FROM t WHERE a > 2 AND a < 3", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 3)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 3)", + "SELECT * FROM t WHERE a < 2 OR a >= 3", + "SELECT * FROM t WHERE a >= 2 AND a < 3", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 3)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 3)", + "SELECT * FROM t WHERE a <= 2 OR a > 3", + "SELECT * FROM t WHERE a > 2 AND a <= 3", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 3)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 3)", + "SELECT * FROM t WHERE a <= 2 OR a >= 3", + "SELECT * FROM t WHERE a >= 2 AND a <= 3", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 3)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 3)", + "SELECT * FROM t WHERE a < 4", + "SELECT * FROM t WHERE a > 4", + "SELECT * FROM t WHERE a <= 4", + "SELECT * FROM t WHERE a >= 4", + "SELECT * FROM t WHERE a < 2 OR a > 4", + "SELECT * FROM t WHERE a > 2 AND a < 4", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 4)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 4)", + "SELECT * FROM t WHERE a < 2 OR a >= 4", + "SELECT * FROM t WHERE a >= 2 AND a < 4", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 4)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 4)", + "SELECT * FROM t WHERE a <= 2 OR a > 4", + "SELECT * FROM t WHERE a > 2 AND a <= 4", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 4)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 4)", + "SELECT * FROM t WHERE a <= 2 OR a >= 4", + "SELECT * FROM t WHERE a >= 2 AND a <= 4", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 4)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 4)", + "SELECT * FROM t WHERE a < 5", + "SELECT * FROM t WHERE a > 5", + "SELECT * FROM t WHERE a <= 5", + "SELECT * FROM t WHERE a >= 5", + "SELECT * FROM t WHERE a < 2 OR a > 5", + "SELECT * FROM t WHERE a > 2 AND a < 5", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 5)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 5)", + "SELECT * FROM t WHERE a < 2 OR a >= 5", + "SELECT * FROM t WHERE a >= 2 AND a < 5", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 5)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 5)", + "SELECT * FROM t WHERE a <= 2 OR a > 5", + "SELECT * FROM t WHERE a > 2 AND a <= 5", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 5)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 5)", + "SELECT * FROM t WHERE a <= 2 OR a >= 5", + "SELECT * FROM t WHERE a >= 2 AND a <= 5", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 5)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 5)", + "SELECT * FROM t WHERE a < 6", + "SELECT * FROM t WHERE a > 6", + "SELECT * FROM t WHERE a <= 6", + "SELECT * FROM t WHERE a >= 6", + "SELECT * FROM t WHERE a < 2 OR a > 6", + "SELECT * FROM t WHERE a > 2 AND a < 6", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 6)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 6)", + "SELECT * FROM t WHERE a < 2 OR a >= 6", + "SELECT * FROM t WHERE a >= 2 AND a < 6", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 6)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 6)", + "SELECT * FROM t WHERE a <= 2 OR a > 6", + "SELECT * FROM t WHERE a > 2 AND a <= 6", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 6)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 6)", + "SELECT * FROM t WHERE a <= 2 OR a >= 6", + "SELECT * FROM t WHERE a >= 2 AND a <= 6", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 6)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 6)", + "SELECT * FROM t WHERE a < 7", + "SELECT * FROM t WHERE a > 7", + "SELECT * FROM t WHERE a <= 7", + "SELECT * FROM t WHERE a >= 7", + "SELECT * FROM t WHERE a < 2 OR a > 7", + "SELECT * FROM t WHERE a > 2 AND a < 7", + "SELECT * FROM t WHERE NOT (a < 2 OR a > 7)", + "SELECT * FROM t WHERE NOT (a > 2 AND a < 7)", + "SELECT * FROM t WHERE a < 2 OR a >= 7", + "SELECT * FROM t WHERE a >= 2 AND a < 7", + "SELECT * FROM t WHERE NOT (a < 2 OR a >= 7)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a < 7)", + "SELECT * FROM t WHERE a <= 2 OR a > 7", + "SELECT * FROM t WHERE a > 2 AND a <= 7", + "SELECT * FROM t WHERE NOT (a <= 2 OR a > 7)", + "SELECT * FROM t WHERE NOT (a > 2 AND a <= 7)", + "SELECT * FROM t WHERE a <= 2 OR a >= 7", + "SELECT * FROM t WHERE a >= 2 AND a <= 7", + "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 7)", + "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 7)" + ] } ] diff --git a/executor/testdata/executor_suite_out.json b/executor/testdata/executor_suite_out.json index bd5fbdb486ac0..fd834a5229662 100644 --- a/executor/testdata/executor_suite_out.json +++ b/executor/testdata/executor_suite_out.json @@ -2562,5 +2562,3816 @@ "Res": null } ] + }, + { + "Name": "TestRangePartitionBoundariesLtM", + "Cases": [ + { + "SQL": "INSERT INTO t VALUES (999998, '999998 Filler ...'), (999999, '999999 Filler ...'), (1000000, '1000000 Filler ...'), (1000001, '1000001 Filler ...'), (1000002, '1000002 Filler ...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (1999998, '1999998 Filler ...'), (1999999, '1999999 Filler ...'), (2000000, '2000000 Filler ...'), (2000001, '2000001 Filler ...'), (2000002, '2000002 Filler ...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (2999998, '2999998 Filler ...'), (2999999, '2999999 Filler ...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (-2147483648, 'MIN_INT filler...'), (0, '0 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "ANALYZE TABLE t", + "Plan": null, + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a < -2147483648", + "Plan": [ + "p0" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > -2147483648", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= -2147483648", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= -2147483648", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 0", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 0", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 0", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 0", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 999998", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999998", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 999998", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999998", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 999999", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999999", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 999999", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999999", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1000000", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1000000", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1000000", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1000000", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1000001", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1000001", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1000001", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1000001", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1000002", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1000002", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1000002", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1000002", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 3000000", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 3000000", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a <= 3000000", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 3000000", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a < 3000001", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 3000001", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a <= 3000001", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 3000001", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a < 999997", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999997", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 999997", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999997", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999997 AND a <= 999999", + "Plan": [ + "p0" + ], + "Res": [ + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999997 AND a <= 999999", + "Plan": [ + "p0" + ], + "Res": [ + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999997 AND a < 999999", + "Plan": [ + "p0" + ], + "Res": [ + "999998 999998 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999997 AND a <= 999999", + "Plan": [ + "p0" + ], + "Res": [ + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 999998", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999998", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 999998", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999998", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999998 AND a <= 1000000", + "Plan": [ + "p0 p1" + ], + "Res": [ + "1000000 1000000 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999998 AND a <= 1000000", + "Plan": [ + "p0 p1" + ], + "Res": [ + "1000000 1000000 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999998 AND a < 1000000", + "Plan": [ + "p0" + ], + "Res": [ + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999998 AND a <= 1000000", + "Plan": [ + "p0 p1" + ], + "Res": [ + "1000000 1000000 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 999999", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999999", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 999999", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999999", + "Plan": [ + "all" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 999999 AND a <= 1000001", + "Plan": [ + "p0 p1" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999999 AND a <= 1000001", + "Plan": [ + "p1" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999999 AND a < 1000001", + "Plan": [ + "p1" + ], + "Res": [ + "1000000 1000000 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 999999 AND a <= 1000001", + "Plan": [ + "p1" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1000000", + "Plan": [ + "p0" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1000000", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1000000", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1000000", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1000000 AND a <= 1000002", + "Plan": [ + "p1" + ], + "Res": [ + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1000000 AND a <= 1000002", + "Plan": [ + "p1" + ], + "Res": [ + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1000000 AND a < 1000002", + "Plan": [ + "p1" + ], + "Res": [ + "1000001 1000001 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1000000 AND a <= 1000002", + "Plan": [ + "p1" + ], + "Res": [ + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1999997", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999997", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1999997", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1999997", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1999997 AND a <= 1999999", + "Plan": [ + "p1" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999997 AND a <= 1999999", + "Plan": [ + "p1" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999997 AND a < 1999999", + "Plan": [ + "p1" + ], + "Res": [ + "1999998 1999998 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999997 AND a <= 1999999", + "Plan": [ + "p1" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1999998", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999998", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1999998", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1999998", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1999998 AND a <= 2000000", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999998 AND a <= 2000000", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999998 AND a < 2000000", + "Plan": [ + "p1" + ], + "Res": [ + "1999999 1999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999998 AND a <= 2000000", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1999999", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999999", + "Plan": [ + "p2" + ], + "Res": [ + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1999999", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1999999", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1999999 AND a <= 2000001", + "Plan": [ + "p1 p2" + ], + "Res": [ + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999999 AND a <= 2000001", + "Plan": [ + "p2" + ], + "Res": [ + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999999 AND a < 2000001", + "Plan": [ + "p2" + ], + "Res": [ + "2000000 2000000 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1999999 AND a <= 2000001", + "Plan": [ + "p2" + ], + "Res": [ + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2000000", + "Plan": [ + "p0 p1" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2000000", + "Plan": [ + "p2" + ], + "Res": [ + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2000000", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2000000", + "Plan": [ + "p2" + ], + "Res": [ + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2000000 AND a <= 2000002", + "Plan": [ + "p2" + ], + "Res": [ + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2000000 AND a <= 2000002", + "Plan": [ + "p2" + ], + "Res": [ + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2000000 AND a < 2000002", + "Plan": [ + "p2" + ], + "Res": [ + "2000001 2000001 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2000000 AND a <= 2000002", + "Plan": [ + "p2" + ], + "Res": [ + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2999997", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999997", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2999997", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2999997", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2999997 AND a <= 2999999", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999997 AND a <= 2999999", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999997 AND a < 2999999", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999997 AND a <= 2999999", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2999998", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999998", + "Plan": [ + "p2" + ], + "Res": [ + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2999998", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2999998", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2999998 AND a <= 3000000", + "Plan": [ + "p2" + ], + "Res": [ + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999998 AND a <= 3000000", + "Plan": [ + "p2" + ], + "Res": [ + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999998 AND a < 3000000", + "Plan": [ + "p2" + ], + "Res": [ + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999998 AND a <= 3000000", + "Plan": [ + "p2" + ], + "Res": [ + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2999999", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999999", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2999999", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2999999", + "Plan": [ + "p2" + ], + "Res": [ + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2999999 AND a <= 3000001", + "Plan": [ + "p2" + ], + "Res": [ + "2999999 2999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999999 AND a <= 3000001", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999999 AND a < 3000001", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > 2999999 AND a <= 3000001", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a < 3000000", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 3000000", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a <= 3000000", + "Plan": [ + "all" + ], + "Res": [ + "-2147483648 MIN_INT filler...", + "0 0 Filler...", + "1000000 1000000 Filler ...", + "1000001 1000001 Filler ...", + "1000002 1000002 Filler ...", + "1999998 1999998 Filler ...", + "1999999 1999999 Filler ...", + "2000000 2000000 Filler ...", + "2000001 2000001 Filler ...", + "2000002 2000002 Filler ...", + "2999998 2999998 Filler ...", + "2999999 2999999 Filler ...", + "999998 999998 Filler ...", + "999999 999999 Filler ..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 3000000", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a >= 3000000 AND a <= 3000002", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > 3000000 AND a <= 3000002", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > 3000000 AND a < 3000002", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > 3000000 AND a <= 3000002", + "Plan": [ + "dual" + ], + "Res": null + } + ] + }, + { + "Name": "TestRangePartitionBoundariesLtS", + "Cases": [ + { + "SQL": "INSERT INTO t VALUES (0, '0 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (1, '1 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (2, '2 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (3, '3 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (4, '4 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (5, '5 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "INSERT INTO t VALUES (6, '6 Filler...')", + "Plan": null, + "Res": null + }, + { + "SQL": "ANALYZE TABLE t", + "Plan": null, + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a < -1", + "Plan": [ + "p0" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > -1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= -1", + "Plan": [ + "p0" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a >= -1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > -1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < -1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > -1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < -1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= -1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < -1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= -1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < -1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > -1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= -1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > -1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= -1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= -1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= -1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= -1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= -1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 0", + "Plan": [ + "p0" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a > 0", + "Plan": [ + "p1 p2 p3 p4 p5 p6" + ], + "Res": [ + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 0", + "Plan": [ + "p0" + ], + "Res": [ + "0 0 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 0", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 0", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 0", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 0)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 0)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 0", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 0", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 0)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 0)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 0", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 0", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 0)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 0)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 0", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 0", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 0)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 0)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 1", + "Plan": [ + "p0" + ], + "Res": [ + "0 0 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 1", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 1", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 1", + "Plan": [ + "p1 p2 p3 p4 p5 p6" + ], + "Res": [ + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 1", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 1", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 1)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 1)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 2", + "Plan": [ + "p0 p1 p3 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 2", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 2)", + "Plan": [ + "p2" + ], + "Res": [ + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 2)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 2", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 2", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 2)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 2)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 2", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 2", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 2)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 2)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 2", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 2", + "Plan": [ + "p2" + ], + "Res": [ + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 2)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 2)", + "Plan": [ + "p0 p1 p3 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 3", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 3", + "Plan": [ + "p4 p5 p6" + ], + "Res": [ + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 3", + "Plan": [ + "p0 p1 p2 p3" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 3", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 3", + "Plan": [ + "p0 p1 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 3", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 3)", + "Plan": [ + "p2 p3" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 3)", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 3", + "Plan": [ + "p0 p1 p3 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 3", + "Plan": [ + "p2" + ], + "Res": [ + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 3)", + "Plan": [ + "p2" + ], + "Res": [ + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 3)", + "Plan": [ + "p0 p1 p3 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 3", + "Plan": [ + "p0 p1 p2 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 3", + "Plan": [ + "p3" + ], + "Res": [ + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 3)", + "Plan": [ + "p3" + ], + "Res": [ + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 3)", + "Plan": [ + "p0 p1 p2 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 3", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 3", + "Plan": [ + "p2 p3" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 3)", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 3)", + "Plan": [ + "p0 p1 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 4", + "Plan": [ + "p0 p1 p2 p3" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 4", + "Plan": [ + "p5 p6" + ], + "Res": [ + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 4", + "Plan": [ + "p0 p1 p2 p3 p4" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 4", + "Plan": [ + "p4 p5 p6" + ], + "Res": [ + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 4", + "Plan": [ + "p0 p1 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 4", + "Plan": [ + "p3" + ], + "Res": [ + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 4)", + "Plan": [ + "p2 p3 p4" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 4)", + "Plan": [ + "p0 p1 p2 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 4", + "Plan": [ + "p0 p1 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 4", + "Plan": [ + "p2 p3" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 4)", + "Plan": [ + "p2 p3" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 4)", + "Plan": [ + "p0 p1 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 4", + "Plan": [ + "p0 p1 p2 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 4", + "Plan": [ + "p3 p4" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 4)", + "Plan": [ + "p3 p4" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 4)", + "Plan": [ + "p0 p1 p2 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 4", + "Plan": [ + "p0 p1 p2 p4 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 4", + "Plan": [ + "p2 p3 p4" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 4)", + "Plan": [ + "p3" + ], + "Res": [ + "3 3 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 4)", + "Plan": [ + "p0 p1 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 5", + "Plan": [ + "p0 p1 p2 p3 p4" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 5", + "Plan": [ + "p6" + ], + "Res": [ + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 5", + "Plan": [ + "p0 p1 p2 p3 p4 p5" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 5", + "Plan": [ + "p5 p6" + ], + "Res": [ + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 5", + "Plan": [ + "p0 p1 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 5", + "Plan": [ + "p3 p4" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 5)", + "Plan": [ + "p2 p3 p4 p5" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 5)", + "Plan": [ + "p0 p1 p2 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 5", + "Plan": [ + "p0 p1 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 5", + "Plan": [ + "p2 p3 p4" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 5)", + "Plan": [ + "p2 p3 p4" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 5)", + "Plan": [ + "p0 p1 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 5", + "Plan": [ + "p0 p1 p2 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 5", + "Plan": [ + "p3 p4 p5" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 5)", + "Plan": [ + "p3 p4 p5" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 5)", + "Plan": [ + "p0 p1 p2 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 5", + "Plan": [ + "p0 p1 p2 p5 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 5", + "Plan": [ + "p2 p3 p4 p5" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 5)", + "Plan": [ + "p3 p4" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 5)", + "Plan": [ + "p0 p1 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 6", + "Plan": [ + "p0 p1 p2 p3 p4 p5" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 6", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a <= 6", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 6", + "Plan": [ + "p6" + ], + "Res": [ + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 6", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 6", + "Plan": [ + "p3 p4 p5" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 6)", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 6)", + "Plan": [ + "p0 p1 p2 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 6", + "Plan": [ + "p0 p1 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 6", + "Plan": [ + "p2 p3 p4 p5" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 6)", + "Plan": [ + "p2 p3 p4 p5" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 6)", + "Plan": [ + "p0 p1 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 6", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 6", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 6)", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 6)", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 6", + "Plan": [ + "p0 p1 p2 p6" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 6", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 6)", + "Plan": [ + "p3 p4 p5" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 6)", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 7", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 7", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a <= 7", + "Plan": [ + "all" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 7", + "Plan": [ + "dual" + ], + "Res": null + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a > 7", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a < 7", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a > 7)", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a < 7)", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a < 2 OR a >= 7", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a < 7", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a < 2 OR a >= 7)", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a < 7)", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a > 7", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a > 2 AND a <= 7", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a > 7)", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a > 2 AND a <= 7)", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a <= 2 OR a >= 7", + "Plan": [ + "p0 p1 p2" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler...", + "2 2 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE a >= 2 AND a <= 7", + "Plan": [ + "p2 p3 p4 p5 p6" + ], + "Res": [ + "2 2 Filler...", + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a <= 2 OR a >= 7)", + "Plan": [ + "p3 p4 p5 p6" + ], + "Res": [ + "3 3 Filler...", + "4 4 Filler...", + "5 5 Filler...", + "6 6 Filler..." + ] + }, + { + "SQL": "SELECT * FROM t WHERE NOT (a >= 2 AND a <= 7)", + "Plan": [ + "p0 p1" + ], + "Res": [ + "0 0 Filler...", + "1 1 Filler..." + ] + } + ] } ]