diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 293196ee27..17608b7dcc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,5 @@ name: Test -on: [push, pull_request] +on: [pull_request] jobs: test: strategy: diff --git a/_example/main.go b/_example/main.go index c7b82987a9..bee12c4433 100644 --- a/_example/main.go +++ b/_example/main.go @@ -65,8 +65,8 @@ func createTestDatabase() *memory.Database { db := memory.NewDatabase(dbName) table := memory.NewTable(tableName, sql.NewPrimaryKeySchema(sql.Schema{ - {Name: "name", Type: sql.Text, Nullable: false, Source: tableName,PrimaryKey:true}, - {Name: "email", Type: sql.Text, Nullable: false, Source: tableName,PrimaryKey:true}, + {Name: "name", Type: sql.Text, Nullable: false, Source: tableName, PrimaryKey: true}, + {Name: "email", Type: sql.Text, Nullable: false, Source: tableName, PrimaryKey: true}, {Name: "phone_numbers", Type: sql.JSON, Nullable: false, Source: tableName}, {Name: "created_at", Type: sql.Timestamp, Nullable: false, Source: tableName}, }), db.GetForeignKeyCollection()) diff --git a/engine.go b/engine.go index 888fbe0be4..2b4fd77238 100644 --- a/engine.go +++ b/engine.go @@ -146,11 +146,11 @@ func (e *Engine) PrepareQuery( if err != nil { return nil, err } - e.cachePreparedStmt(ctx, node, query) + e.CachePreparedStmt(ctx, node, query) return node, nil } -// Query executes a query. If parsed is non-nil, it will be used instead of parsing the query from text. +// Query executes a query. func (e *Engine) Query(ctx *sql.Context, query string) (sql.Schema, sql.RowIter, error) { return e.QueryWithBindings(ctx, query, nil) } @@ -258,7 +258,7 @@ func clearAutocommitTransaction(ctx *sql.Context) error { return nil } -func (e *Engine) cachePreparedStmt(ctx *sql.Context, analyzed sql.Node, query string) { +func (e *Engine) CachePreparedStmt(ctx *sql.Context, analyzed sql.Node, query string) { e.mu.Lock() defer e.mu.Unlock() e.PreparedData[ctx.Session.ID()] = PreparedData{ diff --git a/enginetest/engine_test.go b/enginetest/engine_test.go index 49511b3b7c..7d4da4fe07 100644 --- a/enginetest/engine_test.go +++ b/enginetest/engine_test.go @@ -30,6 +30,7 @@ import ( sqle "github.com/dolthub/go-mysql-server" "github.com/dolthub/go-mysql-server/enginetest" + "github.com/dolthub/go-mysql-server/enginetest/queries" "github.com/dolthub/go-mysql-server/memory" "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/analyzer" @@ -471,7 +472,7 @@ func assertNodesEqualWithDiff(t *testing.T, expected, actual sql.Node) { } func TestTableFunctions(t *testing.T) { - var tableFunctionScriptTests = []enginetest.ScriptTest{ + var tableFunctionScriptTests = []queries.ScriptTest{ { Name: "undefined table function", Query: "SELECT * from does_not_exist('q', 123);", diff --git a/enginetest/enginetests.go b/enginetest/enginetests.go index 881c7f8111..f8fc70422b 100644 --- a/enginetest/enginetests.go +++ b/enginetest/enginetests.go @@ -32,6 +32,8 @@ import ( "gopkg.in/src-d/go-errors.v1" sqle "github.com/dolthub/go-mysql-server" + "github.com/dolthub/go-mysql-server/enginetest/queries" + setup2 "github.com/dolthub/go-mysql-server/enginetest/scriptgen/setup" "github.com/dolthub/go-mysql-server/server" "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/analyzer" @@ -45,131 +47,117 @@ import ( "github.com/dolthub/go-mysql-server/test" ) -// Tests a variety of queries against databases and tables provided by the given harness. +// TestQueries tests a variety of queries against databases and tables provided by the given harness. func TestQueries(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - defer engine.Close() - - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - - for _, tt := range QueryTests { - TestQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + harness.Setup(setup2.SimpleSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + ctx := NewContext(harness) + for _, tt := range queries.QueryTests { + t.Run(tt.Query, func(t *testing.T) { + if sh, ok := harness.(SkippingHarness); ok { + if sh.SkipQueryTest(tt.Query) { + t.Skipf("Skipping query plan for %s", tt.Query) + } + } + TestQueryWithContext(t, ctx, e, tt.Query, tt.Expected, tt.ExpectedColumns, nil) + }) } if keyless, ok := harness.(KeylessTableHarness); ok && keyless.SupportsKeylessTables() { - for _, tt := range KeylessQueries { - TestQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + for _, tt := range queries.KeylessQueries { + TestQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns, nil) } } } // Tests a variety of geometry queries against databases and tables provided by the given harness. func TestSpatialQueries(t *testing.T, harness Harness) { - engine := NewSpatialEngine(t, harness) - defer engine.Close() - - for _, tt := range SpatialQueryTests { - TestQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + harness.Setup(setup2.SpatialSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + for _, tt := range queries.SpatialQueryTests { + TestQueryWithEngine(t, harness, e, tt) } } // Tests a variety of geometry queries against databases and tables provided by the given harness. func TestSpatialQueriesPrepared(t *testing.T, harness Harness) { - engine := NewSpatialEngine(t, harness) - defer engine.Close() - for _, tt := range SpatialQueryTests { - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + harness.Setup(setup2.SpatialSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + for _, tt := range queries.SpatialQueryTests { + TestPreparedQueryWithEngine(t, harness, e, tt) } - newEngine := func() *sqle.Engine { - return NewSpatialEngine(t, harness) + for _, tt := range queries.SpatialDeleteTests { + runWriteQueryTestPrepared(t, harness, tt) } - for _, tt := range SpatialDeleteTests { - runWriteQueryTest(t, harness, tt, newEngine) + for _, tt := range queries.SpatialInsertQueries { + runWriteQueryTestPrepared(t, harness, tt) } - for _, tt := range SpatialInsertQueries { - runWriteQueryTest(t, harness, tt, newEngine) + for _, tt := range queries.SpatialUpdateTests { + runWriteQueryTestPrepared(t, harness, tt) } - for _, tt := range SpatialUpdateTests { - runWriteQueryTest(t, harness, tt, newEngine) - } - - t.Run("create table with NULL default values for geometry types", func(t *testing.T) { - ctx := NewContext(harness) - - TestQuery(t, harness, engine, "CREATE TABLE null_default (pk int NOT NULL PRIMARY KEY, v1 geometry DEFAULT NULL, v2 linestring DEFAULT NULL, v3 point DEFAULT NULL, v4 polygon DEFAULT NULL)", - []sql.Row{{sql.NewOkResult(0)}}, nil) - db, err := engine.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - _, ok, err := db.GetTableInsensitive(ctx, "null_default") - require.NoError(t, err) - require.True(t, ok) - }) - } // Tests join queries against a provided harness. func TestJoinQueries(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - - for _, tt := range JoinQueryTests { - TestQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Pk_tablesData, setup2.OthertableData) + for _, tt := range queries.JoinQueryTests { + TestQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns, nil) } t.Skip() - for _, tt := range SkippedJoinQueryTests { - TestQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + for _, tt := range queries.SkippedJoinQueryTests { + TestQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns, nil) } } // TestInfoSchemaPrepared runs tests of the information_schema database func TestInfoSchemaPrepared(t *testing.T, harness Harness) { - dbs := CreateSubsetTestData(t, harness, infoSchemaTables) - engine := NewEngineWithDbs(t, harness, dbs) - defer engine.Close() - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - - for _, tt := range InfoSchemaQueries { - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Fk_tblData, setup2.FooData) + for _, tt := range queries.InfoSchemaQueries { + TestPreparedQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns) } - for _, script := range InfoSchemaScripts { + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Fk_tblData, setup2.FooData) + for _, script := range queries.InfoSchemaScripts { TestScriptPrepared(t, harness, script) } } func TestQueriesPrepared(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - defer engine.Close() - - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - - for _, tt := range QueryTests { + harness.Setup(setup2.SimpleSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + for _, tt := range queries.QueryTests { if tt.SkipPrepared { continue } - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) - } - for _, tt := range KeylessQueries { - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + TestPreparedQueryWithEngine(t, harness, e, tt) } - for _, tt := range DateParseQueries { - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + + harness.Setup(setup2.MydbData, setup2.KeylessData, setup2.MytableData) + for _, tt := range queries.KeylessQueries { + TestPreparedQueryWithEngine(t, harness, e, tt) } - for _, tt := range DateParseQueries { - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + + harness.Setup(setup2.MydbData) + for _, tt := range queries.DateParseQueries { + TestPreparedQueryWithEngine(t, harness, e, tt) } } -func TestPreparedStaticIndexQuery(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - ctx := NewContextWithEngine(harness, engine) +func TestBrokenQueries(t *testing.T, harness Harness) { + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Pk_tablesData, setup2.Fk_tblData) + RunQueryTests(t, harness, queries.BrokenQueries) +} +func TestPreparedStaticIndexQuery(t *testing.T, harness Harness) { + harness.Setup(setup2.MydbData) + engine := mustNewEngine(t, harness) + defer engine.Close() + ctx := NewContext(harness) RunQueryWithContext(t, engine, ctx, "CREATE TABLE squares (i bigint primary key, square bigint);") engine.PrepareQuery(ctx, "select * from squares where i = 1") RunQueryWithContext(t, engine, ctx, "INSERT INTO squares VALUES (0, 0), (1, 1), (2, 4), (3, 9);") @@ -179,53 +167,24 @@ func TestPreparedStaticIndexQuery(t *testing.T, harness Harness) { // Runs the query tests given after setting up the engine. Useful for testing out a smaller subset of queries during // debugging. -func RunQueryTests(t *testing.T, harness Harness, queries []QueryTest) { - engine := NewEngine(t, harness) - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - +func RunQueryTests(t *testing.T, harness Harness, queries []queries.QueryTest) { for _, tt := range queries { - TestQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) - } -} - -// To test the information schema database, we only include a subset of the tables defined in the test data when -// creating tables. This lets us avoid having to change the information_schema tests every time we add a table to the -// test suites. -var infoSchemaTables = []string{ - "mytable", - "othertable", - "tabletest", - "bigtable", - "floattable", - "niltable", - "newlinetable", - "other_table", - "fk_tbl", - "auto_increment_tbl", - "people", - "datetime_table", - "one_pk_two_idx", - "one_pk_three_idx", - "invert_pk", + TestQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns, nil) + } } // TestInfoSchema runs tests of the information_schema database -func TestInfoSchema(t *testing.T, harness Harness) { - dbs := CreateSubsetTestData(t, harness, infoSchemaTables) - engine := NewEngineWithDbs(t, harness, dbs) - defer engine.Close() - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) +func TestInfoSchema(t *testing.T, h Harness) { + h.Setup(setup2.MydbData, setup2.MytableData, setup2.Fk_tblData, setup2.FooData) + RunQueryTests(t, h, queries.InfoSchemaQueries) - for _, tt := range InfoSchemaQueries { - TestQuery(t, harness, engine, tt.Query, tt.Expected, nil) - } - for _, script := range InfoSchemaScripts { - TestScript(t, harness, script) + for _, script := range queries.InfoSchemaScripts { + TestScript(t, h, script) } t.Run("information_schema.processlist", func(t *testing.T) { + e := mustNewEngine(t, h) + defer e.Close() p := sqle.NewProcessList() sess := sql.NewBaseSessionWithClientServer("localhost", sql.Client{Address: "localhost", User: "root"}, 1) ctx := sql.NewContext(context.Background(), sql.WithPid(1), sql.WithSession(sess), sql.WithProcessList(p)) @@ -233,7 +192,7 @@ func TestInfoSchema(t *testing.T, harness Harness) { ctx, err := p.AddProcess(ctx, "SELECT foo") require.NoError(t, err) - TestQueryWithContext(t, ctx, engine, "SELECT * FROM information_schema.processlist", []sql.Row{{1, "root", "localhost", "NULL", "Query", 0, "processlist(processlist (0/? partitions))", "SELECT foo"}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM information_schema.processlist", []sql.Row{{1, "root", "localhost", "NULL", "Query", 0, "processlist(processlist (0/? partitions))", "SELECT foo"}}, nil, nil) require.NoError(t, err) }) } @@ -253,6 +212,13 @@ func createForeignKeys(t *testing.T, harness Harness, engine *sqle.Engine) { } } +func createReadOnlyDatabases(h ReadOnlyDatabaseHarness) (dbs []sql.Database) { + for _, r := range h.NewReadOnlyDatabases("mydb", "foo") { + dbs = append(dbs, sql.Database(r)) // FURP + } + return dbs +} + func TestReadOnlyDatabases(t *testing.T, harness Harness) { ro, ok := harness.(ReadOnlyDatabaseHarness) if !ok { @@ -263,21 +229,21 @@ func TestReadOnlyDatabases(t *testing.T, harness Harness) { engine := NewEngineWithDbs(t, harness, dbs) defer engine.Close() - for _, querySet := range [][]QueryTest{ - QueryTests, - KeylessQueries, - VersionedQueries, + for _, querySet := range [][]queries.QueryTest{ + queries.QueryTests, + queries.KeylessQueries, + queries.VersionedQueries, } { for _, tt := range querySet { - TestQuery(t, harness, engine, tt.Query, tt.Expected, tt.ExpectedColumns) + TestQueryWithEngine(t, harness, engine, tt) } } - for _, querySet := range [][]WriteQueryTest{ - InsertQueries, - UpdateTests, - DeleteTests, - ReplaceQueries, + for _, querySet := range [][]queries.WriteQueryTest{ + queries.InsertQueries, + queries.UpdateTests, + queries.DeleteTests, + queries.ReplaceQueries, } { for _, tt := range querySet { t.Run(tt.WriteQuery, func(t *testing.T) { @@ -287,56 +253,34 @@ func TestReadOnlyDatabases(t *testing.T, harness Harness) { } } -func createReadOnlyDatabases(h ReadOnlyDatabaseHarness) (dbs []sql.Database) { - for _, r := range h.NewReadOnlyDatabases("mydb", "foo") { - dbs = append(dbs, sql.Database(r)) // FURP - } - return dbs -} - // Tests generating the correct query plans for various queries using databases and tables provided by the given // harness. func TestQueryPlans(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - defer engine.Close() - - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - for _, tt := range PlanTests { - t.Run(tt.Query, func(t *testing.T) { - TestQueryPlan(t, NewContextWithEngine(harness, engine), engine, harness, tt.Query, tt.ExpectedPlan) - }) + harness.Setup(setup2.SimpleSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + for _, tt := range queries.PlanTests { + TestQueryPlan(t, harness, e, tt.Query, tt.ExpectedPlan) } } func TestIndexQueryPlans(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - defer engine.Close() - - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - for i, script := range ComplexIndexQueries { - for _, statement := range script.SetUpScript { - statement = strings.Replace(statement, "test", fmt.Sprintf("t%d", i), -1) - RunQuery(t, engine, harness, statement) - } - } - - for _, tt := range IndexPlanTests { - t.Run(tt.Query, func(t *testing.T) { - TestQueryPlan(t, NewContextWithEngine(harness, engine), engine, harness, tt.Query, tt.ExpectedPlan) - }) + harness.Setup(setup2.ComplexIndexSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + for _, tt := range queries.IndexPlanTests { + TestQueryPlanWithEngine(t, harness, e, tt) } t.Run("no database selected", func(t *testing.T) { ctx := NewContext(harness) ctx.SetCurrentDatabase("") - RunQuery(t, engine, harness, "CREATE DATABASE otherdb") - RunQuery(t, engine, harness, `CREATE TABLE otherdb.a (x int, y int)`) - RunQuery(t, engine, harness, `CREATE INDEX idx1 ON otherdb.a (y);`) + RunQuery(t, e, harness, "CREATE DATABASE otherdb") + RunQuery(t, e, harness, `CREATE TABLE otherdb.a (x int, y int)`) + RunQuery(t, e, harness, `CREATE INDEX idx1 ON otherdb.a (y);`) - TestQueryWithContext(t, ctx, engine, "SHOW INDEXES FROM otherdb.a", []sql.Row{ + TestQueryWithContext(t, ctx, e, "SHOW INDEXES FROM otherdb.a", []sql.Row{ {"a", 1, "idx1", 1, "y", nil, 0, nil, nil, "YES", "BTREE", "", "", "YES", nil}, }, nil, nil) @@ -352,18 +296,18 @@ func TestVersionedQueries(t *testing.T, harness Harness) { engine := NewEngine(t, harness) defer engine.Close() - for _, tt := range VersionedQueries { - TestQuery(t, harness, engine, tt.Query, tt.Expected, nil) + for _, tt := range queries.VersionedQueries { + TestQueryWithEngine(t, harness, engine, tt) } - for _, tt := range VersionedScripts { + for _, tt := range queries.VersionedScripts { TestScriptWithEngine(t, engine, harness, tt) } // These queries return different errors in the Memory engine and in the Dolt engine. // Memory engine returns ErrTableNotFound, while Dolt engine returns ErrBranchNotFound. // Until that is fixed, this test will not pass in both GMS and Dolt. - skippedTests := []ScriptTest{ + skippedTests := []queries.ScriptTest{ { Query: "DESCRIBE myhistorytable AS OF '2018-12-01'", ExpectedErr: sql.ErrTableNotFound, @@ -387,34 +331,58 @@ func TestVersionedQueriesPrepared(t *testing.T, harness Harness) { t.Skipf("Skipping versioned test, harness doesn't implement VersionedDBHarness") } - engine := NewEngine(t, harness) - defer engine.Close() + e := NewEngine(t, harness) + defer e.Close() - for _, tt := range VersionedQueries { - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, nil) + for _, tt := range queries.VersionedQueries { + TestPreparedQueryWithEngine(t, harness, e, tt) } t.Skip("skipping tests that version using UserVars instead of BindVars") - for _, tt := range VersionedScripts { - TestScriptWithEnginePrepared(t, engine, harness, tt) + for _, tt := range queries.VersionedScripts { + TestScriptPrepared(t, harness, tt) } } // TestQueryPlan analyzes the query given and asserts that its printed plan matches the expected one. -func TestQueryPlan(t *testing.T, ctx *sql.Context, engine *sqle.Engine, harness Harness, query string, expectedPlan string) { - parsed, err := parse.Parse(ctx, query) - require.NoError(t, err) +func TestQueryPlan(t *testing.T, harness Harness, e *sqle.Engine, query string, expectedPlan string) { + t.Run(query, func(t *testing.T) { + ctx := NewContext(harness) + parsed, err := parse.Parse(ctx, query) + require.NoError(t, err) - node, err := engine.Analyzer.Analyze(ctx, parsed, nil) - require.NoError(t, err) + node, err := e.Analyzer.Analyze(ctx, parsed, nil) + require.NoError(t, err) - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(query) { - t.Skipf("Skipping query plan for %s", query) + if sh, ok := harness.(SkippingHarness); ok { + if sh.SkipQueryTest(query) { + t.Skipf("Skipping query plan for %s", query) + } } - } - assert.Equal(t, expectedPlan, extractQueryNode(node).String(), "Unexpected result for query: "+query) + assert.Equal(t, expectedPlan, extractQueryNode(node).String(), "Unexpected result for query: "+query) + }) + +} + +func TestQueryPlanWithEngine(t *testing.T, harness Harness, e *sqle.Engine, tt queries.QueryPlanTest) { + t.Run(tt.Query, func(t *testing.T) { + ctx := NewContext(harness) + parsed, err := parse.Parse(ctx, tt.Query) + require.NoError(t, err) + + node, err := e.Analyzer.Analyze(ctx, parsed, nil) + require.NoError(t, err) + + if sh, ok := harness.(SkippingHarness); ok { + if sh.SkipQueryTest(tt.Query) { + t.Skipf("Skipping query plan for %s", tt.Query) + } + } + + assert.Equal(t, tt.ExpectedPlan, extractQueryNode(node).String(), "Unexpected result for query: "+tt.Query) + }) + } func extractQueryNode(node sql.Node) sql.Node { @@ -431,29 +399,14 @@ func extractQueryNode(node sql.Node) sql.Node { func TestOrderByGroupBy(t *testing.T, harness Harness) { require := require.New(t) - db := harness.NewDatabase("db") - - wrapInTransaction(t, db, harness, func() { - table, err := harness.NewTable(db, "members", sql.NewPrimaryKeySchema(sql.Schema{ - {Name: "id", Type: sql.Int64, Source: "members", PrimaryKey: true}, - {Name: "team", Type: sql.Text, Source: "members"}, - })) - require.NoError(err) - - InsertRows( - t, NewContext(harness), mustInsertableTable(t, table), - sql.NewRow(int64(3), "red"), - sql.NewRow(int64(4), "red"), - sql.NewRow(int64(5), "orange"), - sql.NewRow(int64(6), "orange"), - sql.NewRow(int64(7), "orange"), - sql.NewRow(int64(8), "purple"), - ) - }) - - e := sqle.NewDefault(harness.NewDatabaseProvider(db)) + harness.Setup([]setup2.SetupScript{{ + "create table members (id bigint primary key, team text)", + "insert into members values (3,'red'), (4,'red'),(5,'orange'),(6,'orange'),(7,'orange'),(8,'purple')", + }}) + e := mustNewEngine(t, harness) + defer e.Close() - sch, iter, err := e.Query(NewContext(harness).WithCurrentDB("db"), "SELECT team, COUNT(*) FROM members GROUP BY team ORDER BY 2") + sch, iter, err := e.Query(NewContext(harness), "SELECT team, COUNT(*) FROM members GROUP BY team ORDER BY 2") require.NoError(err) ctx := NewContext(harness) @@ -468,7 +421,7 @@ func TestOrderByGroupBy(t *testing.T, harness Harness) { require.Equal(expected, rows) - sch, iter, err = e.Query(NewContext(harness).WithCurrentDB("db"), "SELECT team, COUNT(*) FROM members GROUP BY 1 ORDER BY 2") + sch, iter, err = e.Query(NewContext(harness), "SELECT team, COUNT(*) FROM members GROUP BY 1 ORDER BY 2") require.NoError(err) rows, err = sql.RowIterToRows(ctx, sch, iter) @@ -481,21 +434,9 @@ func TestOrderByGroupBy(t *testing.T, harness Harness) { } func TestReadOnly(t *testing.T, harness Harness) { - require := require.New(t) - - db := harness.NewDatabase("mydb") - - wrapInTransaction(t, db, harness, func() { - _, err := harness.NewTable(db, "mytable", sql.NewPrimaryKeySchema(sql.Schema{ - {Name: "i", Type: sql.Int64, Source: "mytable", PrimaryKey: true}, - {Name: "s", Type: sql.Text, Source: "mytable"}, - })) - require.NoError(err) - }) - - pro := harness.NewDatabaseProvider(db) - a := analyzer.NewBuilder(pro).Build() - e := sqle.New(a, &sqle.Config{IsReadOnly: true}) + harness.Setup(setup2.MytableData) + e := mustNewEngine(t, harness) + e.IsReadOnly = true defer e.Close() RunQuery(t, e, harness, `SELECT i FROM mytable`) @@ -513,498 +454,294 @@ func TestReadOnly(t *testing.T, harness Harness) { } } -func TestExplode(t *testing.T, harness Harness) { - db := harness.NewDatabase("mydb") - table, err := harness.NewTable(db, "t", sql.NewPrimaryKeySchema(sql.Schema{ - {Name: "a", Type: sql.Int64, Source: "t"}, - {Name: "b", Type: sql.CreateArray(sql.Text), Source: "t"}, - {Name: "c", Type: sql.Text, Source: "t"}, - })) - require.NoError(t, err) - - InsertRows(t, harness.NewContext(), mustInsertableTable(t, table), sql.NewRow(int64(1), []interface{}{"a", "b"}, "first"), sql.NewRow(int64(2), []interface{}{"c", "d"}, "second"), sql.NewRow(int64(3), []interface{}{"e", "f"}, "third")) - - e := sqle.New(analyzer.NewDefault(harness.NewDatabaseProvider(db)), new(sqle.Config)) - defer e.Close() - - for _, q := range ExplodeQueries { - TestQuery(t, harness, e, q.Query, q.Expected, nil) - } -} - -func TestExplodePrepared(t *testing.T, harness Harness) { - db := harness.NewDatabase("mydb") - table, err := harness.NewTable(db, "t", sql.NewPrimaryKeySchema(sql.Schema{ - {Name: "a", Type: sql.Int64, Source: "t"}, - {Name: "b", Type: sql.CreateArray(sql.Text), Source: "t"}, - {Name: "c", Type: sql.Text, Source: "t"}, - })) - require.NoError(t, err) - - InsertRows(t, harness.NewContext(), mustInsertableTable(t, table), sql.NewRow(int64(1), []interface{}{"a", "b"}, "first"), sql.NewRow(int64(2), []interface{}{"c", "d"}, "second"), sql.NewRow(int64(3), []interface{}{"e", "f"}, "third")) - - e := sqle.New(analyzer.NewDefault(harness.NewDatabaseProvider(db)), new(sqle.Config)) - defer e.Close() - - for _, q := range ExplodeQueries { - TestPreparedQuery(t, harness, e, q.Query, q.Expected, nil) - } -} - // TestColumnAliases exercises the logic for naming and referring to column aliases, and unlike other tests in this // file checks that the name of the columns in the result schema is correct. func TestColumnAliases(t *testing.T, harness Harness) { - type testcase struct { - query string - expectedColNames []string - expectedRows []sql.Row - } - - tests := []testcase{ - { - query: `SELECT i AS cOl FROM mytable`, - expectedColNames: []string{"cOl"}, - expectedRows: []sql.Row{ - {int64(1)}, - {int64(2)}, - {int64(3)}, - }, - }, - { - query: `SELECT i AS cOl, s as COL FROM mytable`, - expectedColNames: []string{"cOl", "COL"}, - expectedRows: []sql.Row{ - {int64(1), "first row"}, - {int64(2), "second row"}, - {int64(3), "third row"}, - }, - }, - { - // TODO: this is actually inconsistent with MySQL, which doesn't allow column aliases in the where clause - query: `SELECT i AS cOl, s as COL FROM mytable where cOl = 1`, - expectedColNames: []string{"cOl", "COL"}, - expectedRows: []sql.Row{ - {int64(1), "first row"}, - }, - }, - { - query: `SELECT s as COL1, SUM(i) COL2 FROM mytable group by s order by cOL2`, - expectedColNames: []string{"COL1", "COL2"}, - // TODO: SUM should be integer typed for integers - expectedRows: []sql.Row{ - {"first row", float64(1)}, - {"second row", float64(2)}, - {"third row", float64(3)}, - }, - }, - { - query: `SELECT s as COL1, SUM(i) COL2 FROM mytable group by col1 order by col2`, - expectedColNames: []string{"COL1", "COL2"}, - expectedRows: []sql.Row{ - {"first row", float64(1)}, - {"second row", float64(2)}, - {"third row", float64(3)}, - }, - }, - { - query: `SELECT s as coL1, SUM(i) coL2 FROM mytable group by 1 order by 2`, - expectedColNames: []string{"coL1", "coL2"}, - expectedRows: []sql.Row{ - {"first row", float64(1)}, - {"second row", float64(2)}, - {"third row", float64(3)}, - }, - }, - { - query: `SELECT s as Date, SUM(i) TimeStamp FROM mytable group by 1 order by 2`, - expectedColNames: []string{"Date", "TimeStamp"}, - expectedRows: []sql.Row{ - {"first row", float64(1)}, - {"second row", float64(2)}, - {"third row", float64(3)}, - }, - }, - } - - for _, tt := range tests { - t.Run(tt.query, func(t *testing.T) { - require := require.New(t) - e := NewEngine(t, harness) - defer e.Close() - - ctx := NewContext(harness) - sch, rowIter, err := e.Query(ctx, tt.query) - var colNames []string - for _, col := range sch { - colNames = append(colNames, col.Name) - } - - require.NoError(err) - assert.Equal(t, tt.expectedColNames, colNames) - rows, err := sql.RowIterToRows(ctx, sch, rowIter) - require.NoError(err) - - orderBy := strings.Contains(strings.ToUpper(tt.query), " ORDER BY ") - - // .Equal gives better error messages than .ElementsMatch, so use it when possible - if orderBy || len(tt.expectedRows) <= 1 { - require.Equal(tt.expectedRows, rows, "Unexpected result for query %s", tt.query) - } else { - require.ElementsMatch(tt.expectedRows, rows, "Unexpected result for query %s", tt.query) - } - }) + harness.Setup(setup2.Mytable...) + for _, tt := range queries.ColumnAliasQueries { + TestQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns, nil) } } func TestAmbiguousColumnResolution(t *testing.T, harness Harness) { - require := require.New(t) - - db := harness.NewDatabase("mydb") - - wrapInTransaction(t, db, harness, func() { - table, err := harness.NewTable(db, "foo", sql.NewPrimaryKeySchema(sql.Schema{ - {Name: "a", Type: sql.Int64, Source: "foo", PrimaryKey: true}, - {Name: "b", Type: sql.Text, Source: "foo"}, - })) - require.NoError(err) - - InsertRows(t, NewContext(harness), mustInsertableTable(t, table), sql.NewRow(int64(1), "foo"), sql.NewRow(int64(2), "bar"), sql.NewRow(int64(3), "baz")) - - table2, err := harness.NewTable(db, "bar", sql.NewPrimaryKeySchema(sql.Schema{ - {Name: "b", Type: sql.Text, Source: "bar", PrimaryKey: true}, - {Name: "c", Type: sql.Int64, Source: "bar"}, - })) - require.NoError(err) - - InsertRows(t, NewContext(harness), mustInsertableTable(t, table2), sql.NewRow("qux", int64(3)), sql.NewRow("mux", int64(2)), sql.NewRow("pux", int64(1))) - }) - - e := sqle.NewDefault(harness.NewDatabaseProvider(db)) + harness.Setup([]setup2.SetupScript{{ + "create table foo (a bigint primary key, b text)", + "create table bar (b text primary key, c bigint)", + "insert into foo values (1, 'foo'), (2,'bar'), (3,'baz')", + "insert into bar values ('qux',3), ('mux',2), ('pux',1)", + }}) + e := mustNewEngine(t, harness) + defer e.Close() + ctx := NewContext(harness) expected := []sql.Row{ {int64(1), "pux", "foo"}, {int64(2), "mux", "bar"}, {int64(3), "qux", "baz"}, } - - TestQuery(t, harness, e, `SELECT f.a, bar.b, f.b FROM foo f INNER JOIN bar ON f.a = bar.c order by 1`, expected, nil) + TestQueryWithContext(t, ctx, e, `SELECT f.a, bar.b, f.b FROM foo f INNER JOIN bar ON f.a = bar.c order by 1`, expected, nil, nil) } func TestQueryErrors(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - defer engine.Close() + harness.Setup(setup2.MytableData, setup2.Pk_tablesData, setup2.MyhistorytableData) + for _, tt := range queries.ErrorQueries { + runQueryErrorTest(t, harness, tt) + } +} - for _, tt := range errorQueries { - t.Run(tt.Query, func(t *testing.T) { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(tt.Query) { - t.Skipf("skipping query %s", tt.Query) - } - } - AssertErrWithBindings(t, engine, harness, tt.Query, tt.Bindings, tt.ExpectedErr, tt.ExpectedErrStr) - }) +func MustQuery(ctx *sql.Context, e *sqle.Engine, q string) []sql.Row { + sch, iter, err := e.Query(ctx, q) + if err != nil { + panic(err) } + rows, err := sql.RowIterToRows(ctx, sch, iter) + if err != nil { + panic(err) + } + return rows } func TestInsertInto(t *testing.T, harness Harness) { - for _, insertion := range InsertQueries { - e := NewEngine(t, harness) - defer e.Close() - - TestQuery(t, harness, e, insertion.WriteQuery, insertion.ExpectedWriteResult, nil) - // If we skipped the insert, also skip the select - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(insertion.WriteQuery) { - t.Logf("Skipping query %s", insertion.SelectQuery) - continue - } - } - TestQuery(t, harness, e, insertion.SelectQuery, insertion.ExpectedSelect, nil) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Mytable_del_idxData, setup2.KeylessData, setup2.NiltableData, setup2.TypestableData, setup2.EmptytableData, setup2.AutoincrementData, setup2.OthertableData, setup2.Othertable_del_idxData) + for _, insertion := range queries.InsertQueries { + runWriteQueryTest(t, harness, insertion) } - for _, script := range InsertScripts { + + harness.Setup(setup2.MydbData) + for _, script := range queries.InsertScripts { TestScript(t, harness, script) } } func TestInsertIgnoreInto(t *testing.T, harness Harness) { - for _, script := range InsertIgnoreScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.InsertIgnoreScripts { TestScript(t, harness, script) } } func TestInsertIntoErrors(t *testing.T, harness Harness) { - for _, expectedFailure := range InsertErrorTests { - t.Run(expectedFailure.Name, func(t *testing.T) { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(expectedFailure.Query) { - t.Skipf("skipping query %s", expectedFailure.Query) - } - } - AssertErr(t, NewEngine(t, harness), harness, expectedFailure.Query, nil) - }) + harness.Setup(setup2.Mytable...) + for _, expectedFailure := range queries.InsertErrorTests { + runGenericErrorTest(t, harness, expectedFailure) } - for _, script := range InsertErrorScripts { + + harness.Setup(setup2.MydbData) + for _, script := range queries.InsertErrorScripts { TestScript(t, harness, script) } } func TestBrokenInsertScripts(t *testing.T, harness Harness) { - t.Skip() - for _, script := range InsertScripts { + for _, script := range queries.InsertScripts { + t.Skip() TestScript(t, harness, script) } } func TestSpatialInsertInto(t *testing.T, harness Harness) { - for _, insertion := range SpatialInsertQueries { - e := NewSpatialEngine(t, harness) - defer e.Close() - TestQuery(t, harness, e, insertion.WriteQuery, insertion.ExpectedWriteResult, nil) - // If we skipped the insert, also skip the select - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(insertion.WriteQuery) { - t.Logf("Skipping query %s", insertion.SelectQuery) - continue - } - } - TestQuery(t, harness, e, insertion.SelectQuery, insertion.ExpectedSelect, nil) + harness.Setup(setup2.SpatialSetup...) + for _, tt := range queries.SpatialInsertQueries { + runWriteQueryTest(t, harness, tt) } } func TestLoadData(t *testing.T, harness Harness) { - for _, script := range LoadDataScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.LoadDataScripts { TestScript(t, harness, script) } } func TestLoadDataErrors(t *testing.T, harness Harness) { - for _, script := range LoadDataErrorScripts { + for _, script := range queries.LoadDataErrorScripts { TestScript(t, harness, script) } } func TestLoadDataFailing(t *testing.T, harness Harness) { t.Skip() - for _, script := range LoadDataFailingScripts { + for _, script := range queries.LoadDataFailingScripts { TestScript(t, harness, script) } } func TestReplaceInto(t *testing.T, harness Harness) { - for _, insertion := range ReplaceQueries { - e := NewEngine(t, harness) - defer e.Close() - - TestQuery(t, harness, e, insertion.WriteQuery, insertion.ExpectedWriteResult, nil) - // If we skipped the insert, also skip the select - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(insertion.WriteQuery) { - t.Logf("Skipping query %s", insertion.SelectQuery) - continue - } - } - TestQuery(t, harness, e, insertion.SelectQuery, insertion.ExpectedSelect, nil) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Mytable_del_idxData, setup2.TypestableData) + for _, tt := range queries.ReplaceQueries { + runWriteQueryTest(t, harness, tt) } } func TestReplaceIntoErrors(t *testing.T, harness Harness) { - for _, expectedFailure := range ReplaceErrorTests { - t.Run(expectedFailure.Name, func(t *testing.T) { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(expectedFailure.Query) { - t.Skipf("skipping query %s", expectedFailure.Query) - } - } - AssertErr(t, NewEngine(t, harness), harness, expectedFailure.Query, nil) - }) + harness.Setup(setup2.MydbData, setup2.MytableData) + for _, tt := range queries.ReplaceErrorTests { + runGenericErrorTest(t, harness, tt) } } func TestUpdate(t *testing.T, harness Harness) { - for _, update := range UpdateTests { - e := NewEngine(t, harness) - defer e.Close() - - TestQuery(t, harness, e, update.WriteQuery, update.ExpectedWriteResult, nil) - // If we skipped the update, also skip the select - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(update.WriteQuery) { - t.Logf("Skipping query %s", update.SelectQuery) - continue - } - } - TestQuery(t, harness, e, update.SelectQuery, update.ExpectedSelect, nil) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Mytable_del_idxData, setup2.FloattableData, setup2.NiltableData, setup2.TypestableData, setup2.Pk_tablesData, setup2.OthertableData, setup2.TabletestData) + for _, tt := range queries.UpdateTests { + runWriteQueryTest(t, harness, tt) } } func TestUpdateErrors(t *testing.T, harness Harness) { - for _, expectedFailure := range GenericUpdateErrorTests { - t.Run(expectedFailure.Name, func(t *testing.T) { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(expectedFailure.Query) { - t.Skipf("skipping query %s", expectedFailure.Query) - } - } - AssertErr(t, NewEngine(t, harness), harness, expectedFailure.Query, nil) - }) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.FloattableData, setup2.TypestableData) + for _, expectedFailure := range queries.GenericUpdateErrorTests { + runGenericErrorTest(t, harness, expectedFailure) } - for _, expectedFailure := range UpdateErrorTests { - t.Run(expectedFailure.Query, func(t *testing.T) { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(expectedFailure.Query) { - t.Skipf("skipping query %s", expectedFailure.Query) - } - } - AssertErr(t, NewEngine(t, harness), harness, expectedFailure.Query, expectedFailure.ExpectedErr) - }) + harness.Setup(setup2.MydbData, setup2.KeylessData, setup2.PeopleData) + for _, expectedFailure := range queries.UpdateErrorTests { + runQueryErrorTest(t, harness, expectedFailure) } - for _, script := range UpdateErrorScripts { + for _, script := range queries.UpdateErrorScripts { TestScript(t, harness, script) } } func TestSpatialUpdate(t *testing.T, harness Harness) { - for _, update := range SpatialUpdateTests { - e := NewSpatialEngine(t, harness) - defer e.Close() - TestQuery(t, harness, e, update.WriteQuery, update.ExpectedWriteResult, nil) - // If we skipped the update, also skip the select - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(update.WriteQuery) { - t.Logf("Skipping query %s", update.SelectQuery) - continue - } - } - TestQuery(t, harness, e, update.SelectQuery, update.ExpectedSelect, nil) + harness.Setup(setup2.SpatialSetup...) + for _, update := range queries.SpatialUpdateTests { + runWriteQueryTest(t, harness, update) } } func TestDelete(t *testing.T, harness Harness) { - for _, delete := range DeleteTests { - e := NewEngine(t, harness) - defer e.Close() + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.TabletestData) + for _, tt := range queries.DeleteTests { + runWriteQueryTest(t, harness, tt) + } +} - TestQuery(t, harness, e, delete.WriteQuery, delete.ExpectedWriteResult, nil) - // If we skipped the delete, also skip the select +func runWriteQueryTest(t *testing.T, harness Harness, tt queries.WriteQueryTest) { + t.Run(tt.WriteQuery, func(t *testing.T) { if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(delete.WriteQuery) { - t.Logf("Skipping query %s", delete.SelectQuery) - continue + if sh.SkipQueryTest(tt.WriteQuery) { + t.Logf("Skipping query %s", tt.WriteQuery) + return + } + if sh.SkipQueryTest(tt.SelectQuery) { + t.Logf("Skipping query %s", tt.SelectQuery) + return } } - TestQuery(t, harness, e, delete.SelectQuery, delete.ExpectedSelect, nil) - } - + e := mustNewEngine(t, harness) + ctx := NewContext(harness) + defer e.Close() + TestQueryWithContext(t, ctx, e, tt.WriteQuery, tt.ExpectedWriteResult, nil, nil) + TestQueryWithContext(t, ctx, e, tt.SelectQuery, tt.ExpectedSelect, nil, nil) + }) } -func runWriteQueryTest(t *testing.T, harness Harness, tt WriteQueryTest, newEngine func() *sqle.Engine) { +func runWriteQueryTestPrepared(t *testing.T, harness Harness, tt queries.WriteQueryTest) { t.Run(tt.WriteQuery, func(t *testing.T) { - e := newEngine() - defer e.Close() - - ctx := NewContextWithEngine(harness, e) if sh, ok := harness.(SkippingHarness); ok { if sh.SkipQueryTest(tt.WriteQuery) { t.Logf("Skipping query %s", tt.WriteQuery) return } - } - TestPreparedQueryWithContext(t, ctx, e, tt.WriteQuery, tt.ExpectedWriteResult, nil) - // If we skipped the delete, also skip the select - if sh, ok := harness.(SkippingHarness); ok { if sh.SkipQueryTest(tt.SelectQuery) { t.Logf("Skipping query %s", tt.SelectQuery) return } } + e := mustNewEngine(t, harness) + ctx := NewContext(harness) + defer e.Close() + TestPreparedQueryWithContext(t, ctx, e, tt.WriteQuery, tt.ExpectedWriteResult, nil) TestPreparedQueryWithContext(t, ctx, e, tt.SelectQuery, tt.ExpectedSelect, nil) }) } +func runGenericErrorTest(t *testing.T, h Harness, tt queries.GenericErrorQueryTest) { + t.Run(tt.Name, func(t *testing.T) { + if sh, ok := h.(SkippingHarness); ok { + if sh.SkipQueryTest(tt.Query) { + t.Skipf("skipping query %s", tt.Query) + } + } + e := mustNewEngine(t, h) + defer e.Close() + AssertErr(t, e, h, tt.Query, nil) + }) +} + +func runQueryErrorTest(t *testing.T, h Harness, tt queries.QueryErrorTest) { + t.Run(tt.Query, func(t *testing.T) { + if sh, ok := h.(SkippingHarness); ok { + if sh.SkipQueryTest(tt.Query) { + t.Skipf("skipping query %s", tt.Query) + } + } + e := mustNewEngine(t, h) + defer e.Close() + AssertErr(t, e, h, tt.Query, nil) + }) +} + func TestUpdateQueriesPrepared(t *testing.T, harness Harness) { - newEngine := func() *sqle.Engine { - return NewEngine(t, harness) - } - for _, tt := range UpdateTests { - runWriteQueryTest(t, harness, tt, newEngine) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Mytable_del_idxData, setup2.OthertableData, setup2.TypestableData, setup2.Pk_tablesData, setup2.FloattableData, setup2.NiltableData, setup2.TabletestData) + for _, tt := range queries.UpdateTests { + runWriteQueryTestPrepared(t, harness, tt) } } func TestDeleteQueriesPrepared(t *testing.T, harness Harness) { - newEngine := func() *sqle.Engine { - return NewEngine(t, harness) - } - for _, tt := range DeleteTests { - runWriteQueryTest(t, harness, tt, newEngine) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.TabletestData) + for _, tt := range queries.DeleteTests { + runWriteQueryTestPrepared(t, harness, tt) } } func TestInsertQueriesPrepared(t *testing.T, harness Harness) { - newEngine := func() *sqle.Engine { - return NewEngine(t, harness) - } - for _, tt := range InsertQueries { - runWriteQueryTest(t, harness, tt, newEngine) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Mytable_del_idxData, setup2.KeylessData, setup2.TypestableData, setup2.NiltableData, setup2.EmptytableData, setup2.AutoincrementData, setup2.OthertableData) + for _, tt := range queries.InsertQueries { + runWriteQueryTestPrepared(t, harness, tt) } } func TestReplaceQueriesPrepared(t *testing.T, harness Harness) { - newEngine := func() *sqle.Engine { - return NewEngine(t, harness) - } - for _, tt := range ReplaceQueries { - runWriteQueryTest(t, harness, tt, newEngine) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Mytable_del_idxData, setup2.TypestableData) + for _, tt := range queries.ReplaceQueries { + runWriteQueryTestPrepared(t, harness, tt) } } func TestDeleteErrors(t *testing.T, harness Harness) { - for _, expectedFailure := range DeleteErrorTests { - t.Run(expectedFailure.Name, func(t *testing.T) { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(expectedFailure.Query) { - t.Skipf("skipping query %s", expectedFailure.Query) - } - } - AssertErr(t, NewEngine(t, harness), harness, expectedFailure.Query, nil) - }) + harness.Setup(setup2.MydbData, setup2.MytableData) + for _, expectedFailure := range queries.DeleteErrorTests { + runGenericErrorTest(t, harness, expectedFailure) } } func TestSpatialDelete(t *testing.T, harness Harness) { - for _, delete := range SpatialDeleteTests { - e := NewSpatialEngine(t, harness) - defer e.Close() - TestQuery(t, harness, e, delete.WriteQuery, delete.ExpectedWriteResult, nil) - // If we skipped the delete, also skip the select - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(delete.WriteQuery) { - t.Logf("Skipping query %s", delete.SelectQuery) - continue - } - } - TestQuery(t, harness, e, delete.SelectQuery, delete.ExpectedSelect, nil) + harness.Setup(setup2.SpatialSetup...) + for _, delete := range queries.SpatialDeleteTests { + runWriteQueryTest(t, harness, delete) } } func TestTruncate(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() - ctx := NewContext(harness) t.Run("Standard TRUNCATE", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t1 (pk BIGINT PRIMARY KEY, v1 BIGINT, INDEX(v1))") RunQuery(t, e, harness, "INSERT INTO t1 VALUES (1,1), (2,2), (3,3)") - TestQuery(t, harness, e, "SELECT * FROM t1 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}, {int64(3), int64(3)}}, nil) - TestQuery(t, harness, e, "TRUNCATE t1", []sql.Row{{sql.NewOkResult(3)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t1 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t1 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}, {int64(3), int64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "TRUNCATE t1", []sql.Row{{sql.NewOkResult(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t1 ORDER BY 1", []sql.Row{}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t1 VALUES (4,4), (5,5)") - TestQuery(t, harness, e, "SELECT * FROM t1 WHERE v1 > 0 ORDER BY 1", []sql.Row{{int64(4), int64(4)}, {int64(5), int64(5)}}, nil) - TestQuery(t, harness, e, "TRUNCATE TABLE t1", []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t1 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t1 WHERE v1 > 0 ORDER BY 1", []sql.Row{{int64(4), int64(4)}, {int64(5), int64(5)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "TRUNCATE TABLE t1", []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t1 ORDER BY 1", []sql.Row{}, nil, nil) }) t.Run("Foreign Key References", func(t *testing.T) { @@ -1020,26 +757,26 @@ func TestTruncate(t *testing.T, harness Harness) { RunQuery(t, e, harness, "CREATE TABLE t3i (pk BIGINT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "CREATE TRIGGER trig_t3 BEFORE DELETE ON t3 FOR EACH ROW INSERT INTO t3i VALUES (old.pk, old.v1)") RunQuery(t, e, harness, "INSERT INTO t3 VALUES (1,1), (3,3)") - TestQuery(t, harness, e, "SELECT * FROM t3 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(3), int64(3)}}, nil) - TestQuery(t, harness, e, "TRUNCATE t3", []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t3 ORDER BY 1", []sql.Row{}, nil) - TestQuery(t, harness, e, "SELECT * FROM t3i ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t3 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(3), int64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "TRUNCATE t3", []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t3 ORDER BY 1", []sql.Row{}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t3i ORDER BY 1", []sql.Row{}, nil, nil) }) t.Run("auto_increment column", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t4 (pk BIGINT AUTO_INCREMENT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "INSERT INTO t4(v1) VALUES (5), (6)") - TestQuery(t, harness, e, "SELECT * FROM t4 ORDER BY 1", []sql.Row{{int64(1), int64(5)}, {int64(2), int64(6)}}, nil) - TestQuery(t, harness, e, "TRUNCATE t4", []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t4 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t4 ORDER BY 1", []sql.Row{{int64(1), int64(5)}, {int64(2), int64(6)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "TRUNCATE t4", []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t4 ORDER BY 1", []sql.Row{}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t4(v1) VALUES (7)") - TestQuery(t, harness, e, "SELECT * FROM t4 ORDER BY 1", []sql.Row{{int64(1), int64(7)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t4 ORDER BY 1", []sql.Row{{int64(1), int64(7)}}, nil, nil) }) t.Run("Naked DELETE", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t5 (pk BIGINT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "INSERT INTO t5 VALUES (1,1), (2,2)") - TestQuery(t, harness, e, "SELECT * FROM t5 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t5 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}}, nil, nil) deleteStr := "DELETE FROM t5" parsed, err := parse.Parse(ctx, deleteStr) @@ -1060,8 +797,8 @@ func TestTruncate(t *testing.T, harness Harness) { "Expected Truncate Node, got:\n%s", analyzed.String()) } - TestQuery(t, harness, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t5 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t5 ORDER BY 1", []sql.Row{}, nil, nil) }) t.Run("Naked DELETE with Foreign Key References", func(t *testing.T) { @@ -1095,8 +832,8 @@ func TestTruncate(t *testing.T, harness Harness) { RunQuery(t, e, harness, "CREATE TRIGGER trig_t7 BEFORE DELETE ON t7 FOR EACH ROW INSERT INTO t7i VALUES (old.pk, old.v1)") RunQuery(t, e, harness, "INSERT INTO t7 VALUES (1,1), (3,3)") RunQuery(t, e, harness, "DELETE FROM t7 WHERE pk = 3") - TestQuery(t, harness, e, "SELECT * FROM t7 ORDER BY 1", []sql.Row{{int64(1), int64(1)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t7i ORDER BY 1", []sql.Row{{int64(3), int64(3)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t7 ORDER BY 1", []sql.Row{{int64(1), int64(1)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t7i ORDER BY 1", []sql.Row{{int64(3), int64(3)}}, nil, nil) deleteStr := "DELETE FROM t7" parsed, err := parse.Parse(ctx, deleteStr) @@ -1116,15 +853,15 @@ func TestTruncate(t *testing.T, harness Harness) { require.FailNow(t, "Incorrectly converted DELETE with triggers to TRUNCATE") } - TestQuery(t, harness, e, deleteStr, []sql.Row{{sql.NewOkResult(1)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t7 ORDER BY 1", []sql.Row{}, nil) - TestQuery(t, harness, e, "SELECT * FROM t7i ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(3), int64(3)}}, nil) + TestQueryWithContext(t, ctx, e, deleteStr, []sql.Row{{sql.NewOkResult(1)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t7 ORDER BY 1", []sql.Row{}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t7i ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(3), int64(3)}}, nil, nil) }) t.Run("Naked DELETE with auto_increment column", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t8 (pk BIGINT AUTO_INCREMENT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "INSERT INTO t8(v1) VALUES (4), (5)") - TestQuery(t, harness, e, "SELECT * FROM t8 ORDER BY 1", []sql.Row{{int64(1), int64(4)}, {int64(2), int64(5)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t8 ORDER BY 1", []sql.Row{{int64(1), int64(4)}, {int64(2), int64(5)}}, nil, nil) deleteStr := "DELETE FROM t8" parsed, err := parse.Parse(ctx, deleteStr) @@ -1144,16 +881,16 @@ func TestTruncate(t *testing.T, harness Harness) { require.FailNow(t, "Incorrectly converted DELETE with auto_increment cols to TRUNCATE") } - TestQuery(t, harness, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t8 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t8 ORDER BY 1", []sql.Row{}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t8(v1) VALUES (6)") - TestQuery(t, harness, e, "SELECT * FROM t8 ORDER BY 1", []sql.Row{{int64(3), int64(6)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t8 ORDER BY 1", []sql.Row{{int64(3), int64(6)}}, nil, nil) }) t.Run("DELETE with WHERE clause", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t9 (pk BIGINT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "INSERT INTO t9 VALUES (7,7), (8,8)") - TestQuery(t, harness, e, "SELECT * FROM t9 ORDER BY 1", []sql.Row{{int64(7), int64(7)}, {int64(8), int64(8)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t9 ORDER BY 1", []sql.Row{{int64(7), int64(7)}, {int64(8), int64(8)}}, nil, nil) deleteStr := "DELETE FROM t9 WHERE pk > 0" parsed, err := parse.Parse(ctx, deleteStr) @@ -1173,14 +910,14 @@ func TestTruncate(t *testing.T, harness Harness) { require.FailNow(t, "Incorrectly converted DELETE with WHERE clause to TRUNCATE") } - TestQuery(t, harness, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t9 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t9 ORDER BY 1", []sql.Row{}, nil, nil) }) t.Run("DELETE with LIMIT clause", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t10 (pk BIGINT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "INSERT INTO t10 VALUES (8,8), (9,9)") - TestQuery(t, harness, e, "SELECT * FROM t10 ORDER BY 1", []sql.Row{{int64(8), int64(8)}, {int64(9), int64(9)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t10 ORDER BY 1", []sql.Row{{int64(8), int64(8)}, {int64(9), int64(9)}}, nil, nil) deleteStr := "DELETE FROM t10 LIMIT 1000" parsed, err := parse.Parse(ctx, deleteStr) @@ -1200,14 +937,14 @@ func TestTruncate(t *testing.T, harness Harness) { require.FailNow(t, "Incorrectly converted DELETE with LIMIT clause to TRUNCATE") } - TestQuery(t, harness, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t10 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t10 ORDER BY 1", []sql.Row{}, nil, nil) }) t.Run("DELETE with ORDER BY clause", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t11 (pk BIGINT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "INSERT INTO t11 VALUES (1,1), (9,9)") - TestQuery(t, harness, e, "SELECT * FROM t11 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(9), int64(9)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t11 ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(9), int64(9)}}, nil, nil) deleteStr := "DELETE FROM t11 ORDER BY 1" parsed, err := parse.Parse(ctx, deleteStr) @@ -1227,8 +964,8 @@ func TestTruncate(t *testing.T, harness Harness) { require.FailNow(t, "Incorrectly converted DELETE with ORDER BY clause to TRUNCATE") } - TestQuery(t, harness, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t11 ORDER BY 1", []sql.Row{}, nil) + TestQueryWithContext(t, ctx, e, deleteStr, []sql.Row{{sql.NewOkResult(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t11 ORDER BY 1", []sql.Row{}, nil, nil) }) t.Run("Multi-table DELETE", func(t *testing.T) { @@ -1237,8 +974,8 @@ func TestTruncate(t *testing.T, harness Harness) { RunQuery(t, e, harness, "CREATE TABLE t12b (pk BIGINT PRIMARY KEY, v1 BIGINT)") RunQuery(t, e, harness, "INSERT INTO t12a VALUES (1,1), (2,2)") RunQuery(t, e, harness, "INSERT INTO t12b VALUES (1,1), (2,2)") - TestQuery(t, harness, e, "SELECT * FROM t12a ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t12b ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t12a ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t12b ORDER BY 1", []sql.Row{{int64(1), int64(1)}, {int64(2), int64(2)}}, nil, nil) deleteStr := "DELETE t12a, t12b FROM t12a INNER JOIN t12b WHERE t12a.pk=t12b.pk" parsed, err := parse.Parse(ctx, deleteStr) @@ -1258,124 +995,95 @@ func TestTruncate(t *testing.T, harness Harness) { require.FailNow(t, "Incorrectly converted DELETE with WHERE clause to TRUNCATE") } - TestQuery(t, harness, e, deleteStr, []sql.Row{{sql.NewOkResult(4)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t12a ORDER BY 1", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t12b ORDER BY 1", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, deleteStr, []sql.Row{{sql.NewOkResult(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t12a ORDER BY 1", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t12b ORDER BY 1", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) }) } func TestScripts(t *testing.T, harness Harness) { - for _, script := range ScriptTests { + harness.Setup(setup2.MydbData) + for _, script := range queries.ScriptTests { TestScript(t, harness, script) } } func TestSpatialScripts(t *testing.T, harness Harness) { - for _, script := range SpatialScriptTests { + harness.Setup(setup2.MydbData) + for _, script := range queries.SpatialScriptTests { TestScript(t, harness, script) } } func TestLoadDataPrepared(t *testing.T, harness Harness) { - for _, script := range LoadDataScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.LoadDataScripts { TestScriptPrepared(t, harness, script) } } func TestScriptsPrepared(t *testing.T, harness Harness) { - for _, script := range ScriptTests { + harness.Setup(setup2.MydbData) + for _, script := range queries.ScriptTests { + TestScriptPrepared(t, harness, script) + } + for _, script := range queries.SpatialScriptTests { TestScriptPrepared(t, harness, script) } } func TestInsertScriptsPrepared(t *testing.T, harness Harness) { - for _, script := range InsertScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.InsertScripts { TestScriptPrepared(t, harness, script) } } func TestComplexIndexQueriesPrepared(t *testing.T, harness Harness) { - for _, script := range ComplexIndexQueries { - TestScriptPrepared(t, harness, script) + harness.Setup(setup2.ComplexIndexSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + for _, tt := range queries.ComplexIndexQueries { + TestPreparedQueryWithEngine(t, harness, e, tt) } } func TestJsonScriptsPrepared(t *testing.T, harness Harness) { - for _, script := range JsonScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.JsonScripts { TestScriptPrepared(t, harness, script) } } func TestCreateCheckConstraintsScriptsPrepared(t *testing.T, harness Harness) { - for _, script := range CreateCheckConstraintsScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.CreateCheckConstraintsScripts { TestScriptPrepared(t, harness, script) } } func TestInsertIgnoreScriptsPrepared(t *testing.T, harness Harness) { - for _, script := range InsertIgnoreScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.InsertIgnoreScripts { TestScriptPrepared(t, harness, script) } } func TestInsertErrorScriptsPrepared(t *testing.T, harness Harness) { - for _, script := range InsertErrorScripts { + harness.Setup(setup2.MydbData) + for _, script := range queries.InsertErrorScripts { TestScriptPrepared(t, harness, script) } } -func TestScriptQueryPlan(t *testing.T, harness Harness) { - // TEST SCRIPTS - for _, script := range ScriptQueryPlanTest { - // TEST SCRIPT - func() bool { - return t.Run(script.Name, func(t *testing.T) { - myDb := harness.NewDatabase("mydb") - databases := []sql.Database{myDb} - e := NewEngineWithDbs(t, harness, databases) - defer e.Close() - - // Run Setup script - for _, statement := range script.SetUpScript { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(statement) { - t.Skip() - } - } - RunQuery(t, e, harness, statement) - } - - // Get context - ctx := NewContextWithEngine(harness, e) - - // Run queries - for _, assertion := range script.Assertions { - parsed, err := parse.Parse(ctx, assertion.Query) - require.NoError(t, err) - - node, err := e.Analyzer.Analyze(ctx, parsed, nil) - require.NoError(t, err) - - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(assertion.Query) { - t.Skipf("Skipping query plan for %s", assertion.Query) - } - } - - assert.Equal(t, assertion.ExpectedErrStr, extractQueryNode(node).String(), "Unexpected result for query: "+assertion.Query) - } - }) - }() - } -} - func TestUserPrivileges(t *testing.T, h Harness) { harness, ok := h.(ClientHarness) if !ok { t.Skip("Cannot run TestUserPrivileges as the harness must implement ClientHarness") } - for _, script := range UserPrivTests { + harness.Setup(setup2.MydbData, setup2.MytableData) + for _, script := range queries.UserPrivTests { t.Run(script.Name, func(t *testing.T) { myDb := harness.NewDatabase("mydb") databases := []sql.Database{myDb} @@ -1435,7 +1143,7 @@ func TestUserPrivileges(t *testing.T, h Harness) { // These tests are functionally identical to UserPrivTests, hence their inclusion in the same testing function. // They're just written a little differently to ease the developer's ability to produce as many as possible. - for _, script := range QuickPrivTests { + for _, script := range queries.QuickPrivTests { t.Run(strings.Join(script.Queries, "\n > "), func(t *testing.T) { provider := harness.NewDatabaseProvider( harness.NewDatabase("mydb"), @@ -1528,9 +1236,10 @@ func TestUserAuthentication(t *testing.T, h Harness) { if !ok { t.Skip("Cannot run TestUserAuthentication as the harness must implement ClientHarness") } + harness.Setup(setup2.MydbData, setup2.MytableData) port := getEmptyPort(t) - for _, script := range ServerAuthTests { + for _, script := range queries.ServerAuthTests { t.Run(script.Name, func(t *testing.T) { ctx := NewContextWithClient(harness, sql.Client{ User: "root", @@ -1542,7 +1251,8 @@ func TestUserAuthentication(t *testing.T, h Harness) { MaxConnections: 1000, } - engine := sqle.NewDefault(harness.NewDatabaseProvider()) + engine := mustNewEngine(t, harness) + defer engine.Close() engine.Analyzer.Catalog.GrantTables.AddRootAccount() if script.SetUpFunc != nil { script.SetUpFunc(ctx, t, engine) @@ -1588,19 +1298,23 @@ func TestUserAuthentication(t *testing.T, h Harness) { } func TestComplexIndexQueries(t *testing.T, harness Harness) { - for _, script := range ComplexIndexQueries { - TestScript(t, harness, script) + harness.Setup(setup2.ComplexIndexSetup...) + e := mustNewEngine(t, harness) + defer e.Close() + for _, tt := range queries.ComplexIndexQueries { + TestQueryWithEngine(t, harness, e, tt) } } func TestTriggers(t *testing.T, harness Harness) { - for _, script := range TriggerTests { + harness.Setup(setup2.MydbData, setup2.FooData) + for _, script := range queries.TriggerTests { TestScript(t, harness, script) } - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() - t.Run("no database selected", func(t *testing.T) { ctx := NewContext(harness) ctx.SetCurrentDatabase("") @@ -1621,14 +1335,15 @@ func TestTriggers(t *testing.T, harness Harness) { } func TestRollbackTriggers(t *testing.T, harness Harness) { - for _, script := range RollbackTriggerTests { + harness.Setup() + for _, script := range queries.RollbackTriggerTests { TestScript(t, harness, script) } } func TestShowTriggers(t *testing.T, harness Harness) { - e := NewEngine(t, harness) - defer e.Close() + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) // Pick a date date := time.Unix(0, 0).UTC() @@ -1874,25 +1589,25 @@ func TestShowTriggers(t *testing.T, harness Harness) { } func TestStoredProcedures(t *testing.T, harness Harness) { - for _, script := range ProcedureLogicTests { + for _, script := range queries.ProcedureLogicTests { TestScript(t, harness, script) } - for _, script := range ProcedureCallTests { + for _, script := range queries.ProcedureCallTests { TestScript(t, harness, script) } - for _, script := range ProcedureDropTests { + for _, script := range queries.ProcedureDropTests { TestScript(t, harness, script) } - for _, script := range ProcedureShowStatus { + for _, script := range queries.ProcedureShowStatus { TestScript(t, harness, script) } - for _, script := range ProcedureShowCreate { + for _, script := range queries.ProcedureShowCreate { TestScript(t, harness, script) } - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() - t.Run("no database selected", func(t *testing.T) { ctx := NewContext(harness) ctx.SetCurrentDatabase("") @@ -1917,78 +1632,76 @@ func TestStoredProcedures(t *testing.T, harness Harness) { } func TestTriggerErrors(t *testing.T, harness Harness) { - for _, script := range TriggerErrorTests { + for _, script := range queries.TriggerErrorTests { TestScript(t, harness, script) } } // TestScript runs the test script given, making any assertions given -func TestScript(t *testing.T, harness Harness, script ScriptTest) bool { - return t.Run(script.Name, func(t *testing.T) { - myDb := harness.NewDatabase("mydb") - databases := []sql.Database{myDb} - e := NewEngineWithDbs(t, harness, databases) - defer e.Close() - TestScriptWithEngine(t, e, harness, script) - }) +func TestScript(t *testing.T, harness Harness, script queries.ScriptTest) { + e := mustNewEngine(t, harness) + defer e.Close() + TestScriptWithEngine(t, e, harness, script) } // TestScriptWithEngine runs the test script given with the engine provided. -func TestScriptWithEngine(t *testing.T, e *sqle.Engine, harness Harness, script ScriptTest) { - for _, statement := range script.SetUpScript { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(statement) { - t.Skip() +func TestScriptWithEngine(t *testing.T, e *sqle.Engine, harness Harness, script queries.ScriptTest) { + t.Run(script.Name, func(t *testing.T) { + for _, statement := range script.SetUpScript { + if sh, ok := harness.(SkippingHarness); ok { + if sh.SkipQueryTest(statement) { + t.Skip() + } } - } - RunQuery(t, e, harness, statement) - } + RunQuery(t, e, harness, statement) + } - assertions := script.Assertions - if len(assertions) == 0 { - assertions = []ScriptTestAssertion{ - { - Query: script.Query, - Expected: script.Expected, - ExpectedErr: script.ExpectedErr, - }, + assertions := script.Assertions + if len(assertions) == 0 { + assertions = []queries.ScriptTestAssertion{ + { + Query: script.Query, + Expected: script.Expected, + ExpectedErr: script.ExpectedErr, + }, + } } - } - for _, assertion := range assertions { - if assertion.ExpectedErr != nil { - t.Run(assertion.Query, func(t *testing.T) { - AssertErr(t, e, harness, assertion.Query, assertion.ExpectedErr) - }) - } else if assertion.ExpectedErrStr != "" { - t.Run(assertion.Query, func(t *testing.T) { - AssertErr(t, e, harness, assertion.Query, nil, assertion.ExpectedErrStr) - }) - } else if assertion.ExpectedWarning != 0 { - t.Run(assertion.Query, func(t *testing.T) { - AssertWarningAndTestQuery(t, e, nil, harness, assertion.Query, - assertion.Expected, nil, assertion.ExpectedWarning, assertion.ExpectedWarningsCount, - assertion.ExpectedWarningMessageSubstring, assertion.SkipResultsCheck) - }) - } else if assertion.SkipResultsCheck { - RunQuery(t, e, harness, assertion.Query) - } else { - TestQuery(t, harness, e, assertion.Query, assertion.Expected, nil) + for _, assertion := range assertions { + if assertion.ExpectedErr != nil { + t.Run(assertion.Query, func(t *testing.T) { + AssertErr(t, e, harness, assertion.Query, assertion.ExpectedErr) + }) + } else if assertion.ExpectedErrStr != "" { + t.Run(assertion.Query, func(t *testing.T) { + AssertErr(t, e, harness, assertion.Query, nil, assertion.ExpectedErrStr) + }) + } else if assertion.ExpectedWarning != 0 { + t.Run(assertion.Query, func(t *testing.T) { + AssertWarningAndTestQuery(t, e, nil, harness, assertion.Query, + assertion.Expected, nil, assertion.ExpectedWarning, assertion.ExpectedWarningsCount, + assertion.ExpectedWarningMessageSubstring, assertion.SkipResultsCheck) + }) + } else if assertion.SkipResultsCheck { + RunQuery(t, e, harness, assertion.Query) + } else { + ctx := NewContext(harness) + TestQueryWithContext(t, ctx, e, assertion.Query, assertion.Expected, nil, assertion.Bindings) + } } - } + }) } // TestScriptPrepared substitutes literals for bindvars, runs the test script given, // and makes any assertions given -func TestScriptPrepared(t *testing.T, harness Harness, script ScriptTest) bool { +func TestScriptPrepared(t *testing.T, harness Harness, script queries.ScriptTest) bool { return t.Run(script.Name, func(t *testing.T) { if script.SkipPrepared { t.Skip() } - myDb := harness.NewDatabase("mydb") - databases := []sql.Database{myDb} - e := NewEngineWithDbs(t, harness, databases) + + e := mustNewEngine(t, harness) defer e.Close() TestScriptWithEnginePrepared(t, e, harness, script) }) @@ -1996,7 +1709,7 @@ func TestScriptPrepared(t *testing.T, harness Harness, script ScriptTest) bool { // TestScriptWithEnginePrepared runs the test script with bindvars substituted for literals // using the engine provided. -func TestScriptWithEnginePrepared(t *testing.T, e *sqle.Engine, harness Harness, script ScriptTest) { +func TestScriptWithEnginePrepared(t *testing.T, e *sqle.Engine, harness Harness, script queries.ScriptTest) { ctx := NewContextWithEngine(harness, e) for _, statement := range script.SetUpScript { if sh, ok := harness.(SkippingHarness); ok { @@ -2004,12 +1717,13 @@ func TestScriptWithEnginePrepared(t *testing.T, e *sqle.Engine, harness Harness, t.Skip() } } - runQueryPreparedWithCtx(t, ctx, e, statement) + _, _, err := runQueryPreparedWithCtx(t, ctx, e, statement) + require.NoError(t, err) } assertions := script.Assertions if len(assertions) == 0 { - assertions = []ScriptTestAssertion{ + assertions = []queries.ScriptTestAssertion{ { Query: script.Query, Expected: script.Expected, @@ -2045,13 +1759,14 @@ func TestScriptWithEnginePrepared(t *testing.T, e *sqle.Engine, harness Harness, } func TestTransactionScripts(t *testing.T, harness Harness) { - for _, script := range TransactionTests { + for _, script := range queries.TransactionTests { TestTransactionScript(t, harness, script) } } // TestTransactionScript runs the test script given, making any assertions given -func TestTransactionScript(t *testing.T, harness Harness, script TransactionTest) bool { +func TestTransactionScript(t *testing.T, harness Harness, script queries.TransactionTest) bool { + // todo(max): these use dolt_commit, need harness reset to reset back to original commit return t.Run(script.Name, func(t *testing.T) { myDb := harness.NewDatabase("mydb") e := NewEngineWithDbs(t, harness, []sql.Database{myDb}) @@ -2061,7 +1776,7 @@ func TestTransactionScript(t *testing.T, harness Harness, script TransactionTest } // TestTransactionScriptWithEngine runs the transaction test script given with the engine provided. -func TestTransactionScriptWithEngine(t *testing.T, e *sqle.Engine, harness Harness, script TransactionTest) { +func TestTransactionScriptWithEngine(t *testing.T, e *sqle.Engine, harness Harness, script queries.TransactionTest) { setupSession := NewSession(harness) for _, statement := range script.SetUpScript { RunQueryWithContext(t, e, setupSession, statement) @@ -2113,13 +1828,14 @@ func getClient(query string) string { } func TestViews(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() ctx := NewContext(harness) // nested views RunQueryWithContext(t, e, ctx, "CREATE VIEW myview2 AS SELECT * FROM myview WHERE i = 1") - for _, testCase := range ViewTests { + for _, testCase := range queries.ViewTests { t.Run(testCase.Query, func(t *testing.T) { TestQueryWithContext(t, ctx, e, testCase.Query, testCase.Expected, nil, nil) }) @@ -2148,15 +1864,14 @@ func TestViews(t *testing.T, harness Harness) { } func TestViewsPrepared(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() ctx := NewContext(harness) RunQueryWithContext(t, e, ctx, "CREATE VIEW myview2 AS SELECT * FROM myview WHERE i = 1") - for _, testCase := range ViewTests { - t.Run(testCase.Query, func(t *testing.T) { - TestPreparedQueryWithContext(t, ctx, e, testCase.Query, testCase.Expected, nil) - }) + for _, testCase := range queries.ViewTests { + TestPreparedQueryWithEngine(t, harness, e, testCase) } } @@ -2175,334 +1890,49 @@ func TestVersionedViews(t *testing.T, harness Harness) { iter.Close(ctx) // nested views - _, iter, err = e.Query(ctx, "CREATE VIEW myview2 AS SELECT * FROM myview1 WHERE i = 1") - require.NoError(err) - iter.Close(ctx) - - for _, testCase := range VersionedViewTests { - t.Run(testCase.Query, func(t *testing.T) { - TestQueryWithContext(t, ctx, e, testCase.Query, testCase.Expected, nil, nil) - }) - } -} - -func TestVersionedViewsPrepared(t *testing.T, harness Harness) { - if _, ok := harness.(VersionedDBHarness); !ok { - t.Skipf("Skipping versioned test, harness doesn't implement VersionedDBHarness") - } - - require := require.New(t) - - e := NewEngine(t, harness) - defer e.Close() - ctx := NewContext(harness) - _, iter, err := e.Query(ctx, "CREATE VIEW myview1 AS SELECT * FROM myhistorytable") - require.NoError(err) - iter.Close(ctx) - - // nested views - _, iter, err = e.Query(ctx, "CREATE VIEW myview2 AS SELECT * FROM myview1 WHERE i = 1") - require.NoError(err) - iter.Close(ctx) - - for _, testCase := range VersionedViewTests { - t.Run(testCase.Query, func(t *testing.T) { - TestPreparedQueryWithContext(t, ctx, e, testCase.Query, testCase.Expected, nil) - }) - } -} - -func TestCreateTable(t *testing.T, harness Harness) { - e := NewEngine(t, harness) - defer e.Close() - ctx := NewContext(harness) - - t.Run("Assortment of types without pk", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1(a INTEGER, b TEXT, c DATE, "+ - "d TIMESTAMP, e VARCHAR(20), f BLOB NOT NULL, "+ - "b1 BOOL, b2 BOOLEAN NOT NULL, g DATETIME, h CHAR(40))", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - ctx := NewContext(harness) - testTable, ok, err := db.GetTableInsensitive(ctx, "t1") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: true, Source: "t1"}, - {Name: "b", Type: sql.Text, Nullable: true, Source: "t1"}, - {Name: "c", Type: sql.Date, Nullable: true, Source: "t1"}, - {Name: "d", Type: sql.Timestamp, Nullable: true, Source: "t1"}, - {Name: "e", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), Nullable: true, Source: "t1"}, - {Name: "f", Type: sql.Blob, Source: "t1"}, - {Name: "b1", Type: sql.Boolean, Nullable: true, Source: "t1"}, - {Name: "b2", Type: sql.Boolean, Source: "t1"}, - {Name: "g", Type: sql.Datetime, Nullable: true, Source: "t1"}, - {Name: "h", Type: sql.MustCreateStringWithDefaults(sqltypes.Char, 40), Nullable: true, Source: "t1"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("Primary key declared in column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t2 (a INTEGER NOT NULL PRIMARY KEY, "+ - "b VARCHAR(10) NOT NULL)", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - testTable, ok, err := db.GetTableInsensitive(ctx, "t2") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: false, PrimaryKey: true, Source: "t2"}, - {Name: "b", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 10), Nullable: false, Source: "t2"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("Multiple primary keys", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t3(a INTEGER NOT NULL,"+ - "b TEXT NOT NULL,"+ - "c bool, primary key (a,b))", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - testTable, ok, err := db.GetTableInsensitive(ctx, "t3") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: false, PrimaryKey: true, Source: "t3"}, - {Name: "b", Type: sql.Text, Nullable: false, PrimaryKey: true, Source: "t3"}, - {Name: "c", Type: sql.Boolean, Nullable: true, Source: "t3"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("Including comment", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t4(a INTEGER,"+ - "b TEXT NOT NULL COMMENT 'comment',"+ - "c bool, primary key (a))", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - testTable, ok, err := db.GetTableInsensitive(ctx, "t4") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: false, PrimaryKey: true, Source: "t4"}, - {Name: "b", Type: sql.Text, Nullable: false, PrimaryKey: false, Source: "t4", Comment: "comment"}, - {Name: "c", Type: sql.Boolean, Nullable: true, Source: "t4"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("If not exists", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE IF NOT EXISTS t4(a INTEGER,"+ - "b TEXT NOT NULL,"+ - "c bool, primary key (a))", []sql.Row{{sql.NewOkResult(0)}}, nil) - - _, _, err := e.Query(NewContext(harness), "CREATE TABLE t4(a INTEGER,"+ - "b TEXT NOT NULL,"+ - "c bool, primary key (a))") - require.Error(t, err) - require.True(t, sql.ErrTableAlreadyExists.Is(err)) - }) - - t.Run("With default", func(t *testing.T) { - //TODO: NOW(millseconds) must match timestamp(milliseconds), else it's an error - _, _, err := e.Query(NewContext(harness), "CREATE TABLE t5(a INTEGER,"+ - "`create_time` timestamp(6) NOT NULL DEFAULT NOW(6),"+ - "primary key (a))") - require.NoError(t, err) - }) - - t.Run("CREATE LIKE assortment of types without primary key", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t6 LIKE t1", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - testTable, ok, err := db.GetTableInsensitive(ctx, "t6") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: true, Source: "t6"}, - {Name: "b", Type: sql.Text, Nullable: true, Source: "t6"}, - {Name: "c", Type: sql.Date, Nullable: true, Source: "t6"}, - {Name: "d", Type: sql.Timestamp, Nullable: true, Source: "t6"}, - {Name: "e", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), Nullable: true, Source: "t6"}, - {Name: "f", Type: sql.Blob, Source: "t6"}, - {Name: "b1", Type: sql.Boolean, Nullable: true, Source: "t6"}, - {Name: "b2", Type: sql.Boolean, Source: "t6"}, - {Name: "g", Type: sql.Datetime, Nullable: true, Source: "t6"}, - {Name: "h", Type: sql.MustCreateStringWithDefaults(sqltypes.Char, 40), Nullable: true, Source: "t6"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("CREATE LIKE with indexes, default, and comments", func(t *testing.T) { - sch, iter, err := e.Query(ctx, "CREATE TABLE t7pre("+ - "pk bigint primary key,"+ - "v1 bigint default (2) comment 'hi there',"+ - "index idx_v1 (v1) comment 'index here'"+ - ")") - if plan.ErrNotIndexable.Is(err) { - t.Skip("test requires index creation") - } - require.NoError(t, err) - _, err = sql.RowIterToRows(ctx, sch, iter) - require.NoError(t, err) - TestQuery(t, harness, e, "CREATE TABLE t7 LIKE t7pre", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - testTable, ok, err := db.GetTableInsensitive(ctx, "t7") - require.NoError(t, err) - require.True(t, ok) - indexableTable, ok := testTable.(sql.IndexedTable) - require.True(t, ok) - - s := sql.Schema{ - {Name: "pk", Type: sql.Int64, PrimaryKey: true, Nullable: false, Source: "t7"}, - {Name: "v1", Type: sql.Int64, Nullable: true, Source: "t7", - Default: parse.MustStringToColumnDefaultValue(ctx, "(2)", sql.Int64, true), Comment: "hi there"}, - } - assertSchemasEqualWithDefaults(t, s, indexableTable.Schema()) - - indexes, err := indexableTable.GetIndexes(ctx) - require.NoError(t, err) - indexFound := false - for _, index := range indexes { - if index.ID() == "idx_v1" { - indexFound = true - require.Len(t, index.Expressions(), 1) - require.True(t, strings.HasSuffix(index.Expressions()[0], "v1")) - require.Equal(t, "index here", index.Comment()) - } - } - require.True(t, indexFound) - }) - - t.Run("CREATE LIKE table in other database", func(t *testing.T) { - ctx.SetCurrentDatabase("foo") - sch, iter, err := e.Query(ctx, "CREATE TABLE t8pre("+ - "pk bigint primary key,"+ - "v1 bigint default (7) comment 'greetings'"+ - ")") - require.NoError(t, err) - _, err = sql.RowIterToRows(ctx, sch, iter) - require.NoError(t, err) - ctx.SetCurrentDatabase("mydb") - TestQuery(t, harness, e, "CREATE TABLE t8 LIKE foo.t8pre", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - testTable, ok, err := db.GetTableInsensitive(ctx, "t8") - require.NoError(t, err) - require.True(t, ok) - indexableTable, ok := testTable.(sql.IndexedTable) - require.True(t, ok) - - s := sql.Schema{ - {Name: "pk", Type: sql.Int64, PrimaryKey: true, Nullable: false, Source: "t8"}, - {Name: "v1", Type: sql.Int64, Nullable: true, Source: "t8", - Default: parse.MustStringToColumnDefaultValue(ctx, "(7)", sql.Int64, true), Comment: "greetings"}, - } - assertSchemasEqualWithDefaults(t, s, indexableTable.Schema()) - }) - - t.Run("UNIQUE constraint in column definition", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t9 (a INTEGER NOT NULL PRIMARY KEY, "+ - "b VARCHAR(10) UNIQUE)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "CREATE TABLE t9a (a INTEGER NOT NULL PRIMARY KEY, "+ - "b VARCHAR(10) UNIQUE KEY)", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) + _, iter, err = e.Query(ctx, "CREATE VIEW myview2 AS SELECT * FROM myview1 WHERE i = 1") + require.NoError(err) + iter.Close(ctx) - t9Table, ok, err := db.GetTableInsensitive(ctx, "t9") - require.NoError(t, err) - require.True(t, ok) - t9aTable, ok, err := db.GetTableInsensitive(ctx, "t9a") - require.NoError(t, err) - require.True(t, ok) + for _, testCase := range queries.VersionedViewTests { + ctx := NewContext(harness) + TestQueryWithContext(t, ctx, e, testCase.Query, testCase.Expected, testCase.ExpectedColumns, nil) + } +} - require.Equal(t, sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: false, PrimaryKey: true, Source: "t9"}, - {Name: "b", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 10), Nullable: true, Source: "t9"}, - }, t9Table.Schema()) - require.Equal(t, sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: false, PrimaryKey: true, Source: "t9a"}, - {Name: "b", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 10), Nullable: true, Source: "t9a"}, - }, t9aTable.Schema()) +func TestVersionedViewsPrepared(t *testing.T, harness Harness) { + if _, ok := harness.(VersionedDBHarness); !ok { + t.Skipf("Skipping versioned test, harness doesn't implement VersionedDBHarness") + } - t9TableIndexable, ok := t9Table.(sql.IndexedTable) - require.True(t, ok) - t9aTableIndexable, ok := t9aTable.(sql.IndexedTable) - require.True(t, ok) - t9Indexes, err := t9TableIndexable.GetIndexes(ctx) - require.NoError(t, err) - indexFound := false - for _, index := range t9Indexes { - // Since no name is provided, integrator can name index whatever they want. As no other indexes are declared, - // we can just see if a unique index is present, which should be sufficient. We do not check count as - // integrator may return their own internally-created indexes. - if index.IsUnique() { - indexFound = true - } - } - require.True(t, indexFound) - t9aIndexes, err := t9aTableIndexable.GetIndexes(ctx) - require.NoError(t, err) - indexFound = false - for _, index := range t9aIndexes { - if index.IsUnique() { - indexFound = true - } - } - require.True(t, indexFound) - }) + require := require.New(t) - t.Run("CREATE TABLE (SELECT * )", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t10 (a INTEGER NOT NULL PRIMARY KEY, "+ - "b VARCHAR(10))", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, `INSERT INTO t10 VALUES (1, "1"), (2, "2")`, []sql.Row{sql.Row{sql.OkResult{RowsAffected: 0x2, InsertID: 0x0, Info: fmt.Stringer(nil)}}}, nil) + e := NewEngine(t, harness) + defer e.Close() + ctx := NewContext(harness) + _, iter, err := e.Query(ctx, "CREATE VIEW myview1 AS SELECT * FROM myhistorytable") + require.NoError(err) + iter.Close(ctx) - // Create the table with the data from t10 - TestQuery(t, harness, e, "CREATE TABLE t10a SELECT * from t10", []sql.Row{sql.Row{sql.OkResult{RowsAffected: 0x2, InsertID: 0x0, Info: fmt.Stringer(nil)}}}, nil) + // nested views + _, iter, err = e.Query(ctx, "CREATE VIEW myview2 AS SELECT * FROM myview1 WHERE i = 1") + require.NoError(err) + iter.Close(ctx) - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) + for _, testCase := range queries.VersionedViewTests { + TestPreparedQueryWithEngine(t, harness, e, testCase) + } +} - t10Table, ok, err := db.GetTableInsensitive(ctx, "t10") - require.NoError(t, err) - require.True(t, ok) - t10aTable, ok, err := db.GetTableInsensitive(ctx, "t10a") - require.NoError(t, err) - require.True(t, ok) +func TestCreateTable(t *testing.T, harness Harness) { + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.FooData) + for _, tt := range queries.CreateTableQueries { + runWriteQueryTest(t, harness, tt) + } - require.Equal(t, sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: false, PrimaryKey: true, Source: "t10"}, - {Name: "b", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 10), Nullable: true, Source: "t10"}, - }, t10Table.Schema()) - require.Equal(t, sql.Schema{ - {Name: "a", Type: sql.Int32, Nullable: false, PrimaryKey: true, Source: "t10a"}, - {Name: "b", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 10), Nullable: true, Source: "t10a"}, - }, t10aTable.Schema()) - }) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) + defer e.Close() t.Run("no database selected", func(t *testing.T) { ctx := NewContext(harness) @@ -2526,7 +1956,7 @@ func TestCreateTable(t *testing.T, harness Harness) { require.Equal(t, s, testTable.Schema()) }) - t.Run("CREATE TABLE with multiple unamed indexes", func(t *testing.T) { + t.Run("CREATE TABLE with multiple unnamed indexes", func(t *testing.T) { ctx := NewContext(harness) ctx.SetCurrentDatabase("") @@ -2560,125 +1990,24 @@ func TestCreateTable(t *testing.T, harness Harness) { require.True(t, index.ID() != "") } }) - //TODO: Implement "CREATE TABLE otherDb.tableName" - t.Run("CREATE TABLE with auto_increment on unique column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE auto_t1 (i int primary key, j int auto_increment unique)", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - ctx := NewContext(harness) - testTable, ok, err := db.GetTableInsensitive(ctx, "auto_t1") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "i", Type: sql.Int32, Nullable: false, Source: "auto_t1", PrimaryKey: true}, - {Name: "j", Type: sql.Int32, Nullable: true, Source: "auto_t1", AutoIncrement: true, Extra: "auto_increment"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("CREATE TABLE with auto_increment on index column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE auto_t2 (i int primary key, j int auto_increment, index (j))", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - ctx := NewContext(harness) - testTable, ok, err := db.GetTableInsensitive(ctx, "auto_t2") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "i", Type: sql.Int32, Nullable: false, Source: "auto_t2", PrimaryKey: true}, - {Name: "j", Type: sql.Int32, Nullable: true, Source: "auto_t2", AutoIncrement: true, Extra: "auto_increment"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("CREATE TABLE with auto_increment on multiple unique columns", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE auto_t3 (i int primary key, j int auto_increment, k int, unique(j,k))", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - ctx := NewContext(harness) - testTable, ok, err := db.GetTableInsensitive(ctx, "auto_t3") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "i", Type: sql.Int32, Nullable: false, Source: "auto_t3", PrimaryKey: true}, - {Name: "j", Type: sql.Int32, Nullable: true, Source: "auto_t3", AutoIncrement: true, Extra: "auto_increment"}, - {Name: "k", Type: sql.Int32, Nullable: true, Source: "auto_t3"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - - t.Run("CREATE TABLE with auto_increment on index column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE auto_t4 (i int primary key, j int auto_increment, k int, index (j,k))", []sql.Row{{sql.NewOkResult(0)}}, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - ctx := NewContext(harness) - testTable, ok, err := db.GetTableInsensitive(ctx, "auto_t4") - require.NoError(t, err) - require.True(t, ok) - - s := sql.Schema{ - {Name: "i", Type: sql.Int32, Nullable: false, Source: "auto_t4", PrimaryKey: true}, - {Name: "j", Type: sql.Int32, Nullable: true, Source: "auto_t4", AutoIncrement: true, Extra: "auto_increment"}, - {Name: "k", Type: sql.Int32, Nullable: true, Source: "auto_t4"}, - } - - require.Equal(t, s, testTable.Schema()) - }) - t.Run("create table statement with charset introducer in column definition", func(t *testing.T) { + t.Run("create table with blob column with null default", func(t *testing.T) { ctx := NewContext(harness) ctx.SetCurrentDatabase("mydb") - - TestQueryWithContext(t, ctx, e, `CREATE TABLE types_with_defaults ( - pk int NOT NULL, - col1 blob DEFAULT (_utf8mb4'abc'), - col2 json DEFAULT (json_object(_utf8mb4'a',1)), - col3 text DEFAULT (_utf8mb4'abc'), - PRIMARY KEY (pk) -)`, []sql.Row{{sql.NewOkResult(0)}}, nil, nil) - - db, err := e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - _, ok, err := db.GetTableInsensitive(ctx, "types_with_defaults") - require.NoError(t, err) - require.True(t, ok) - - RunQuery(t, e, harness, "INSERT INTO types_with_defaults (pk) VALUES (1)") - TestQueryWithContext(t, ctx, e, "SELECT * FROM types_with_defaults", []sql.Row{{1, "abc", sql.MustJSON(`{"a":1}`), "abc"}}, nil, nil) - - _, _, err = e.Query(ctx, "CREATE TABLE unsupported_charset (pk int NOT NULL, col1 blob DEFAULT (_latin1'abc'))") - require.Error(t, err) - }) - - t.Run("create table with blob column with null default", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t_blob_default_null(c BLOB DEFAULT NULL)", - []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t_blob_default_null(c BLOB DEFAULT NULL)", + []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t_blob_default_null VALUES ()") - TestQuery(t, harness, e, "SELECT * FROM t_blob_default_null", - []sql.Row{{nil}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t_blob_default_null", + []sql.Row{{nil}}, nil, nil) }) } func TestDropTable(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.OthertableData, setup2.TabletestData, setup2.Pk_tablesData) + e := mustNewEngine(t, harness) defer e.Close() ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(ctx, "mydb") @@ -2687,7 +2016,7 @@ func TestDropTable(t *testing.T, harness Harness) { _, ok, err := db.GetTableInsensitive(ctx, "mytable") require.True(ok) - TestQuery(t, harness, e, "DROP TABLE IF EXISTS mytable, not_exist", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "DROP TABLE IF EXISTS mytable, not_exist", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) _, ok, err = db.GetTableInsensitive(ctx, "mytable") require.NoError(err) @@ -2701,7 +2030,7 @@ func TestDropTable(t *testing.T, harness Harness) { require.NoError(err) require.True(ok) - TestQuery(t, harness, e, "DROP TABLE IF EXISTS othertable, tabletest", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "DROP TABLE IF EXISTS othertable, tabletest", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) _, ok, err = db.GetTableInsensitive(ctx, "othertable") require.NoError(err) @@ -2814,9 +2143,11 @@ func TestDropTable(t *testing.T, harness Harness) { func TestRenameTable(t *testing.T, harness Harness) { require := require.New(t) - - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.OthertableData, setup2.NiltableData, setup2.EmptytableData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) + db, err := e.Analyzer.Catalog.Database(NewContext(harness), "mydb") require.NoError(err) @@ -2824,7 +2155,7 @@ func TestRenameTable(t *testing.T, harness Harness) { require.NoError(err) require.True(ok) - TestQuery(t, harness, e, "RENAME TABLE mytable TO newTableName", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "RENAME TABLE mytable TO newTableName", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) _, ok, err = db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(err) @@ -2834,7 +2165,7 @@ func TestRenameTable(t *testing.T, harness Harness) { require.NoError(err) require.True(ok) - TestQuery(t, harness, e, "RENAME TABLE othertable to othertable2, newTableName to mytable", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "RENAME TABLE othertable to othertable2, newTableName to mytable", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) _, ok, err = db.GetTableInsensitive(NewContext(harness), "othertable") require.NoError(err) @@ -2852,7 +2183,7 @@ func TestRenameTable(t *testing.T, harness Harness) { require.NoError(err) require.True(ok) - TestQuery(t, harness, e, "ALTER TABLE mytable RENAME newTableName", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable RENAME newTableName", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) _, ok, err = db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(err) @@ -2894,8 +2225,10 @@ func TestRenameTable(t *testing.T, harness Harness) { func TestRenameColumn(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.TabletestData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(NewContext(harness), "mydb") require.NoError(err) @@ -2923,9 +2256,9 @@ func TestRenameColumn(t *testing.T, harness Harness) { {Name: "s2", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), Source: "mytable", Comment: "column s"}, }, tbl.Schema()) - TestQuery(t, harness, e, "select * from mytable order by i2 limit 1", []sql.Row{ + TestQueryWithContext(t, ctx, e, "select * from mytable order by i2 limit 1", []sql.Row{ {1, "first row"}, - }, nil) + }, nil, nil) t.Run("rename column preserves table checks", func(t *testing.T) { RunQuery(t, e, harness, "ALTER TABLE mytable ADD CONSTRAINT test_check CHECK (i2 < 12345)") @@ -2939,7 +2272,7 @@ func TestRenameColumn(t *testing.T, harness Harness) { checkTable, ok := tbl.(sql.CheckTable) require.True(ok) - checks, err := checkTable.GetChecks(harness.NewContext()) + checks, err := checkTable.GetChecks(NewContext(harness)) require.NoError(err) require.Equal(1, len(checks)) require.Equal("test_check", checks[0].Name) @@ -2998,16 +2331,19 @@ func assertSchemasEqualWithDefaults(t *testing.T, expected, actual sql.Schema) b return assert.Equal(t, ec, ac) } +//todo(max): convert to WriteQueryTest func TestAddColumn(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(NewContext(harness), "mydb") require.NoError(err) t.Run("column at end with default", func(t *testing.T) { - TestQuery(t, harness, e, "ALTER TABLE mytable ADD COLUMN i2 INT COMMENT 'hello' default 42", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable ADD COLUMN i2 INT COMMENT 'hello' default 42", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(err) @@ -3018,16 +2354,16 @@ func TestAddColumn(t *testing.T, harness Harness) { {Name: "i2", Type: sql.Int32, Source: "mytable", Comment: "hello", Nullable: true, Default: parse.MustStringToColumnDefaultValue(NewContext(harness), "42", sql.Int32, true)}, }, tbl.Schema()) - TestQuery(t, harness, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ + TestQueryWithContext(t, ctx, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ sql.NewRow(int64(1), "first row", int32(42)), sql.NewRow(int64(2), "second row", int32(42)), sql.NewRow(int64(3), "third row", int32(42)), - }, nil) + }, nil, nil) + }) t.Run("in middle, no default", func(t *testing.T) { - TestQuery(t, harness, e, "ALTER TABLE mytable ADD COLUMN s2 TEXT COMMENT 'hello' AFTER i", []sql.Row{{sql.NewOkResult(0)}}, nil) - + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable ADD COLUMN s2 TEXT COMMENT 'hello' AFTER i", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(err) require.True(ok) @@ -3038,30 +2374,30 @@ func TestAddColumn(t *testing.T, harness Harness) { {Name: "i2", Type: sql.Int32, Source: "mytable", Comment: "hello", Nullable: true, Default: parse.MustStringToColumnDefaultValue(NewContext(harness), "42", sql.Int32, true)}, }, tbl.Schema()) - TestQuery(t, harness, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ + TestQueryWithContext(t, ctx, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ sql.NewRow(int64(1), nil, "first row", int32(42)), sql.NewRow(int64(2), nil, "second row", int32(42)), sql.NewRow(int64(3), nil, "third row", int32(42)), - }, nil) + }, nil, nil) - TestQuery(t, harness, e, "insert into mytable values (4, 's2', 'fourth row', 11)", []sql.Row{ + TestQueryWithContext(t, ctx, e, "insert into mytable values (4, 's2', 'fourth row', 11)", []sql.Row{ {sql.NewOkResult(1)}, - }, nil) - TestQuery(t, harness, e, "update mytable set s2 = 'updated s2' where i2 = 42", []sql.Row{ + }, nil, nil) + TestQueryWithContext(t, ctx, e, "update mytable set s2 = 'updated s2' where i2 = 42", []sql.Row{ {sql.OkResult{RowsAffected: 3, Info: plan.UpdateInfo{ Matched: 3, Updated: 3, }}}, - }, nil) - TestQuery(t, harness, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ + }, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ sql.NewRow(int64(1), "updated s2", "first row", int32(42)), sql.NewRow(int64(2), "updated s2", "second row", int32(42)), sql.NewRow(int64(3), "updated s2", "third row", int32(42)), sql.NewRow(int64(4), "s2", "fourth row", int32(11)), - }, nil) + }, nil, nil) }) t.Run("first with default", func(t *testing.T) { - TestQuery(t, harness, e, "ALTER TABLE mytable ADD COLUMN s3 VARCHAR(25) COMMENT 'hello' default 'yay' FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable ADD COLUMN s3 VARCHAR(25) COMMENT 'hello' default 'yay' FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(err) @@ -3074,16 +2410,16 @@ func TestAddColumn(t *testing.T, harness Harness) { {Name: "i2", Type: sql.Int32, Source: "mytable", Comment: "hello", Nullable: true, Default: parse.MustStringToColumnDefaultValue(NewContext(harness), "42", sql.Int32, true)}, }, tbl.Schema()) - TestQuery(t, harness, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ + TestQueryWithContext(t, ctx, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ sql.NewRow("yay", int64(1), "updated s2", "first row", int32(42)), sql.NewRow("yay", int64(2), "updated s2", "second row", int32(42)), sql.NewRow("yay", int64(3), "updated s2", "third row", int32(42)), sql.NewRow("yay", int64(4), "s2", "fourth row", int32(11)), - }, nil) + }, nil, nil) }) t.Run("middle, no default, non null", func(t *testing.T) { - TestQuery(t, harness, e, "ALTER TABLE mytable ADD COLUMN s4 VARCHAR(1) not null after s3", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable ADD COLUMN s4 VARCHAR(1) not null after s3", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(err) @@ -3097,16 +2433,16 @@ func TestAddColumn(t *testing.T, harness Harness) { {Name: "i2", Type: sql.Int32, Source: "mytable", Comment: "hello", Nullable: true, Default: parse.MustStringToColumnDefaultValue(NewContext(harness), "42", sql.Int32, true)}, }, tbl.Schema()) - TestQuery(t, harness, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ + TestQueryWithContext(t, ctx, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ sql.NewRow("yay", "", int64(1), "updated s2", "first row", int32(42)), sql.NewRow("yay", "", int64(2), "updated s2", "second row", int32(42)), sql.NewRow("yay", "", int64(3), "updated s2", "third row", int32(42)), sql.NewRow("yay", "", int64(4), "s2", "fourth row", int32(11)), - }, nil) + }, nil, nil) }) t.Run("multiple in one statement", func(t *testing.T) { - TestQuery(t, harness, e, "ALTER TABLE mytable ADD COLUMN s5 VARCHAR(26), ADD COLUMN s6 VARCHAR(27)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable ADD COLUMN s5 VARCHAR(26), ADD COLUMN s6 VARCHAR(27)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(err) @@ -3122,12 +2458,12 @@ func TestAddColumn(t *testing.T, harness Harness) { {Name: "s6", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 27), Source: "mytable", Nullable: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ + TestQueryWithContext(t, ctx, e, "SELECT * FROM mytable ORDER BY i", []sql.Row{ sql.NewRow("yay", "", int64(1), "updated s2", "first row", int32(42), nil, nil), sql.NewRow("yay", "", int64(2), "updated s2", "second row", int32(42), nil, nil), sql.NewRow("yay", "", int64(3), "updated s2", "third row", int32(42), nil, nil), sql.NewRow("yay", "", int64(4), "s2", "fourth row", int32(11), nil, nil), - }, nil) + }, nil, nil) }) t.Run("error cases", func(t *testing.T) { @@ -3161,16 +2497,17 @@ func TestAddColumn(t *testing.T, harness Harness) { }) } +//todo(max): convert to WriteQueryTest func TestModifyColumn(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.Mytable_del_idxData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) + db, err := e.Analyzer.Catalog.Database(NewContext(harness), "mydb") require.NoError(t, err) - TestQuery(t, harness, e, "ALTER TABLE mytable MODIFY COLUMN i TEXT NOT NULL COMMENT 'modified'", - []sql.Row{{sql.NewOkResult(0)}}, - nil) - + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable MODIFY COLUMN i TEXT NOT NULL COMMENT 'modified'", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(t, err) require.True(t, ok) @@ -3179,7 +2516,7 @@ func TestModifyColumn(t *testing.T, harness Harness) { {Name: "s", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), Source: "mytable", Comment: "column s"}, }, tbl.Schema()) - TestQuery(t, harness, e, "ALTER TABLE mytable MODIFY COLUMN i TINYINT NOT NULL COMMENT 'yes' AFTER s", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable MODIFY COLUMN i TINYINT NOT NULL COMMENT 'yes' AFTER s", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err = db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(t, err) @@ -3189,7 +2526,7 @@ func TestModifyColumn(t *testing.T, harness Harness) { {Name: "i", Type: sql.Int8, Source: "mytable", Comment: "yes", PrimaryKey: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "ALTER TABLE mytable MODIFY COLUMN i BIGINT NOT NULL COMMENT 'ok' FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable MODIFY COLUMN i BIGINT NOT NULL COMMENT 'ok' FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err = db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(t, err) @@ -3199,7 +2536,7 @@ func TestModifyColumn(t *testing.T, harness Harness) { {Name: "s", Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), Source: "mytable", Comment: "column s"}, }, tbl.Schema()) - TestQuery(t, harness, e, "ALTER TABLE mytable MODIFY COLUMN s VARCHAR(20) NULL COMMENT 'changed'", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable MODIFY COLUMN s VARCHAR(20) NULL COMMENT 'changed'", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err = db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(t, err) @@ -3214,7 +2551,7 @@ func TestModifyColumn(t *testing.T, harness Harness) { AssertErr(t, e, harness, "ALTER TABLE not_exist MODIFY COLUMN i INT NOT NULL COMMENT 'hello'", sql.ErrTableNotFound) t.Run("auto increment attribute", func(t *testing.T) { - TestQuery(t, harness, e, "ALTER TABLE mytable MODIFY i BIGINT auto_increment", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable MODIFY i BIGINT auto_increment", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(NewContext(harness), "mytable") require.NoError(t, err) @@ -3225,7 +2562,7 @@ func TestModifyColumn(t *testing.T, harness Harness) { }, tbl.Schema()) RunQuery(t, e, harness, "insert into mytable (s) values ('new row')") - TestQuery(t, harness, e, "select i from mytable where s = 'new row'", []sql.Row{{4}}, nil) + TestQueryWithContext(t, ctx, e, "select i from mytable where s = 'new row'", []sql.Row{{4}}, nil, nil) AssertErr(t, e, harness, "ALTER TABLE mytable add column i2 bigint auto_increment", sql.ErrInvalidAutoIncCols) @@ -3259,18 +2596,19 @@ func TestModifyColumn(t *testing.T, harness Harness) { }) } +// todo(max): convert to WriteQueryTest func TestDropColumn(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.TabletestData) + e := mustNewEngine(t, harness) defer e.Close() ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(ctx, "mydb") require.NoError(err) t.Run("drop last column", func(t *testing.T) { - TestQuery(t, harness, e, "ALTER TABLE mytable DROP COLUMN s", []sql.Row{{sql.NewOkResult(0)}}, nil) - + TestQueryWithContext(t, ctx, e, "ALTER TABLE mytable DROP COLUMN s", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(ctx, "mytable") require.NoError(err) require.True(ok) @@ -3278,15 +2616,15 @@ func TestDropColumn(t *testing.T, harness Harness) { {Name: "i", Type: sql.Int64, Source: "mytable", PrimaryKey: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "select * from mytable order by i", []sql.Row{ + TestQueryWithContext(t, ctx, e, "select * from mytable order by i", []sql.Row{ {1}, {2}, {3}, - }, nil) + }, nil, nil) }) t.Run("drop first column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1 (a int, b varchar(10), c bigint, k bigint primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1 (a int, b varchar(10), c bigint, k bigint primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "insert into t1 values (1, 'abc', 2, 3), (4, 'def', 5, 6)") - TestQuery(t, harness, e, "ALTER TABLE t1 DROP COLUMN a", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t1 DROP COLUMN a", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(ctx, "t1") require.NoError(err) @@ -3297,16 +2635,16 @@ func TestDropColumn(t *testing.T, harness Harness) { {Name: "k", Type: sql.Int64, Source: "t1", PrimaryKey: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "select * from t1 order by b", []sql.Row{ + TestQueryWithContext(t, ctx, e, "select * from t1 order by b", []sql.Row{ {"abc", 2, 3}, {"def", 5, 6}, - }, nil) + }, nil, nil) }) t.Run("drop middle column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t2 (a int, b varchar(10), c bigint, k bigint primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t2 (a int, b varchar(10), c bigint, k bigint primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "insert into t2 values (1, 'abc', 2, 3), (4, 'def', 5, 6)") - TestQuery(t, harness, e, "ALTER TABLE t2 DROP COLUMN b", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t2 DROP COLUMN b", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(ctx, "t2") require.NoError(err) @@ -3317,18 +2655,18 @@ func TestDropColumn(t *testing.T, harness Harness) { {Name: "k", Type: sql.Int64, Source: "t2", PrimaryKey: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "select * from t2 order by c", []sql.Row{ + TestQueryWithContext(t, ctx, e, "select * from t2 order by c", []sql.Row{ {1, 2, 3}, {4, 5, 6}, - }, nil) + }, nil, nil) }) t.Run("drop primary key column", func(t *testing.T) { t.Skip("primary key column drops not well supported yet") - TestQuery(t, harness, e, "CREATE TABLE t3 (a int primary key, b varchar(10), c bigint)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t3 (a int primary key, b varchar(10), c bigint)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "insert into t3 values (1, 'abc', 2), (3, 'def', 4)") - TestQuery(t, harness, e, "ALTER TABLE t3 DROP COLUMN a", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t3 DROP COLUMN a", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(ctx, "t1") require.NoError(err) @@ -3338,10 +2676,10 @@ func TestDropColumn(t *testing.T, harness Harness) { {Name: "c", Type: sql.Int64, Source: "t3", Nullable: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "select * from t3 order by b", []sql.Row{ + TestQueryWithContext(t, ctx, e, "select * from t3 order by b", []sql.Row{ {"abc", 2, 3}, {"def", 4, 5}, - }, nil) + }, nil, nil) }) t.Run("no database selected", func(t *testing.T) { @@ -3383,7 +2721,7 @@ func TestDropColumnKeylessTables(t *testing.T, harness Harness) { t.Run("drop last column", func(t *testing.T) { RunQuery(t, e, harness, "create table t0 (i bigint, s varchar(20))") - TestQuery(t, harness, e, "ALTER TABLE t0 DROP COLUMN s", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t0 DROP COLUMN s", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(ctx, "t0") require.NoError(err) @@ -3394,9 +2732,9 @@ func TestDropColumnKeylessTables(t *testing.T, harness Harness) { }) t.Run("drop first column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1 (a int, b varchar(10), c bigint)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1 (a int, b varchar(10), c bigint)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "insert into t1 values (1, 'abc', 2), (4, 'def', 5)") - TestQuery(t, harness, e, "ALTER TABLE t1 DROP COLUMN a", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t1 DROP COLUMN a", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(ctx, "t1") require.NoError(err) @@ -3406,16 +2744,16 @@ func TestDropColumnKeylessTables(t *testing.T, harness Harness) { {Name: "c", Type: sql.Int64, Source: "t1", Nullable: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "select * from t1 order by b", []sql.Row{ + TestQueryWithContext(t, ctx, e, "select * from t1 order by b", []sql.Row{ {"abc", 2}, {"def", 5}, - }, nil) + }, nil, nil) }) t.Run("drop middle column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t2 (a int, b varchar(10), c bigint)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t2 (a int, b varchar(10), c bigint)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "insert into t2 values (1, 'abc', 2), (4, 'def', 5)") - TestQuery(t, harness, e, "ALTER TABLE t2 DROP COLUMN b", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t2 DROP COLUMN b", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) tbl, ok, err := db.GetTableInsensitive(ctx, "t2") require.NoError(err) @@ -3425,10 +2763,10 @@ func TestDropColumnKeylessTables(t *testing.T, harness Harness) { {Name: "c", Type: sql.Int64, Source: "t2", Nullable: true}, }, tbl.Schema()) - TestQuery(t, harness, e, "select * from t2 order by c", []sql.Row{ + TestQueryWithContext(t, ctx, e, "select * from t2 order by c", []sql.Row{ {1, 2}, {4, 5}, - }, nil) + }, nil, nil) }) t.Run("no database selected", func(t *testing.T) { @@ -3455,22 +2793,23 @@ func TestDropColumnKeylessTables(t *testing.T, harness Harness) { } func TestCreateDatabase(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup() + e := mustNewEngine(t, harness) defer e.Close() ctx := NewContext(harness) t.Run("CREATE DATABASE and create table", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE DATABASE testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE DATABASE testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) db, err := e.Analyzer.Catalog.Database(ctx, "testdb") require.NoError(t, err) - TestQuery(t, harness, e, "USE testdb", []sql.Row(nil), nil) + TestQueryWithContext(t, ctx, e, "USE testdb", []sql.Row(nil), nil, nil) require.Equal(t, ctx.GetCurrentDatabase(), "testdb") ctx = NewContext(harness) - TestQuery(t, harness, e, "CREATE TABLE test (pk int primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE test (pk int primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) db, err = e.Analyzer.Catalog.Database(ctx, "testdb") require.NoError(t, err) @@ -3482,17 +2821,17 @@ func TestCreateDatabase(t *testing.T, harness Harness) { }) t.Run("CREATE DATABASE IF NOT EXISTS", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE DATABASE IF NOT EXISTS testdb2", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE DATABASE IF NOT EXISTS testdb2", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) db, err := e.Analyzer.Catalog.Database(ctx, "testdb2") require.NoError(t, err) - TestQuery(t, harness, e, "USE testdb2", []sql.Row(nil), nil) + TestQueryWithContext(t, ctx, e, "USE testdb2", []sql.Row(nil), nil, nil) require.Equal(t, ctx.GetCurrentDatabase(), "testdb2") ctx = NewContext(harness) - TestQuery(t, harness, e, "CREATE TABLE test (pk int primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE test (pk int primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) db, err = e.Analyzer.Catalog.Database(ctx, "testdb2") require.NoError(t, err) @@ -3504,17 +2843,17 @@ func TestCreateDatabase(t *testing.T, harness Harness) { }) t.Run("CREATE SCHEMA", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE SCHEMA testdb3", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE SCHEMA testdb3", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) db, err := e.Analyzer.Catalog.Database(ctx, "testdb3") require.NoError(t, err) - TestQuery(t, harness, e, "USE testdb3", []sql.Row(nil), nil) + TestQueryWithContext(t, ctx, e, "USE testdb3", []sql.Row(nil), nil, nil) require.Equal(t, ctx.GetCurrentDatabase(), "testdb3") ctx = NewContext(harness) - TestQuery(t, harness, e, "CREATE TABLE test (pk int primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE test (pk int primary key)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) db, err = e.Analyzer.Catalog.Database(ctx, "testdb3") require.NoError(t, err) @@ -3543,119 +2882,13 @@ func TestCreateDatabase(t *testing.T, harness Harness) { } func TestPkOrdinalsDDL(t *testing.T, harness Harness) { - ddl := []struct { - name string - create string - alter string - expOrdinals []int - }{ - { - name: "CREATE table out of order PKs", - create: "CREATE TABLE a (x int, y int, primary key (y,x))", - expOrdinals: []int{1, 0}, - }, - { - name: "CREATE table out of order PKs", - create: "CREATE TABLE a (x int, y int, primary key (y,x))", - expOrdinals: []int{1, 0}, - }, - { - name: "Drop column shifts PK ordinals", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v))", - alter: "ALTER TABLE a DROP COLUMN w", - expOrdinals: []int{3, 1}, - }, - { - name: "Add column shifts PK ordinals", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v))", - alter: "ALTER TABLE a ADD COLUMN ww int AFTER v", - expOrdinals: []int{5, 1}, - }, - { - name: "Modify column shifts PK ordinals", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v))", - alter: "ALTER TABLE a MODIFY COLUMN w int AFTER y", - expOrdinals: []int{3, 1}, - }, - { - name: "Keyless table has no PK ordinals", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int)", - expOrdinals: []int{}, - }, - { - name: "Delete PRIMARY KEY leaves no PK ordinals", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v))", - alter: "ALTER TABLE a DROP PRIMARY KEY", - expOrdinals: []int{}, - }, - { - name: "Add primary key to table creates PK ordinals", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int)", - alter: "ALTER TABLE a ADD PRIMARY KEY (y,v)", - expOrdinals: []int{4, 1}, - }, - { - name: "Transpose PK column", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v))", - alter: "ALTER TABLE a MODIFY COLUMN y int AFTER u", - expOrdinals: []int{1, 2}, - }, - { - name: "Rename PK column", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v))", - alter: "ALTER TABLE a RENAME COLUMN y to yy", - expOrdinals: []int{4, 1}, - }, - { - name: "Complicated table ordinals", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u))", - expOrdinals: []int{4, 1, 3, 5, 0}, - }, - { - name: "Complicated table add column", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u))", - alter: "ALTER TABLE a ADD COLUMN ww int AFTER w", - expOrdinals: []int{5, 1, 4, 6, 0}, - }, - { - name: "Complicated table drop column", - create: "CREATE TABLE a (u int, v int, w int, ww int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u))", - alter: "ALTER TABLE a DROP COLUMN ww", - expOrdinals: []int{4, 1, 3, 5, 0}, - }, - { - name: "Complicated table transpose column", - create: "CREATE TABLE a (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u))", - alter: "ALTER TABLE a MODIFY COLUMN y int AFTER u", - expOrdinals: []int{1, 2, 4, 5, 0}, - }, + harness.Setup(setup2.OrdinalSetup...) + for _, tt := range queries.OrdinalDDLQueries { + TestQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns, nil) } - e := NewEngine(t, harness) - defer e.Close() - ctx := NewContext(harness) - - var err error - var db sql.Database - for _, tt := range ddl { - t.Run(tt.name, func(t *testing.T) { - defer RunQuery(t, e, harness, "DROP TABLE IF EXISTS a") - RunQuery(t, e, harness, tt.create) - RunQuery(t, e, harness, tt.alter) - - db, err = e.Analyzer.Catalog.Database(ctx, "mydb") - require.NoError(t, err) - - table, ok, err := db.GetTableInsensitive(ctx, "a") - - require.NoError(t, err) - require.True(t, ok) - pkTable, ok := table.(sql.PrimaryKeyTable) - require.True(t, ok) - - pkOrds := pkTable.PrimaryKeySchema().PkOrdinals - require.Equal(t, tt.expOrdinals, pkOrds) - }) + for _, tt := range queries.OrdinalDDLWriteQueries { + runWriteQueryTest(t, harness, tt) } } @@ -3795,8 +3028,10 @@ func TestPkOrdinalsDML(t *testing.T, harness Harness) { }, } - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "create table b (y char(6) primary key)") RunQuery(t, e, harness, "insert into b values ('aaaaaa'),('bbbbbb'),('cccccc')") for _, tt := range dml { @@ -3811,16 +3046,18 @@ func TestPkOrdinalsDML(t *testing.T, harness Harness) { if tt.mutate != "" { RunQuery(t, e, harness, tt.mutate) } - TestQuery(t, harness, e, tt.sel, tt.exp, nil) + TestQueryWithContext(t, ctx, e, tt.sel, tt.exp, nil, nil) }) } } func TestDropDatabase(t *testing.T, harness Harness) { + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) + defer e.Close() + ctx := NewContext(harness) t.Run("DROP DATABASE correctly works", func(t *testing.T) { - e := NewEngine(t, harness) - defer e.Close() - TestQuery(t, harness, e, "DROP DATABASE mydb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "DROP DATABASE mydb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) _, err := e.Analyzer.Catalog.Database(NewContext(harness), "mydb") require.Error(t, err) @@ -3832,24 +3069,24 @@ func TestDropDatabase(t *testing.T, harness Harness) { t.Run("DROP DATABASE works on newly created databases.", func(t *testing.T) { e := NewEngine(t, harness) defer e.Close() - TestQuery(t, harness, e, "CREATE DATABASE testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE DATABASE testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) _, err := e.Analyzer.Catalog.Database(NewContext(harness), "testdb") require.NoError(t, err) - TestQuery(t, harness, e, "DROP DATABASE testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "DROP DATABASE testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) AssertErr(t, e, harness, "USE testdb", sql.ErrDatabaseNotFound) }) t.Run("DROP SCHEMA works on newly created databases.", func(t *testing.T) { e := NewEngine(t, harness) defer e.Close() - TestQuery(t, harness, e, "CREATE SCHEMA testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE SCHEMA testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) _, err := e.Analyzer.Catalog.Database(NewContext(harness), "testdb") require.NoError(t, err) - TestQuery(t, harness, e, "DROP SCHEMA testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil) + TestQueryWithContext(t, ctx, e, "DROP SCHEMA testdb", []sql.Row{{sql.OkResult{RowsAffected: 1}}}, nil, nil) AssertErr(t, e, harness, "USE testdb", sql.ErrDatabaseNotFound) }) @@ -3888,17 +3125,17 @@ func TestDropDatabase(t *testing.T, harness Harness) { func TestCreateForeignKeys(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() - - TestQuery(t, harness, e, "CREATE TABLE parent(a INTEGER PRIMARY KEY, b INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE parent ADD INDEX pb (b)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "CREATE TABLE child(c INTEGER PRIMARY KEY, d INTEGER, "+ + ctx := NewContext(harness) + TestQueryWithContext(t, ctx, e, "CREATE TABLE parent(a INTEGER PRIMARY KEY, b INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE parent ADD INDEX pb (b)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE child(c INTEGER PRIMARY KEY, d INTEGER, "+ "CONSTRAINT fk1 FOREIGN KEY (D) REFERENCES parent(B) ON DELETE CASCADE"+ - ")", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE child ADD CONSTRAINT fk4 FOREIGN KEY (D) REFERENCES child(C)", []sql.Row{{sql.NewOkResult(0)}}, nil) + ")", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE child ADD CONSTRAINT fk4 FOREIGN KEY (D) REFERENCES child(C)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) - ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(ctx, "mydb") require.NoError(err) @@ -3940,9 +3177,9 @@ func TestCreateForeignKeys(t *testing.T, harness Harness) { } assert.Equal(t, expected, fks) - TestQuery(t, harness, e, "CREATE TABLE child2(e INTEGER PRIMARY KEY, f INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE child2 ADD CONSTRAINT fk2 FOREIGN KEY (f) REFERENCES parent(b) ON DELETE RESTRICT", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE child2 ADD CONSTRAINT fk3 FOREIGN KEY (f) REFERENCES child(d) ON UPDATE SET NULL", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE child2(e INTEGER PRIMARY KEY, f INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE child2 ADD CONSTRAINT fk2 FOREIGN KEY (f) REFERENCES parent(b) ON DELETE RESTRICT", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE child2 ADD CONSTRAINT fk3 FOREIGN KEY (f) REFERENCES child(d) ON UPDATE SET NULL", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) child, ok, err = db.GetTableInsensitive(ctx, "child2") require.NoError(err) @@ -4001,12 +3238,12 @@ func TestCreateForeignKeys(t *testing.T, harness Harness) { t.Run("Add a column then immediately add a foreign key", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE parent3 (pk BIGINT PRIMARY KEY, v1 BIGINT, INDEX (v1))") RunQuery(t, e, harness, "CREATE TABLE child3 (pk BIGINT PRIMARY KEY);") - TestQuery(t, harness, e, "ALTER TABLE child3 ADD COLUMN v1 BIGINT NULL, ADD CONSTRAINT fk_child3 FOREIGN KEY (v1) REFERENCES parent3(v1);", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE child3 ADD COLUMN v1 BIGINT NULL, ADD CONSTRAINT fk_child3 FOREIGN KEY (v1) REFERENCES parent3(v1);", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) }) - TestScript(t, harness, ScriptTest{ + TestScript(t, harness, queries.ScriptTest{ Name: "Do not validate foreign keys if FOREIGN_KEY_CHECKS is set to zero", - Assertions: []ScriptTestAssertion{ + Assertions: []queries.ScriptTestAssertion{ { Query: "SET FOREIGN_KEY_CHECKS=0;", Expected: []sql.Row{{}}, @@ -4026,19 +3263,21 @@ func TestCreateForeignKeys(t *testing.T, harness Harness) { func TestDropForeignKeys(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) - TestQuery(t, harness, e, "CREATE TABLE parent(a INTEGER PRIMARY KEY, b INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE parent ADD INDEX pb (b)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "CREATE TABLE child(c INTEGER PRIMARY KEY, d INTEGER, "+ + TestQueryWithContext(t, ctx, e, "CREATE TABLE parent(a INTEGER PRIMARY KEY, b INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE parent ADD INDEX pb (b)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE child(c INTEGER PRIMARY KEY, d INTEGER, "+ "CONSTRAINT fk1 FOREIGN KEY (d) REFERENCES parent(b) ON DELETE CASCADE"+ - ")", []sql.Row{{sql.NewOkResult(0)}}, nil) + ")", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) - TestQuery(t, harness, e, "CREATE TABLE child2(e INTEGER PRIMARY KEY, f INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE child2 ADD CONSTRAINT fk2 FOREIGN KEY (f) REFERENCES parent(b) ON DELETE RESTRICT, "+ - "ADD CONSTRAINT fk3 FOREIGN KEY (f) REFERENCES child(d) ON UPDATE SET NULL", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE child2 DROP CONSTRAINT fk2", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE child2(e INTEGER PRIMARY KEY, f INTEGER)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE child2 ADD CONSTRAINT fk2 FOREIGN KEY (f) REFERENCES parent(b) ON DELETE RESTRICT, "+ + "ADD CONSTRAINT fk3 FOREIGN KEY (f) REFERENCES child(d) ON UPDATE SET NULL", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE child2 DROP CONSTRAINT fk2", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) db, err := e.Analyzer.Catalog.Database(NewContext(harness), "mydb") require.NoError(err) @@ -4069,7 +3308,7 @@ func TestDropForeignKeys(t *testing.T, harness Harness) { } assert.Equal(t, expected, fks) - TestQuery(t, harness, e, "ALTER TABLE child2 DROP FOREIGN KEY fk3", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE child2 DROP FOREIGN KEY fk3", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) child, ok, err = db.GetTableInsensitive(NewContext(harness), "child2") require.NoError(err) @@ -4089,38 +3328,25 @@ func TestDropForeignKeys(t *testing.T, harness Harness) { } func TestForeignKeys(t *testing.T, harness Harness) { - for _, script := range ForeignKeyTests { - t.Run(script.Name, func(t *testing.T) { - myDb := harness.NewDatabase("mydb") - databases := []sql.Database{myDb} - e := NewEngineWithDbs(t, harness, databases) - defer e.Close() - script.SetUpScript = append([]string{ - "CREATE TABLE parent (id INT PRIMARY KEY, v1 INT, v2 INT, INDEX v1 (v1), INDEX v2 (v2));", - "CREATE TABLE child (id INT PRIMARY KEY, v1 INT, v2 INT);", - }, script.SetUpScript...) - TestScriptWithEngine(t, e, harness, script) - }) + harness.Setup(setup2.MydbData, setup2.Parent_childData) + for _, script := range queries.ForeignKeyTests { + TestScript(t, harness, script) } } +// todo(max): rewrite this using info schema and []QueryTest func TestCreateCheckConstraints(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.ChecksSetup...) + e := mustNewEngine(t, harness) defer e.Close() - - RunQuery(t, e, harness, "CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER, c varchar(20))") - RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk1 CHECK (B > 0)") - RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk2 CHECK (b > 0) NOT ENFORCED") - RunQuery(t, e, harness, "ALTER TABLE T1 ADD CONSTRAINT chk3 CHECK (B > 1)") - RunQuery(t, e, harness, "ALTER TABLE T1 ADD CONSTRAINT chk4 CHECK (upper(C) = c)") + ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(NewContext(harness), "mydb") require.NoError(err) - ctx := NewContext(harness) - table, ok, err := db.GetTableInsensitive(ctx, "t1") + table, ok, err := db.GetTableInsensitive(ctx, "checks") require.NoError(err) require.True(ok) @@ -4155,9 +3381,9 @@ func TestCreateCheckConstraints(t *testing.T, harness Harness) { assert.Equal(t, expected, checks) // Unnamed constraint - RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT CHECK (b > 100)") + RunQuery(t, e, harness, "ALTER TABLE checks ADD CONSTRAINT CHECK (b > 100)") - table, ok, err = db.GetTableInsensitive(NewContext(harness), "t1") + table, ok, err = db.GetTableInsensitive(NewContext(harness), "checks") require.NoError(err) require.True(ok) @@ -4218,7 +3444,7 @@ CREATE TABLE T2 // Some faulty create statements AssertErr(t, e, harness, "ALTER TABLE t3 ADD CONSTRAINT chk2 CHECK (c > 0)", sql.ErrTableNotFound) - AssertErr(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk3 CHECK (d > 0)", sql.ErrColumnNotFound) + AssertErr(t, e, harness, "ALTER TABLE checks ADD CONSTRAINT chk3 CHECK (d > 0)", sql.ErrColumnNotFound) AssertErr(t, e, harness, ` CREATE TABLE t4 @@ -4231,14 +3457,17 @@ CREATE TABLE t4 // Test any scripts relevant to CheckConstraints. We do this separately from the rest of the scripts // as certain integrators might not implement check constraints. - for _, script := range CreateCheckConstraintsScripts { + for _, script := range queries.CreateCheckConstraintsScripts { TestScript(t, harness, script) } } +// todo(max): rewrite into []ScriptTest func TestChecksOnInsert(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER, c varchar(20))") RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk1 CHECK (b > 10) NOT ENFORCED") @@ -4253,9 +3482,9 @@ func TestChecksOnInsert(t *testing.T, harness Harness) { RunQuery(t, e, harness, "INSERT INTO t1 VALUES (1,1,'ABC')") - TestQuery(t, harness, e, `SELECT * FROM t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1`, []sql.Row{ {1, 1, "ABC"}, - }, nil) + }, nil, nil) AssertErr(t, e, harness, "INSERT INTO t1 (a,b) VALUES (0,0)", sql.ErrCheckConstraintViolated) AssertErr(t, e, harness, "INSERT INTO t1 (a,b) VALUES (0,1)", sql.ErrCheckConstraintViolated) AssertErr(t, e, harness, "INSERT INTO t1 (a,b,c) VALUES (2,2,'abc')", sql.ErrCheckConstraintViolated) @@ -4265,11 +3494,11 @@ func TestChecksOnInsert(t *testing.T, harness Harness) { RunQuery(t, e, harness, "INSERT INTO t1 VALUES (2,2,'ABC')") RunQuery(t, e, harness, "INSERT INTO t1 (a,b) VALUES (4,NULL)") - TestQuery(t, harness, e, `SELECT * FROM t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1`, []sql.Row{ {1, 1, "ABC"}, {2, 2, "ABC"}, {4, nil, nil}, - }, nil) + }, nil, nil) RunQuery(t, e, harness, "CREATE TABLE t2 (a INTEGER PRIMARY KEY, b INTEGER)") RunQuery(t, e, harness, "INSERT INTO t2 VALUES (2,2),(3,3)") @@ -4280,18 +3509,21 @@ func TestChecksOnInsert(t *testing.T, harness Harness) { // Check that INSERT IGNORE correctly drops errors with check constraints and does not update the actual table. RunQuery(t, e, harness, "INSERT IGNORE INTO t1 VALUES (5,2, 'abc')") - TestQuery(t, harness, e, `SELECT count(*) FROM t1 where a = 5`, []sql.Row{{0}}, nil) + TestQueryWithContext(t, ctx, e, `SELECT count(*) FROM t1 where a = 5`, []sql.Row{{0}}, nil, nil) // One value is correctly accepted and the other value is not accepted due to a check constraint violation. // The accepted value is correctly added to the table. RunQuery(t, e, harness, "INSERT IGNORE INTO t1 VALUES (4,4, null), (5,2, 'abc')") - TestQuery(t, harness, e, `SELECT count(*) FROM t1 where a = 5`, []sql.Row{{0}}, nil) - TestQuery(t, harness, e, `SELECT count(*) FROM t1 where a = 4`, []sql.Row{{1}}, nil) + TestQueryWithContext(t, ctx, e, `SELECT count(*) FROM t1 where a = 5`, []sql.Row{{0}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT count(*) FROM t1 where a = 4`, []sql.Row{{1}}, nil, nil) } +// todo(max): rewrite into []ScriptTest func TestChecksOnUpdate(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER)") RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk1 CHECK (b > 10) NOT ENFORCED") @@ -4299,22 +3531,23 @@ func TestChecksOnUpdate(t *testing.T, harness Harness) { RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk3 CHECK ((a + b) / 2 >= 1) ENFORCED") RunQuery(t, e, harness, "INSERT INTO t1 VALUES (1,1)") - TestQuery(t, harness, e, `SELECT * FROM t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1`, []sql.Row{ {1, 1}, - }, nil) + }, nil, nil) AssertErr(t, e, harness, "UPDATE t1 set b = 0", sql.ErrCheckConstraintViolated) AssertErr(t, e, harness, "UPDATE t1 set a = 0, b = 1", sql.ErrCheckConstraintViolated) AssertErr(t, e, harness, "UPDATE t1 set b = 0 WHERE b = 1", sql.ErrCheckConstraintViolated) AssertErr(t, e, harness, "UPDATE t1 set a = 0, b = 1 WHERE b = 1", sql.ErrCheckConstraintViolated) - TestQuery(t, harness, e, `SELECT * FROM t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1`, []sql.Row{ {1, 1}, - }, nil) + }, nil, nil) } func TestDisallowedCheckConstraints(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() RunQuery(t, e, harness, "CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER)") @@ -4377,11 +3610,14 @@ CREATE TABLE t3 ( `, sql.ErrInvalidConstraintSubqueryNotSupported) } +// todo(max): rewrite with []ScriptTest func TestDropCheckConstraints(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER, c integer)") RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk1 CHECK (a > 0)") @@ -4390,7 +3626,6 @@ func TestDropCheckConstraints(t *testing.T, harness Harness) { RunQuery(t, e, harness, "ALTER TABLE t1 DROP CONSTRAINT chk2") RunQuery(t, e, harness, "ALTER TABLE t1 DROP CHECK chk1") - ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(ctx, "mydb") require.NoError(err) @@ -4424,15 +3659,16 @@ func TestDropCheckConstraints(t *testing.T, harness Harness) { func TestDropConstraints(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER, c integer)") RunQuery(t, e, harness, "CREATE TABLE t2 (a INTEGER PRIMARY KEY, b INTEGER, c integer, INDEX (b))") RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT chk1 CHECK (a > 0)") RunQuery(t, e, harness, "ALTER TABLE t1 ADD CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t2(b)") - ctx := NewContext(harness) db, err := e.Analyzer.Catalog.Database(ctx, "mydb") require.NoError(err) @@ -4540,165 +3776,167 @@ func TestDropConstraints(t *testing.T, harness Harness) { } func TestWindowFunctions(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER, c integer)") RunQuery(t, e, harness, "INSERT INTO t1 VALUES (0,0,0), (1,1,1), (2,2,0), (3,0,0), (4,1,0), (5,3,0)") - TestQuery(t, harness, e, `SELECT a, percent_rank() over (order by b) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, percent_rank() over (order by b) FROM t1 order by a`, []sql.Row{ {0, 0.0}, {1, 0.4}, {2, 0.8}, {3, 0.0}, {4, 0.4}, {5, 1.0}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, percent_rank() over (order by b desc) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, percent_rank() over (order by b desc) FROM t1 order by a`, []sql.Row{ {0, 0.8}, {1, 0.4}, {2, 0.2}, {3, 0.8}, {4, 0.4}, {5, 0.0}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, percent_rank() over (partition by c order by b) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, percent_rank() over (partition by c order by b) FROM t1 order by a`, []sql.Row{ {0, 0.0}, {1, 0.0}, {2, 0.75}, {3, 0.0}, {4, 0.5}, {5, 1.0}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, percent_rank() over (partition by b order by c) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, percent_rank() over (partition by b order by c) FROM t1 order by a`, []sql.Row{ {0, 0.0}, {1, 1.0}, {2, 0.0}, {3, 0.0}, {4, 0.0}, {5, 0.0}, - }, nil) + }, nil, nil) // no order by clause -> all rows are peers - TestQuery(t, harness, e, `SELECT a, percent_rank() over (partition by b) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, percent_rank() over (partition by b) FROM t1 order by a`, []sql.Row{ {0, 0.0}, {1, 0.0}, {2, 0.0}, {3, 0.0}, {4, 0.0}, {5, 0.0}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, first_value(b) over (partition by c order by b) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, first_value(b) over (partition by c order by b) FROM t1 order by a`, []sql.Row{ {0, 0}, {1, 1}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, first_value(a) over (partition by b order by a ASC, c ASC) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, first_value(a) over (partition by b order by a ASC, c ASC) FROM t1 order by a`, []sql.Row{ {0, 0}, {1, 1}, {2, 2}, {3, 0}, {4, 1}, {5, 5}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, first_value(a-1) over (partition by b order by a ASC, c ASC) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, first_value(a-1) over (partition by b order by a ASC, c ASC) FROM t1 order by a`, []sql.Row{ {0, -1}, {1, 0}, {2, 1}, {3, -1}, {4, 0}, {5, 4}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, first_value(c) over (partition by b) FROM t1 order by a*b,a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, first_value(c) over (partition by b) FROM t1 order by a*b,a`, []sql.Row{ {0, 0}, {3, 0}, {1, 1}, {2, 0}, {4, 1}, {5, 0}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag(a) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag(a) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, nil}, {1, nil}, {2, 0}, {3, 2}, {4, 3}, {5, 4}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag(a, 1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag(a, 1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, nil}, {1, nil}, {2, 0}, {3, 2}, {4, 3}, {5, 4}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag(a+2) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag(a+2) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, nil}, {1, nil}, {2, 2}, {3, 4}, {4, 5}, {5, 6}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag(a, 1, a-1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag(a, 1, a-1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, -1}, {1, 0}, {2, 0}, {3, 2}, {4, 3}, {5, 4}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag(a, 0) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag(a, 0) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag(a, 1, -1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag(a, 1, -1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, -1}, {1, -1}, {2, 0}, {3, 2}, {4, 3}, {5, 4}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag(a, 3, -1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag(a, 3, -1) over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, -1}, {1, -1}, {2, -1}, {3, -1}, {4, 0}, {5, 2}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT a, lag('s') over (partition by c order by a) FROM t1 order by a`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT a, lag('s') over (partition by c order by a) FROM t1 order by a`, []sql.Row{ {0, nil}, {1, nil}, {2, "s"}, {3, "s"}, {4, "s"}, {5, "s"}, - }, nil) + }, nil, nil) AssertErr(t, e, harness, "SELECT a, lag(a, -1) over (partition by c) FROM t1", expression.ErrInvalidOffset) AssertErr(t, e, harness, "SELECT a, lag(a, 's') over (partition by c) FROM t1", expression.ErrInvalidOffset) @@ -4706,84 +3944,90 @@ func TestWindowFunctions(t *testing.T, harness Harness) { } func TestWindowRowFrames(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE a (x INTEGER PRIMARY KEY, y INTEGER, z INTEGER)") RunQuery(t, e, harness, "INSERT INTO a VALUES (0,0,0), (1,1,0), (2,2,0), (3,0,0), (4,1,0), (5,3,0)") - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows unbounded preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows 2 preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between current row and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between 1 preceding and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between current row and 2 following) FROM a order by x`, []sql.Row{{float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between current row and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between current row and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between 1 preceding and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between 1 preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between unbounded preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x rows between 2 preceding and 1 preceding) FROM a order by x`, []sql.Row{{nil}, {float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}}, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows unbounded preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows 2 preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between current row and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between 1 preceding and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between current row and 2 following) FROM a order by x`, []sql.Row{{float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between current row and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between current row and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between 1 preceding and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between 1 preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between unbounded preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x rows between 2 preceding and 1 preceding) FROM a order by x`, []sql.Row{{nil}, {float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}}, nil, nil) } func TestWindowRangeFrames(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE a (x INTEGER PRIMARY KEY, y INTEGER, z INTEGER)") RunQuery(t, e, harness, "INSERT INTO a VALUES (0,0,0), (1,1,0), (2,2,0), (3,0,0), (4,1,0), (5,3,0)") - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range unbounded preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range 2 preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between current row and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between 1 preceding and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between current row and 2 following) FROM a order by x`, []sql.Row{{float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between current row and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between current row and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between 1 preceding and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between 1 preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between unbounded preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by x range between 2 preceding and 1 preceding) FROM a order by x`, []sql.Row{{nil}, {float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}}, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range unbounded preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range 2 preceding) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between current row and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between 1 preceding and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between current row and 2 following) FROM a order by x`, []sql.Row{{float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between current row and current row) FROM a order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between current row and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between 1 preceding and 1 following) FROM a order by x`, []sql.Row{{float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between 1 preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(6)}, {float64(4)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between unbounded preceding and unbounded following) FROM a order by x`, []sql.Row{{float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}, {float64(7)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by x range between 2 preceding and 1 preceding) FROM a order by x`, []sql.Row{{nil}, {float64(0)}, {float64(1)}, {float64(3)}, {float64(2)}, {float64(1)}}, nil, nil) // fixed frame size, 3 days RunQuery(t, e, harness, "CREATE TABLE b (x INTEGER PRIMARY KEY, y INTEGER, z INTEGER, date DATE)") RunQuery(t, e, harness, "INSERT INTO b VALUES (0,0,0,'2022-01-26'), (1,0,0,'2022-01-27'), (2,0,0, '2022-01-28'), (3,1,0,'2022-01-29'), (4,1,0,'2022-01-30'), (5,3,0,'2022-01-31')") - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval 2 DAY preceding and interval 1 DAY preceding) FROM b order by x`, []sql.Row{{nil}, {float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY preceding and interval 1 DAY following) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(5)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY following and interval 2 DAY following) FROM b order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(4)}, {float64(3)}, {nil}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range interval 1 DAY preceding) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY preceding and current row) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY preceding and unbounded following) FROM b order by x`, []sql.Row{{float64(5)}, {float64(5)}, {float64(5)}, {float64(5)}, {float64(5)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between unbounded preceding and interval 1 DAY following) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(5)}, {float64(5)}}, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval 2 DAY preceding and interval 1 DAY preceding) FROM b order by x`, []sql.Row{{nil}, {float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY preceding and interval 1 DAY following) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(5)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY following and interval 2 DAY following) FROM b order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(4)}, {float64(3)}, {nil}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range interval 1 DAY preceding) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY preceding and current row) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval 1 DAY preceding and unbounded following) FROM b order by x`, []sql.Row{{float64(5)}, {float64(5)}, {float64(5)}, {float64(5)}, {float64(5)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between unbounded preceding and interval 1 DAY following) FROM b order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(1)}, {float64(2)}, {float64(5)}, {float64(5)}}, nil, nil) // variable range size, 1 or many days RunQuery(t, e, harness, "CREATE TABLE c (x INTEGER PRIMARY KEY, y INTEGER, z INTEGER, date DATE)") RunQuery(t, e, harness, "INSERT INTO c VALUES (0,0,0,'2022-01-26'), (1,0,0,'2022-01-26'), (2,0,0, '2022-01-26'), (3,1,0,'2022-01-27'), (4,1,0,'2022-01-29'), (5,3,0,'2022-01-30'), (6,0,0, '2022-02-03'), (7,1,0,'2022-02-03'), (8,1,0,'2022-02-04'), (9,3,0,'2022-02-04')") - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval '2' DAY preceding and interval '1' DAY preceding) FROM c order by x`, []sql.Row{{nil}, {nil}, {nil}, {float64(0)}, {float64(1)}, {float64(1)}, {nil}, {nil}, {float64(1)}, {float64(1)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval '1' DAY preceding and interval '1' DAY following) FROM c order by x`, []sql.Row{{float64(1)}, {float64(1)}, {float64(1)}, {float64(1)}, {float64(4)}, {float64(4)}, {float64(5)}, {float64(5)}, {float64(5)}, {float64(5)}}, nil) - TestQuery(t, harness, e, `SELECT first_value(x) over (partition by z order by date range interval '1' DAY preceding) FROM c order by x`, []sql.Row{{0}, {0}, {0}, {0}, {4}, {4}, {6}, {6}, {6}, {6}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between interval '1' DAY preceding and current row) FROM c order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(1)}, {float64(4)}, {float64(1)}, {float64(1)}, {float64(5)}, {float64(5)}}, nil) - TestQuery(t, harness, e, `SELECT avg(y) over (partition by z order by date range between interval '1' DAY preceding and unbounded following) FROM c order by x`, []sql.Row{{float64(1)}, {float64(1)}, {float64(1)}, {float64(1)}, {float64(3) / float64(2)}, {float64(3) / float64(2)}, {float64(5) / float64(4)}, {float64(5) / float64(4)}, {float64(5) / float64(4)}, {float64(5) / float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (partition by z order by date range between unbounded preceding and interval '1' DAY following) FROM c order by x`, []sql.Row{{float64(1)}, {float64(1)}, {float64(1)}, {float64(1)}, {float64(5)}, {float64(5)}, {float64(10)}, {float64(10)}, {float64(10)}, {float64(10)}}, nil) - TestQuery(t, harness, e, `SELECT count(y) over (partition by z order by date range between interval '1' DAY following and interval '2' DAY following) FROM c order by x`, []sql.Row{{1}, {1}, {1}, {1}, {1}, {0}, {2}, {2}, {0}, {0}}, nil) - TestQuery(t, harness, e, `SELECT count(y) over (partition by z order by date range between interval '1' DAY preceding and interval '2' DAY following) FROM c order by x`, []sql.Row{{4}, {4}, {4}, {5}, {2}, {2}, {4}, {4}, {4}, {4}}, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval '2' DAY preceding and interval '1' DAY preceding) FROM c order by x`, []sql.Row{{nil}, {nil}, {nil}, {float64(0)}, {float64(1)}, {float64(1)}, {nil}, {nil}, {float64(1)}, {float64(1)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval '1' DAY preceding and interval '1' DAY following) FROM c order by x`, []sql.Row{{float64(1)}, {float64(1)}, {float64(1)}, {float64(1)}, {float64(4)}, {float64(4)}, {float64(5)}, {float64(5)}, {float64(5)}, {float64(5)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT first_value(x) over (partition by z order by date range interval '1' DAY preceding) FROM c order by x`, []sql.Row{{0}, {0}, {0}, {0}, {4}, {4}, {6}, {6}, {6}, {6}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between interval '1' DAY preceding and current row) FROM c order by x`, []sql.Row{{float64(0)}, {float64(0)}, {float64(0)}, {float64(1)}, {float64(1)}, {float64(4)}, {float64(1)}, {float64(1)}, {float64(5)}, {float64(5)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT avg(y) over (partition by z order by date range between interval '1' DAY preceding and unbounded following) FROM c order by x`, []sql.Row{{float64(1)}, {float64(1)}, {float64(1)}, {float64(1)}, {float64(3) / float64(2)}, {float64(3) / float64(2)}, {float64(5) / float64(4)}, {float64(5) / float64(4)}, {float64(5) / float64(4)}, {float64(5) / float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (partition by z order by date range between unbounded preceding and interval '1' DAY following) FROM c order by x`, []sql.Row{{float64(1)}, {float64(1)}, {float64(1)}, {float64(1)}, {float64(5)}, {float64(5)}, {float64(10)}, {float64(10)}, {float64(10)}, {float64(10)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT count(y) over (partition by z order by date range between interval '1' DAY following and interval '2' DAY following) FROM c order by x`, []sql.Row{{1}, {1}, {1}, {1}, {1}, {0}, {2}, {2}, {0}, {0}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT count(y) over (partition by z order by date range between interval '1' DAY preceding and interval '2' DAY following) FROM c order by x`, []sql.Row{{4}, {4}, {4}, {5}, {2}, {2}, {4}, {4}, {4}, {4}}, nil, nil) AssertErr(t, e, harness, "SELECT sum(y) over (partition by z range between unbounded preceding and interval '1' DAY following) FROM c order by x", aggregation.ErrRangeInvalidOrderBy) AssertErr(t, e, harness, "SELECT sum(y) over (partition by z order by date range interval 'e' DAY preceding) FROM c order by x", sql.ErrInvalidValue) } func TestNamedWindows(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) RunQuery(t, e, harness, "CREATE TABLE a (x INTEGER PRIMARY KEY, y INTEGER, z INTEGER)") RunQuery(t, e, harness, "INSERT INTO a VALUES (0,0,0), (1,1,0), (2,2,0), (3,0,0), (4,1,0), (5,3,0)") - TestQuery(t, harness, e, `SELECT sum(y) over (w1) FROM a WINDOW w1 as (order by z) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (w1) FROM a WINDOW w1 as (partition by z) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over w FROM a WINDOW w as (partition by z order by x rows unbounded preceding) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over w FROM a WINDOW w as (partition by z order by x rows current row) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil) - TestQuery(t, harness, e, `SELECT sum(y) over (w) FROM a WINDOW w as (partition by z order by x rows 2 preceding) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}}, nil) - TestQuery(t, harness, e, `SELECT row_number() over (w3) FROM a WINDOW w3 as (w2), w2 as (w1), w1 as (partition by z) order by x`, []sql.Row{{int64(1)}, {int64(2)}, {int64(3)}, {int64(4)}, {int64(5)}, {int64(6)}}, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (w1) FROM a WINDOW w1 as (order by z) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (w1) FROM a WINDOW w1 as (partition by z) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over w FROM a WINDOW w as (partition by z order by x rows unbounded preceding) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(4)}, {float64(7)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over w FROM a WINDOW w as (partition by z order by x rows current row) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(2)}, {float64(0)}, {float64(1)}, {float64(3)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT sum(y) over (w) FROM a WINDOW w as (partition by z order by x rows 2 preceding) order by x`, []sql.Row{{float64(0)}, {float64(1)}, {float64(3)}, {float64(3)}, {float64(3)}, {float64(4)}}, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT row_number() over (w3) FROM a WINDOW w3 as (w2), w2 as (w1), w1 as (partition by z) order by x`, []sql.Row{{int64(1)}, {int64(2)}, {int64(3)}, {int64(4)}, {int64(5)}, {int64(6)}}, nil, nil) // errors AssertErr(t, e, harness, "SELECT sum(y) over (w1 partition by x) FROM a WINDOW w1 as (partition by z) order by x", sql.ErrInvalidWindowInheritance) @@ -4799,6 +4043,8 @@ func TestNaturalJoin(t *testing.T, harness Harness) { require := require.New(t) db := harness.NewDatabase("mydb") + ctx := NewContext(harness) + wrapInTransaction(t, db, harness, func() { t1, err := harness.NewTable(db, "t1", sql.NewPrimaryKeySchema(sql.Schema{ {Name: "a", Type: sql.Text, Source: "t1", PrimaryKey: true}, @@ -4827,17 +4073,19 @@ func TestNaturalJoin(t *testing.T, harness Harness) { e := sqle.NewDefault(harness.NewDatabaseProvider(db)) - TestQuery(t, harness, e, `SELECT * FROM t1 NATURAL JOIN t2`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 NATURAL JOIN t2`, []sql.Row{ {"a_1", "b_1", "c_1", "d_1"}, {"a_2", "b_2", "c_2", "d_2"}, {"a_3", "b_3", "c_3", "d_3"}, - }, nil) + }, nil, nil) } func TestNaturalJoinEqual(t *testing.T, harness Harness) { require := require.New(t) db := harness.NewDatabase("mydb") + ctx := NewContext(harness) + wrapInTransaction(t, db, harness, func() { t1, err := harness.NewTable(db, "t1", sql.NewPrimaryKeySchema(sql.Schema{ {Name: "a", Type: sql.Text, Source: "t1", PrimaryKey: true}, @@ -4866,17 +4114,19 @@ func TestNaturalJoinEqual(t *testing.T, harness Harness) { e := sqle.NewDefault(harness.NewDatabaseProvider(db)) - TestQuery(t, harness, e, `SELECT * FROM t1 NATURAL JOIN t2`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 NATURAL JOIN t2`, []sql.Row{ {"a_1", "b_1", "c_1"}, {"a_2", "b_2", "c_2"}, {"a_3", "b_3", "c_3"}, - }, nil) + }, nil, nil) } func TestNaturalJoinDisjoint(t *testing.T, harness Harness) { require := require.New(t) db := harness.NewDatabase("mydb") + ctx := NewContext(harness) + wrapInTransaction(t, db, harness, func() { t1, err := harness.NewTable(db, "t1", sql.NewPrimaryKeySchema(sql.Schema{ {Name: "a", Type: sql.Text, Source: "t1", PrimaryKey: true}, @@ -4900,7 +4150,7 @@ func TestNaturalJoinDisjoint(t *testing.T, harness Harness) { e := sqle.NewDefault(harness.NewDatabaseProvider(db)) - TestQuery(t, harness, e, `SELECT * FROM t1 NATURAL JOIN t2`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 NATURAL JOIN t2`, []sql.Row{ {"a1", "b1"}, {"a1", "b2"}, {"a1", "b3"}, @@ -4910,13 +4160,15 @@ func TestNaturalJoinDisjoint(t *testing.T, harness Harness) { {"a3", "b1"}, {"a3", "b2"}, {"a3", "b3"}, - }, nil) + }, nil, nil) } func TestInnerNestedInNaturalJoins(t *testing.T, harness Harness) { require := require.New(t) db := harness.NewDatabase("mydb") + ctx := NewContext(harness) + wrapInTransaction(t, db, harness, func() { table1, err := harness.NewTable(db, "table1", sql.NewPrimaryKeySchema(sql.Schema{ {Name: "i", Type: sql.Int32, Source: "table1"}, @@ -4960,22 +4212,22 @@ func TestInnerNestedInNaturalJoins(t *testing.T, harness Harness) { e := sqle.NewDefault(harness.NewDatabaseProvider(db)) - TestQuery(t, harness, e, `SELECT * FROM table1 INNER JOIN table2 ON table1.i = table2.i2 NATURAL JOIN table3`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM table1 INNER JOIN table2 ON table1.i = table2.i2 NATURAL JOIN table3`, []sql.Row{ {int32(1), float64(2.2), float64(2.1), "table1", int32(1), "table2", "table3"}, {int32(1), float64(2.2), float64(2.1), "table1", int32(1), "table2", "table3"}, {int32(1), float64(2.2), float64(2.1), "table1", int32(1), "table2", "table3"}, {int32(1), float64(2.2), float64(2.1), "table1", int32(1), "table2", "table3"}, - }, nil) + }, nil, nil) } func TestVariables(t *testing.T, harness Harness) { - for _, query := range VariableQueries { + for _, query := range queries.VariableQueries { TestScript(t, harness, query) } // Test session pulling from global engine := sqle.NewDefault(harness.NewDatabaseProvider()) ctx1 := sql.NewEmptyContext() - for _, assertion := range []ScriptTestAssertion{ + for _, assertion := range []queries.ScriptTestAssertion{ { Query: "SELECT @@select_into_buffer_size", Expected: []sql.Row{{131072}}, @@ -5008,7 +4260,7 @@ func TestVariables(t *testing.T, harness Harness) { TestQueryWithContext(t, ctx1, engine, assertion.Query, assertion.Expected, nil, nil) } ctx2 := sql.NewEmptyContext() - for _, assertion := range []ScriptTestAssertion{ + for _, assertion := range []queries.ScriptTestAssertion{ { Query: "SELECT @@select_into_buffer_size", Expected: []sql.Row{{9002}}, @@ -5023,23 +4275,18 @@ func TestVariables(t *testing.T, harness Harness) { } func TestPreparedInsert(t *testing.T, harness Harness) { - myDb := harness.NewDatabase("mydb") - databases := []sql.Database{myDb} - e := NewEngineWithDbs(t, harness, databases) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() - tests := []struct { - Name string - SetUpScript []string - Assertions []QueryTest - }{ + tests := []queries.ScriptTest{ { Name: "simple insert", SetUpScript: []string{ "create table test (pk int primary key, value int)", "insert into test values (0,0)", }, - Assertions: []QueryTest{ + Assertions: []queries.ScriptTestAssertion{ { Query: "insert into test values (?, ?)", Bindings: map[string]sql.Expression{ @@ -5068,7 +4315,7 @@ func TestPreparedInsert(t *testing.T, harness Harness) { "INSERT INTO users values ('milo'), ('dabe')", "INSERT INTO nodes values ('id1', 'milo', 'off', 1)", }, - Assertions: []QueryTest{ + Assertions: []queries.ScriptTestAssertion{ { Query: "insert into nodes(id,owner,status,timestamp) values(?, ?, ?, ?) on duplicate key update owner=?,status=?", Bindings: map[string]sql.Expression{ @@ -5108,34 +4355,44 @@ func TestPreparedInsert(t *testing.T, harness Harness) { }, } for _, tt := range tests { - ctx := NewContextWithEngine(harness, e) - for _, statement := range tt.SetUpScript { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(statement) { - t.Skip() - } - } + TestScript(t, harness, tt) + } +} - RunQuery(t, e, harness, statement) - } +// Runs tests on SHOW TABLE STATUS queries. +func TestShowTableStatus(t *testing.T, harness Harness) { + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.OthertableData) + for _, tt := range queries.ShowTableStatusQueries { + TestQuery(t, harness, tt.Query, tt.Expected, nil, nil) + } +} - for _, a := range tt.Assertions { - e.PrepareQuery(ctx, a.Query) - TestQueryWithContext(t, ctx, e, a.Query, a.Expected, nil, a.Bindings) - } +func TestDateParse(t *testing.T, harness Harness) { + harness.Setup() + for _, tt := range queries.DateParseQueries { + TestQuery(t, harness, tt.Query, tt.Expected, nil, nil) + } +} + +// Runs tests on SHOW TABLE STATUS queries. +func TestShowTableStatusPrepared(t *testing.T, harness Harness) { + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.OthertableData) + for _, tt := range queries.ShowTableStatusQueries { + TestPreparedQuery(t, harness, tt.Query, tt.Expected, nil) } } func TestVariableErrors(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup() + e := mustNewEngine(t, harness) defer e.Close() - for _, test := range VariableErrorTests { + for _, test := range queries.VariableErrorTests { AssertErr(t, e, harness, test.Query, test.ExpectedErr) } } func TestWarnings(t *testing.T, harness Harness) { - var queries = []QueryTest{ + var queries = []queries.QueryTest{ { Query: ` SHOW WARNINGS @@ -5195,10 +4452,11 @@ func TestWarnings(t *testing.T, harness Harness) { }, } - e := NewEngine(t, harness) + harness.Setup() + e := mustNewEngine(t, harness) defer e.Close() - ctx := NewContext(harness) + ctx.Session.Warn(&sql.Warning{Code: 1}) ctx.Session.Warn(&sql.Warning{Code: 2}) ctx.Session.Warn(&sql.Warning{Code: 3}) @@ -5210,7 +4468,8 @@ func TestWarnings(t *testing.T, harness Harness) { func TestClearWarnings(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.Mytable...) + e := mustNewEngine(t, harness) defer e.Close() ctx := NewContext(harness) @@ -5257,9 +4516,9 @@ func TestClearWarnings(t *testing.T, harness Harness) { func TestUse(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData, setup2.FooData) + e := mustNewEngine(t, harness) defer e.Close() - ctx := NewContext(harness) require.Equal("mydb", ctx.GetCurrentDatabase()) @@ -5282,7 +4541,8 @@ func TestUse(t *testing.T, harness Harness) { // cancellation. func TestConcurrentTransactions(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() RunQuery(t, e, harness, `CREATE TABLE a (x int primary key, y int)`) @@ -5315,9 +4575,9 @@ func TestConcurrentTransactions(t *testing.T, harness Harness) { } func TestNoDatabaseSelected(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() - ctx := NewContext(harness) ctx.SetCurrentDatabase("") @@ -5330,7 +4590,7 @@ func TestNoDatabaseSelected(t *testing.T, harness Harness) { } func TestSessionSelectLimit(t *testing.T, harness Harness) { - q := []QueryTest{ + q := []queries.QueryTest{ { Query: "SELECT * FROM mytable ORDER BY i", Expected: []sql.Row{{int64(1), "first row"}}, @@ -5353,10 +4613,11 @@ func TestSessionSelectLimit(t *testing.T, harness Harness) { // }, } - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() - ctx := NewContext(harness) + err := ctx.Session.SetSessionVariable(ctx, "sql_select_limit", int64(1)) require.NoError(t, err) @@ -5367,12 +4628,13 @@ func TestSessionSelectLimit(t *testing.T, harness Harness) { func TestTracing(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) tracer := new(test.MemTracer) - ctx := NewContext(harness).WithCurrentDB("mydb") sql.WithTracer(tracer)(ctx) sch, iter, err := e.Query(ctx, `SELECT DISTINCT i @@ -5392,8 +4654,7 @@ func TestTracing(t *testing.T, harness Harness) { "plan.TopN", "plan.Distinct", "plan.Project", - "plan.Filter", - "plan.ResolvedTable", + "plan.IndexedTableAccess", } var spanOperations []string @@ -5411,7 +4672,8 @@ func TestTracing(t *testing.T, harness Harness) { } func TestCurrentTimestamp(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) defer e.Close() date := time.Date( @@ -5425,73 +4687,64 @@ func TestCurrentTimestamp(t *testing.T, harness Harness) { time.UTC, // location (UTC) ) - testCases := []struct { - Name string - Query string - Expected []sql.Row - err bool - }{ - {"null date", `SELECT CURRENT_TIMESTAMP(NULL)`, nil, true}, - {"precision of -1", `SELECT CURRENT_TIMESTAMP(-1)`, nil, true}, - {"precision of 0", `SELECT CURRENT_TIMESTAMP(0)`, []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 0, time.UTC)}}, false}, - {"precision of 1", `SELECT CURRENT_TIMESTAMP(1)`, []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 900000000, time.UTC)}}, false}, - {"precision of 2", `SELECT CURRENT_TIMESTAMP(2)`, []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 980000000, time.UTC)}}, false}, - {"precision of 3", `SELECT CURRENT_TIMESTAMP(3)`, []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987000000, time.UTC)}}, false}, - {"precision of 4", `SELECT CURRENT_TIMESTAMP(4)`, []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987600000, time.UTC)}}, false}, - {"precision of 5", `SELECT CURRENT_TIMESTAMP(5)`, []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987650000, time.UTC)}}, false}, - {"precision of 6", `SELECT CURRENT_TIMESTAMP(6)`, []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987654000, time.UTC)}}, false}, - {"precision of 7", `SELECT CURRENT_TIMESTAMP(NULL)`, nil, true}, - {"incorrect type", `SELECT CURRENT_TIMESTAMP("notanint")`, nil, true}, + testCases := []queries.QueryTest{ + { + Query: `SELECT CURRENT_TIMESTAMP(0)`, + Expected: []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 0, time.UTC)}}, + }, + { + Query: `SELECT CURRENT_TIMESTAMP(1)`, + Expected: []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 900000000, time.UTC)}}, + }, + { + Query: `SELECT CURRENT_TIMESTAMP(2)`, + Expected: []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 980000000, time.UTC)}}, + }, + { + Query: `SELECT CURRENT_TIMESTAMP(3)`, + Expected: []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987000000, time.UTC)}}, + }, + { + Query: `SELECT CURRENT_TIMESTAMP(4)`, + Expected: []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987600000, time.UTC)}}, + }, + { + Query: `SELECT CURRENT_TIMESTAMP(5)`, + Expected: []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987650000, time.UTC)}}, + }, + { + Query: `SELECT CURRENT_TIMESTAMP(6)`, + Expected: []sql.Row{{time.Date(2000, time.December, 12, 10, 15, 45, 987654000, time.UTC)}}, + }, } - for _, tt := range testCases { - t.Run(tt.Name, func(t *testing.T) { - sql.RunWithNowFunc(func() time.Time { - return date - }, func() error { - ctx := NewContext(harness) - //TestQueryWithContext(t, ctx, e, tt.Query, tt.Expected, nil, nil) - if tt.err { - require := require.New(t) - sch, iter, err := e.Query(ctx, tt.Query) - _, err = sql.RowIterToRows(ctx, sch, iter) - require.Error(err) - } else { - TestQueryWithContext(t, ctx, e, tt.Query, tt.Expected, nil, nil) - } - - return nil - }) - }) + errorTests := []queries.GenericErrorQueryTest{ + { + Query: "SELECT CURRENT_TIMESTAMP(-1)", + }, + { + Query: `SELECT CURRENT_TIMESTAMP(NULL)`, + }, + { + Query: "SELECT CURRENT_TIMESTAMP('notanint')", + }, } -} - -// Runs tests on SHOW TABLE STATUS queries. -func TestShowTableStatus(t *testing.T, harness Harness) { - dbs := CreateSubsetTestData(t, harness, infoSchemaTables) - engine := NewEngineWithDbs(t, harness, dbs) - defer engine.Close() - - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - - for _, tt := range ShowTableStatusQueries { - TestQuery(t, harness, engine, tt.Query, tt.Expected, nil) + for _, tt := range testCases { + sql.RunWithNowFunc(func() time.Time { + return date + }, func() error { + TestQuery(t, harness, tt.Query, tt.Expected, tt.ExpectedColumns, tt.Bindings) + return nil + }) } -} - -// Runs tests on SHOW TABLE STATUS queries. -func TestShowTableStatusPrepared(t *testing.T, harness Harness) { - dbs := CreateSubsetTestData(t, harness, infoSchemaTables) - engine := NewEngineWithDbs(t, harness, dbs) - defer engine.Close() - - CreateIndexes(t, harness, engine) - createForeignKeys(t, harness, engine) - - for _, tt := range ShowTableStatusQueries { - TestPreparedQuery(t, harness, engine, tt.Query, tt.Expected, nil) + for _, tt := range errorTests { + sql.RunWithNowFunc(func() time.Time { + return date + }, func() error { + runGenericErrorTest(t, harness, tt) + return nil + }) } } @@ -5500,6 +4753,7 @@ func TestAddDropPks(t *testing.T, harness Harness) { db := harness.NewDatabase("mydb") e := sqle.NewDefault(harness.NewDatabaseProvider(db)) + ctx := NewContext(harness) wrapInTransaction(t, db, harness, func() { t1, err := harness.NewTable(db, "t1", sql.NewPrimaryKeySchema(sql.Schema{ @@ -5513,50 +4767,50 @@ func TestAddDropPks(t *testing.T, harness Harness) { sql.NewRow("a2", "a3"), sql.NewRow("a3", "a4")) - TestQuery(t, harness, e, `SELECT * FROM t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1`, []sql.Row{ {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, - }, nil) + }, nil, nil) RunQuery(t, e, harness, `ALTER TABLE t1 DROP PRIMARY KEY`) // Assert the table is still queryable - TestQuery(t, harness, e, `SELECT * FROM t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1`, []sql.Row{ {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, - }, nil) + }, nil, nil) // Assert that the table is insertable - TestQuery(t, harness, e, `INSERT INTO t1 VALUES ("a1", "a2")`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `INSERT INTO t1 VALUES ("a1", "a2")`, []sql.Row{ sql.Row{sql.OkResult{RowsAffected: 1}}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ {"a1", "a2"}, {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `DELETE FROM t1 WHERE pk = "a1" LIMIT 1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `DELETE FROM t1 WHERE pk = "a1" LIMIT 1`, []sql.Row{ sql.Row{sql.OkResult{RowsAffected: 1}}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, - }, nil) + }, nil, nil) // Add back a new primary key and assert the table is queryable RunQuery(t, e, harness, `ALTER TABLE t1 ADD PRIMARY KEY (pk, v)`) - TestQuery(t, harness, e, `SELECT * FROM t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1`, []sql.Row{ {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, - }, nil) + }, nil, nil) // Drop the original Pk, create an index, create a new primary key RunQuery(t, e, harness, `ALTER TABLE t1 DROP PRIMARY KEY`) @@ -5564,46 +4818,39 @@ func TestAddDropPks(t *testing.T, harness Harness) { RunQuery(t, e, harness, `ALTER TABLE t1 ADD PRIMARY KEY (pk)`) // Assert the table is insertable - TestQuery(t, harness, e, `INSERT INTO t1 VALUES ("a4", "a3")`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `INSERT INTO t1 VALUES ("a4", "a3")`, []sql.Row{ sql.Row{sql.OkResult{RowsAffected: 1}}, - }, nil) + }, nil, nil) // Assert that an indexed based query still functions appropriately - TestQuery(t, harness, e, `SELECT * FROM t1 WHERE v='a3'`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 WHERE v='a3'`, []sql.Row{ {"a2", "a3"}, {"a4", "a3"}, - }, nil) - - // Assert that query plan this follows correctly uses an IndexedTableAccess - expectedPlan := "Projected table access on [pk v]\n" + - " └─ IndexedTableAccess(t1 on [t1.v] with ranges: [{[a3, a3]}])\n" + - "" - - TestQueryPlan(t, NewContextWithEngine(harness, e), e, harness, `SELECT * FROM t1 WHERE v = 'a3'`, expectedPlan) + }, nil, nil) RunQuery(t, e, harness, `ALTER TABLE t1 DROP PRIMARY KEY`) // Assert that the table is insertable - TestQuery(t, harness, e, `INSERT INTO t1 VALUES ("a1", "a2")`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `INSERT INTO t1 VALUES ("a1", "a2")`, []sql.Row{ sql.Row{sql.OkResult{RowsAffected: 1}}, - }, nil) + }, nil, nil) - TestQuery(t, harness, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ {"a1", "a2"}, {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, {"a4", "a3"}, - }, nil) + }, nil, nil) // Assert that a duplicate row causes an alter table error AssertErr(t, e, harness, `ALTER TABLE t1 ADD PRIMARY KEY (pk, v)`, sql.ErrPrimaryKeyViolation) // Assert that the schema of t1 is unchanged - TestQuery(t, harness, e, `DESCRIBE t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `DESCRIBE t1`, []sql.Row{ {"pk", "text", "NO", "", "", ""}, {"v", "text", "NO", "MUL", "", ""}, - }, nil) + }, nil, nil) // Assert that adding a primary key with an unknown column causes an error AssertErr(t, e, harness, `ALTER TABLE t1 ADD PRIMARY KEY (v2)`, sql.ErrKeyColumnDoesNotExist) @@ -5616,31 +4863,31 @@ func TestAddDropPks(t *testing.T, harness Harness) { // Execute a MultiDDL Alter Statement RunQuery(t, e, harness, `ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY (v)`) - TestQuery(t, harness, e, `DESCRIBE t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `DESCRIBE t1`, []sql.Row{ {"pk", "text", "NO", "", "", ""}, {"v", "text", "NO", "PRI", "", ""}, - }, nil) + }, nil, nil) AssertErr(t, e, harness, `INSERT INTO t1 (pk, v) values ("a100", "a3")`, sql.ErrPrimaryKeyViolation) - TestQuery(t, harness, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, - }, nil) + }, nil, nil) RunQuery(t, e, harness, `ALTER TABLE t1 DROP PRIMARY KEY`) // Technically the query beneath errors in MySQL but I'm pretty sure it's a bug cc: // https://stackoverflow.com/questions/8301744/mysql-reports-a-primary-key-but-can-not-drop-it-from-the-table RunQuery(t, e, harness, `ALTER TABLE t1 ADD PRIMARY KEY (pk, v), DROP PRIMARY KEY`) - TestQuery(t, harness, e, `DESCRIBE t1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `DESCRIBE t1`, []sql.Row{ {"pk", "text", "NO", "", "", ""}, {"v", "text", "NO", "", "", ""}, - }, nil) - TestQuery(t, harness, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ + }, nil, nil) + TestQueryWithContext(t, ctx, e, `SELECT * FROM t1 ORDER BY pk`, []sql.Row{ {"a1", "a2"}, {"a2", "a3"}, {"a3", "a4"}, - }, nil) + }, nil, nil) }) t.Run("No database selected", func(t *testing.T) { @@ -5650,133 +4897,24 @@ func TestAddDropPks(t *testing.T, harness Harness) { RunQuery(t, e, harness, `ALTER TABLE newdb.tab1 ADD PRIMARY KEY (pk)`) // Assert that the pk is not primary key - TestQuery(t, harness, e, `SHOW CREATE TABLE newdb.tab1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SHOW CREATE TABLE newdb.tab1`, []sql.Row{ {"tab1", "CREATE TABLE `tab1` (\n `pk` int NOT NULL,\n `c1` int,\n PRIMARY KEY (`pk`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}, - }, nil) + }, nil, nil) // Drop all primary key from other database table RunQuery(t, e, harness, `ALTER TABLE newdb.tab1 DROP PRIMARY KEY`) // Assert that NOT NULL constraint is kept - TestQuery(t, harness, e, `SHOW CREATE TABLE newdb.tab1`, []sql.Row{ + TestQueryWithContext(t, ctx, e, `SHOW CREATE TABLE newdb.tab1`, []sql.Row{ {"tab1", "CREATE TABLE `tab1` (\n `pk` int NOT NULL,\n `c1` int\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}, - }, nil) + }, nil, nil) }) } func TestNullRanges(t *testing.T, harness Harness) { - tests := []struct { - query string - exp []sql.Row - }{ - { - query: "select * from a where y IS NULL or y < 1", - exp: []sql.Row{ - {0, 0}, - {3, nil}, - {4, nil}, - }, - }, - { - query: "select * from a where y IS NULL and y < 1", - exp: []sql.Row{}, - }, - { - query: "select * from a where y IS NULL or y IS NOT NULL", - exp: []sql.Row{ - {0, 0}, - {1, 1}, - {2, 2}, - {3, nil}, - {4, nil}, - }, - }, - { - query: "select * from a where y IS NOT NULL", - exp: []sql.Row{ - {0, 0}, - {1, 1}, - {2, 2}, - }, - }, - { - query: "select * from a where y IS NULL or y = 0 or y = 1", - exp: []sql.Row{ - {0, 0}, - {1, 1}, - {3, nil}, - {4, nil}, - }, - }, - { - query: "select * from a where y IS NULL or y < 1 or y > 1", - exp: []sql.Row{ - {0, 0}, - {2, 2}, - {3, nil}, - {4, nil}, - }, - }, - { - query: "select * from a where y IS NOT NULL and x > 1", - exp: []sql.Row{ - {2, 2}, - }, - }, { - query: "select * from a where y IS NULL and x = 4", - exp: []sql.Row{ - {4, nil}, - }, - }, { - query: "select * from a where y IS NULL and x > 1", - exp: []sql.Row{ - {3, nil}, - {4, nil}, - }, - }, - { - query: "select * from a where y IS NULL and y IS NOT NULL", - exp: []sql.Row{}, - }, - { - query: "select * from a where y is NULL and y > -1 and y > -2", - exp: []sql.Row{}, - }, - { - query: "select * from a where y > -1 and y < 7 and y IS NULL", - exp: []sql.Row{}, - }, - { - query: "select * from a where y > -1 and y > -2 and y IS NOT NULL", - exp: []sql.Row{ - {0, 0}, - {1, 1}, - {2, 2}, - }, - }, - { - query: "select * from a where y > -1 and y > 1 and y IS NOT NULL", - exp: []sql.Row{ - {2, 2}, - }, - }, - { - query: "select * from a where y < 6 and y > -1 and y IS NOT NULL", - exp: []sql.Row{ - {0, 0}, - {1, 1}, - {2, 2}, - }, - }, - } - - db := harness.NewDatabase("mydb") - e := sqle.NewDefault(harness.NewDatabaseProvider(db)) - RunQuery(t, e, harness, `CREATE TABLE a (x int primary key, y int)`) - RunQuery(t, e, harness, `CREATE INDEX idx1 ON a (y);`) - RunQuery(t, e, harness, `INSERT INTO a VALUES (0,0), (1,1), (2,2), (3,null), (4,null)`) - for _, tt := range tests { - TestQuery(t, harness, e, tt.query, tt.exp, nil) + harness.Setup(setup2.NullsSetup...) + for _, tt := range queries.NullRangeTests { + TestQuery(t, harness, tt.Query, tt.Expected, nil, nil) } } @@ -5904,17 +5042,10 @@ func (c customFunc) WithChildren(children ...sql.Expression) (sql.Expression, er return &customFunc{expression.UnaryExpression{children[0]}}, nil } -func TestDateParse(t *testing.T, harness Harness) { - engine := NewEngine(t, harness) - defer engine.Close() - - for _, tt := range DateParseQueries { - TestQuery(t, harness, engine, tt.Query, tt.Expected, nil) - } -} - func TestAlterTable(t *testing.T, harness Harness) { - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData) + e := mustNewEngine(t, harness) + defer e.Close() t.Run("Modify column invalid after", func(t *testing.T) { RunQuery(t, e, harness, "CREATE TABLE t1008(pk BIGINT DEFAULT (v2) PRIMARY KEY, v1 BIGINT DEFAULT (pk), v2 BIGINT)") @@ -6020,30 +5151,33 @@ func TestAlterTable(t *testing.T, harness Harness) { AssertErr(t, e, harness, "ALTER TABLE t34 DROP COLUMN j", sql.ErrCheckConstraintInvalidatedByColumnAlter) RunQuery(t, e, harness, "ALTER TABLE t34 DROP COLUMN k") - TestQuery(t, harness, e, "show create table t34", - []sql.Row{{"t34", "CREATE TABLE `t34` (\n" + + tt := queries.QueryTest{ + Query: "show create table t34", + Expected: []sql.Row{{"t34", "CREATE TABLE `t34` (\n" + " `i` bigint NOT NULL,\n" + " `s` varchar(20),\n" + " `j` int,\n" + " PRIMARY KEY (`i`),\n" + " CONSTRAINT `test_check` CHECK ((`j` < 12345))\n" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, - nil) + } + TestQueryWithEngine(t, harness, e, tt) }) t.Run("drop column preserves indexes", func(t *testing.T) { + ctx := NewContext(harness) RunQuery(t, e, harness, "create table t35 (i bigint primary key, s varchar(20), s2 varchar(20))") RunQuery(t, e, harness, "ALTER TABLE t35 ADD unique key test_key (s)") RunQuery(t, e, harness, "ALTER TABLE t35 DROP COLUMN s2") - TestQuery(t, harness, e, "show create table t35", + TestQueryWithContext(t, ctx, e, "show create table t35", []sql.Row{{"t35", "CREATE TABLE `t35` (\n" + " `i` bigint NOT NULL,\n" + " `s` varchar(20),\n" + " PRIMARY KEY (`i`),\n" + " UNIQUE KEY `test_key` (`s`)\n" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, - nil) + nil, nil) }) t.Run("drop column prevents foreign key violations", func(t *testing.T) { @@ -6077,8 +5211,10 @@ func NewColumnDefaultValue(expr sql.Expression, outType sql.Type, representsLite func TestColumnDefaults(t *testing.T, harness Harness) { require := require.New(t) - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() + ctx := NewContext(harness) e.Analyzer.Catalog.RegisterFunction(NewContext(harness), sql.Function1{ Name: "customfunc", @@ -6088,62 +5224,62 @@ func TestColumnDefaults(t *testing.T, harness Harness) { }) t.Run("Standard default literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT 2)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT 2)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t1 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "SELECT * FROM t1", []sql.Row{{1, 2}, {2, 2}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t1", []sql.Row{{1, 2}, {2, 2}}, nil, nil) }) t.Run("Default expression with function and referenced column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t2(pk BIGINT PRIMARY KEY, v1 SMALLINT DEFAULT (GREATEST(pk, 2)))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t2(pk BIGINT PRIMARY KEY, v1 SMALLINT DEFAULT (GREATEST(pk, 2)))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t2 (pk) VALUES (1), (2), (3)") - TestQuery(t, harness, e, "SELECT * FROM t2", []sql.Row{{1, 2}, {2, 2}, {3, 3}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t2", []sql.Row{{1, 2}, {2, 2}, {3, 3}}, nil, nil) }) t.Run("Default expression converting to proper column type", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t3(pk BIGINT PRIMARY KEY, v1 VARCHAR(20) DEFAULT (GREATEST(pk, 2)))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t3(pk BIGINT PRIMARY KEY, v1 VARCHAR(20) DEFAULT (GREATEST(pk, 2)))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t3 (pk) VALUES (1), (2), (3)") - TestQuery(t, harness, e, "SELECT * FROM t3", []sql.Row{{1, "2"}, {2, "2"}, {3, "3"}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t3", []sql.Row{{1, "2"}, {2, "2"}, {3, "3"}}, nil, nil) }) t.Run("Default literal of different type but implicitly converts", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t4(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t4(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t4 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "SELECT * FROM t4", []sql.Row{{1, 4}, {2, 4}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t4", []sql.Row{{1, 4}, {2, 4}}, nil, nil) }) t.Run("Back reference to default literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t5(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (v2), v2 BIGINT DEFAULT 7)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t5(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (v2), v2 BIGINT DEFAULT 7)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t5 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "SELECT * FROM t5", []sql.Row{{1, 7, 7}, {2, 7, 7}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t5", []sql.Row{{1, 7, 7}, {2, 7, 7}}, nil, nil) }) t.Run("Forward reference to default literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t6(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT 9, v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t6(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT 9, v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t6 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "SELECT * FROM t6", []sql.Row{{1, 9, 9}, {2, 9, 9}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t6", []sql.Row{{1, 9, 9}, {2, 9, 9}}, nil, nil) }) t.Run("Forward reference to default expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t7(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (8), v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t7(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (8), v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t7 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "SELECT * FROM t7", []sql.Row{{1, 8, 8}, {2, 8, 8}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t7", []sql.Row{{1, 8, 8}, {2, 8, 8}}, nil, nil) }) t.Run("Back reference to value", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t8(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (v2 + 1), v2 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t8(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (v2 + 1), v2 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t8 (pk, v2) VALUES (1, 4), (2, 6)") - TestQuery(t, harness, e, "SELECT * FROM t8", []sql.Row{{1, 5, 4}, {2, 7, 6}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t8", []sql.Row{{1, 5, 4}, {2, 7, 6}}, nil, nil) }) t.Run("TEXT expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t9(pk BIGINT PRIMARY KEY, v1 LONGTEXT DEFAULT (77))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t9(pk BIGINT PRIMARY KEY, v1 LONGTEXT DEFAULT (77))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t9 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "SELECT * FROM t9", []sql.Row{{1, "77"}, {2, "77"}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t9", []sql.Row{{1, "77"}, {2, "77"}}, nil, nil) }) t.Run("DATETIME/TIMESTAMP NOW/CURRENT_TIMESTAMP current_timestamp", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t10(pk BIGINT PRIMARY KEY, v1 DATETIME DEFAULT NOW(), v2 DATETIME DEFAULT CURRENT_TIMESTAMP(),"+ - "v3 TIMESTAMP DEFAULT NOW(), v4 TIMESTAMP DEFAULT CURRENT_TIMESTAMP())", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t10(pk BIGINT PRIMARY KEY, v1 DATETIME DEFAULT NOW(), v2 DATETIME DEFAULT CURRENT_TIMESTAMP(),"+ + "v3 TIMESTAMP DEFAULT NOW(), v4 TIMESTAMP DEFAULT CURRENT_TIMESTAMP())", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) now := time.Now() sql.RunWithNowFunc(func() time.Time { @@ -6152,23 +5288,23 @@ func TestColumnDefaults(t *testing.T, harness Harness) { RunQuery(t, e, harness, "insert into t10(pk) values (1)") return nil }) - TestQuery(t, harness, e, "select * from t10 order by 1", []sql.Row{{1, now.UTC(), now.UTC().Truncate(time.Second), now.UTC(), now.UTC().Truncate(time.Second)}}, nil) + TestQueryWithContext(t, ctx, e, "select * from t10 order by 1", []sql.Row{{1, now.UTC(), now.UTC().Truncate(time.Second), now.UTC(), now.UTC().Truncate(time.Second)}}, nil, nil) }) // TODO: zero timestamps work slightly differently than they do in MySQL, where the zero time is "0000-00-00 00:00:00" // We use "0000-01-01 00:00:00" t.Run("DATETIME/TIMESTAMP NOW/CURRENT_TIMESTAMP literals", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t10zero(pk BIGINT PRIMARY KEY, v1 DATETIME DEFAULT '2020-01-01 01:02:03', v2 DATETIME DEFAULT 0,"+ - "v3 TIMESTAMP DEFAULT '2020-01-01 01:02:03', v4 TIMESTAMP DEFAULT 0)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t10zero(pk BIGINT PRIMARY KEY, v1 DATETIME DEFAULT '2020-01-01 01:02:03', v2 DATETIME DEFAULT 0,"+ + "v3 TIMESTAMP DEFAULT '2020-01-01 01:02:03', v4 TIMESTAMP DEFAULT 0)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "insert into t10zero(pk) values (1)") // TODO: the string conversion does not transform to UTC like other NOW() calls, fix this - TestQuery(t, harness, e, "select * from t10zero order by 1", []sql.Row{{1, time.Date(2020, 1, 1, 1, 2, 3, 0, time.UTC), sql.Datetime.Zero(), time.Date(2020, 1, 1, 1, 2, 3, 0, time.UTC), sql.Timestamp.Zero()}}, nil) + TestQueryWithContext(t, ctx, e, "select * from t10zero order by 1", []sql.Row{{1, time.Date(2020, 1, 1, 1, 2, 3, 0, time.UTC), sql.Datetime.Zero(), time.Date(2020, 1, 1, 1, 2, 3, 0, time.UTC), sql.Timestamp.Zero()}}, nil, nil) }) t.Run("Non-DATETIME/TIMESTAMP NOW/CURRENT_TIMESTAMP expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t11(pk BIGINT PRIMARY KEY, v1 DATE DEFAULT (NOW()), v2 VARCHAR(20) DEFAULT (CURRENT_TIMESTAMP()))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t11(pk BIGINT PRIMARY KEY, v1 DATE DEFAULT (NOW()), v2 VARCHAR(20) DEFAULT (CURRENT_TIMESTAMP()))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) now := time.Now() sql.RunWithNowFunc(func() time.Time { @@ -6179,127 +5315,127 @@ func TestColumnDefaults(t *testing.T, harness Harness) { }) // TODO: the string conversion does not transform to UTC like other NOW() calls, fix this - TestQuery(t, harness, e, "select * from t11 order by 1", []sql.Row{{1, now.UTC().Truncate(time.Hour * 24), now.Truncate(time.Second).Format(sql.TimestampDatetimeLayout)}}, nil) + TestQueryWithContext(t, ctx, e, "select * from t11 order by 1", []sql.Row{{1, now.UTC().Truncate(time.Hour * 24), now.Truncate(time.Second).Format(sql.TimestampDatetimeLayout)}}, nil, nil) }) t.Run("REPLACE INTO with default expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t12(pk BIGINT PRIMARY KEY, v1 SMALLINT DEFAULT (GREATEST(pk, 2)))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t12(pk BIGINT PRIMARY KEY, v1 SMALLINT DEFAULT (GREATEST(pk, 2)))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t12 (pk) VALUES (1), (2)") RunQuery(t, e, harness, "REPLACE INTO t12 (pk) VALUES (2), (3)") - TestQuery(t, harness, e, "SELECT * FROM t12", []sql.Row{{1, 2}, {2, 2}, {3, 3}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t12", []sql.Row{{1, 2}, {2, 2}, {3, 3}}, nil, nil) }) t.Run("Add column last default literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t13(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t13(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t13 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t13 ADD COLUMN v2 BIGINT DEFAULT 5", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t13", []sql.Row{{1, 4, 5}, {2, 4, 5}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t13 ADD COLUMN v2 BIGINT DEFAULT 5", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t13", []sql.Row{{1, 4, 5}, {2, 4, 5}}, nil, nil) }) t.Run("Add column implicit last default expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t14(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t14(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t14 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t14 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t14", []sql.Row{{1, 2, 4}, {2, 3, 5}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t14 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t14", []sql.Row{{1, 2, 4}, {2, 3, 5}}, nil, nil) }) t.Run("Add column explicit last default expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t15(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t15(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t15 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t15 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2) AFTER v1", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t15", []sql.Row{{1, 2, 4}, {2, 3, 5}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t15 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2) AFTER v1", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t15", []sql.Row{{1, 2, 4}, {2, 3, 5}}, nil, nil) }) t.Run("Add column first default literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t16(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t16(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t16 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t16 ADD COLUMN v2 BIGINT DEFAULT 5 FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t16", []sql.Row{{5, 1, 4}, {5, 2, 4}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t16 ADD COLUMN v2 BIGINT DEFAULT 5 FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t16", []sql.Row{{5, 1, 4}, {5, 2, 4}}, nil, nil) }) t.Run("Add column first default expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t17(pk BIGINT PRIMARY KEY, v1 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t17(pk BIGINT PRIMARY KEY, v1 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t17 VALUES (1, 3), (2, 4)") - TestQuery(t, harness, e, "ALTER TABLE t17 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t17", []sql.Row{{5, 1, 3}, {6, 2, 4}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t17 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t17", []sql.Row{{5, 1, 3}, {6, 2, 4}}, nil, nil) }) t.Run("Add column forward reference to default expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t18(pk BIGINT DEFAULT (v1) PRIMARY KEY, v1 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t18(pk BIGINT DEFAULT (v1) PRIMARY KEY, v1 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t18 (v1) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t18 ADD COLUMN v2 BIGINT DEFAULT (pk + 1) AFTER pk", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t18", []sql.Row{{1, 2, 1}, {2, 3, 2}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t18 ADD COLUMN v2 BIGINT DEFAULT (pk + 1) AFTER pk", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t18", []sql.Row{{1, 2, 1}, {2, 3, 2}}, nil, nil) }) t.Run("Add column back reference to default literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t19(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT 5)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t19(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT 5)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t19 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t19 ADD COLUMN v2 BIGINT DEFAULT (v1 - 1) AFTER pk", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t19", []sql.Row{{1, 4, 5}, {2, 4, 5}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t19 ADD COLUMN v2 BIGINT DEFAULT (v1 - 1) AFTER pk", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t19", []sql.Row{{1, 4, 5}, {2, 4, 5}}, nil, nil) }) t.Run("Add column first with existing defaults still functioning", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t20(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 10))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t20(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 10))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t20 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t20 ADD COLUMN v2 BIGINT DEFAULT (-pk) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t20 ADD COLUMN v2 BIGINT DEFAULT (-pk) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t20 (pk) VALUES (3)") - TestQuery(t, harness, e, "SELECT * FROM t20", []sql.Row{{-1, 1, 11}, {-2, 2, 12}, {-3, 3, 13}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t20", []sql.Row{{-1, 1, 11}, {-2, 2, 12}, {-3, 3, 13}}, nil, nil) }) t.Run("Drop column referencing other column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t21(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (v2), v2 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "ALTER TABLE t21 DROP COLUMN v1", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t21(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (v2), v2 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t21 DROP COLUMN v1", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) }) t.Run("Modify column move first forward reference default literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t22(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 2), v2 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t22(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 2), v2 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t22 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t22 MODIFY COLUMN v1 BIGINT DEFAULT (pk + 2) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t22", []sql.Row{{3, 1, 2}, {4, 2, 3}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t22 MODIFY COLUMN v1 BIGINT DEFAULT (pk + 2) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t22", []sql.Row{{3, 1, 2}, {4, 2, 3}}, nil, nil) }) t.Run("Modify column move first add reference", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t23(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1 + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t23(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1 + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t23 (pk, v1) VALUES (1, 2), (2, 3)") - TestQuery(t, harness, e, "ALTER TABLE t23 MODIFY COLUMN v1 BIGINT DEFAULT (pk + 5) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t23 MODIFY COLUMN v1 BIGINT DEFAULT (pk + 5) FIRST", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t23 (pk) VALUES (3)") - TestQuery(t, harness, e, "SELECT * FROM t23", []sql.Row{{2, 1, 3}, {3, 2, 4}, {8, 3, 9}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t23", []sql.Row{{2, 1, 3}, {3, 2, 4}, {8, 3, 9}}, nil, nil) }) t.Run("Modify column move last being referenced", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t24(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1 + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t24(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1 + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t24 (pk, v1) VALUES (1, 2), (2, 3)") - TestQuery(t, harness, e, "ALTER TABLE t24 MODIFY COLUMN v1 BIGINT AFTER v2", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t24 MODIFY COLUMN v1 BIGINT AFTER v2", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t24 (pk, v1) VALUES (3, 4)") - TestQuery(t, harness, e, "SELECT * FROM t24", []sql.Row{{1, 3, 2}, {2, 4, 3}, {3, 5, 4}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t24", []sql.Row{{1, 3, 2}, {2, 4, 3}, {3, 5, 4}}, nil, nil) }) t.Run("Modify column move last add reference", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t25(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (pk * 2))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t25(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (pk * 2))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t25 (pk, v1) VALUES (1, 2), (2, 3)") - TestQuery(t, harness, e, "ALTER TABLE t25 MODIFY COLUMN v1 BIGINT DEFAULT (-pk) AFTER v2", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t25 MODIFY COLUMN v1 BIGINT DEFAULT (-pk) AFTER v2", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t25 (pk) VALUES (3)") - TestQuery(t, harness, e, "SELECT * FROM t25", []sql.Row{{1, 2, 2}, {2, 4, 3}, {3, 6, -3}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t25", []sql.Row{{1, 2, 2}, {2, 4, 3}, {3, 6, -3}}, nil, nil) }) t.Run("Modify column no move add reference", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t26(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (pk * 2))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t26(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (pk * 2))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t26 (pk, v1) VALUES (1, 2), (2, 3)") - TestQuery(t, harness, e, "ALTER TABLE t26 MODIFY COLUMN v1 BIGINT DEFAULT (-pk)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t26 MODIFY COLUMN v1 BIGINT DEFAULT (-pk)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t26 (pk) VALUES (3)") - TestQuery(t, harness, e, "SELECT * FROM t26", []sql.Row{{1, 2, 2}, {2, 3, 4}, {3, -3, 6}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t26", []sql.Row{{1, 2, 2}, {2, 3, 4}, {3, -3, 6}}, nil, nil) }) t.Run("Negative float literal", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t27(pk BIGINT PRIMARY KEY, v1 DOUBLE DEFAULT -1.1)", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "DESCRIBE t27", []sql.Row{{"pk", "bigint", "NO", "PRI", "", ""}, {"v1", "double", "YES", "", "-1.1", ""}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t27(pk BIGINT PRIMARY KEY, v1 DOUBLE DEFAULT -1.1)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "DESCRIBE t27", []sql.Row{{"pk", "bigint", "NO", "PRI", "", ""}, {"v1", "double", "YES", "", "-1.1", ""}}, nil, nil) }) t.Run("Table referenced with column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t28(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (t28.pk))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t28(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (t28.pk))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t28 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "SELECT * FROM t28", []sql.Row{{1, 1}, {2, 2}}, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t28", []sql.Row{{1, 1}, {2, 2}}, nil, nil) ctx := NewContext(harness) t28, _, err := e.Analyzer.Catalog.Table(ctx, ctx.GetCurrentDatabase(), "t28") @@ -6311,7 +5447,7 @@ func TestColumnDefaults(t *testing.T, harness Harness) { }) t.Run("Column referenced with name change", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t29(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1 + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t29(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1 + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t29 (pk, v1) VALUES (1, 2)") RunQuery(t, e, harness, "ALTER TABLE t29 RENAME COLUMN v1 to v1x") @@ -6319,50 +5455,50 @@ func TestColumnDefaults(t *testing.T, harness Harness) { RunQuery(t, e, harness, "ALTER TABLE t29 CHANGE COLUMN v1x v1y BIGINT") RunQuery(t, e, harness, "INSERT INTO t29 (pk, v1y) VALUES (3, 4)") - TestQuery(t, harness, e, "SELECT * FROM t29 ORDER BY 1", []sql.Row{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, nil) - TestQuery(t, harness, e, "SHOW CREATE TABLE t29", []sql.Row{{"t29", "CREATE TABLE `t29` (\n" + + TestQueryWithContext(t, ctx, e, "SELECT * FROM t29 ORDER BY 1", []sql.Row{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SHOW CREATE TABLE t29", []sql.Row{{"t29", "CREATE TABLE `t29` (\n" + " `pk` bigint NOT NULL,\n" + " `v1y` bigint,\n" + " `v2` bigint DEFAULT ((v1y + 1)),\n" + " PRIMARY KEY (`pk`)\n" + - ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, nil) + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, nil, nil) }) t.Run("Add multiple columns same ALTER", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t30(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t30(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT '4')", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t30 (pk) VALUES (1), (2)") - TestQuery(t, harness, e, "ALTER TABLE t30 ADD COLUMN v2 BIGINT DEFAULT 5, ADD COLUMN V3 BIGINT DEFAULT 7", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT pk, v1, v2, V3 FROM t30", []sql.Row{{1, 4, 5, 7}, {2, 4, 5, 7}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t30 ADD COLUMN v2 BIGINT DEFAULT 5, ADD COLUMN V3 BIGINT DEFAULT 7", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT pk, v1, v2, V3 FROM t30", []sql.Row{{1, 4, 5, 7}, {2, 4, 5, 7}}, nil, nil) }) t.Run("Add non-nullable column without default #1", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t31 (pk BIGINT PRIMARY KEY)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t31 (pk BIGINT PRIMARY KEY)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t31 VALUES (1), (2), (3)") - TestQuery(t, harness, e, "ALTER TABLE t31 ADD COLUMN v1 BIGINT NOT NULL", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t31", []sql.Row{{1, 0}, {2, 0}, {3, 0}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t31 ADD COLUMN v1 BIGINT NOT NULL", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t31", []sql.Row{{1, 0}, {2, 0}, {3, 0}}, nil, nil) }) t.Run("Add non-nullable column without default #2", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t32 (pk BIGINT PRIMARY KEY)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t32 (pk BIGINT PRIMARY KEY)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) RunQuery(t, e, harness, "INSERT INTO t32 VALUES (1), (2), (3)") - TestQuery(t, harness, e, "ALTER TABLE t32 ADD COLUMN v1 VARCHAR(20) NOT NULL", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "SELECT * FROM t32", []sql.Row{{1, ""}, {2, ""}, {3, ""}}, nil) + TestQueryWithContext(t, ctx, e, "ALTER TABLE t32 ADD COLUMN v1 VARCHAR(20) NOT NULL", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "SELECT * FROM t32", []sql.Row{{1, ""}, {2, ""}, {3, ""}}, nil, nil) }) t.Run("Column defaults with functions", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t33(pk varchar(100) DEFAULT (replace(UUID(), '-', '')), v1 timestamp DEFAULT now(), v2 varchar(100), primary key (pk))", []sql.Row{{sql.NewOkResult(0)}}, nil) - TestQuery(t, harness, e, "insert into t33 (v2) values ('abc')", []sql.Row{{sql.NewOkResult(1)}}, nil) - TestQuery(t, harness, e, "select count(*) from t33", []sql.Row{{1}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t33(pk varchar(100) DEFAULT (replace(UUID(), '-', '')), v1 timestamp DEFAULT now(), v2 varchar(100), primary key (pk))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "insert into t33 (v2) values ('abc')", []sql.Row{{sql.NewOkResult(1)}}, nil, nil) + TestQueryWithContext(t, ctx, e, "select count(*) from t33", []sql.Row{{1}}, nil, nil) RunQuery(t, e, harness, "alter table t33 add column name varchar(100)") RunQuery(t, e, harness, "alter table t33 rename column v1 to v1_new") RunQuery(t, e, harness, "alter table t33 rename column name to name2") RunQuery(t, e, harness, "alter table t33 drop column name2") - TestQuery(t, harness, e, "desc t33", []sql.Row{ + TestQueryWithContext(t, ctx, e, "desc t33", []sql.Row{ {"pk", "varchar(100)", "NO", "PRI", "(replace(UUID(), \"-\", \"\"))", ""}, {"v1_new", "timestamp", "YES", "", "NOW()", ""}, {"v2", "varchar(100)", "YES", "", "", ""}, - }, nil) + }, nil, nil) }) t.Run("Invalid literal for column type", func(t *testing.T) { @@ -6407,42 +5543,42 @@ func TestColumnDefaults(t *testing.T, harness Harness) { }) t.Run("Expression contains invalid literal, fails on insertion", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1000(pk BIGINT PRIMARY KEY, v1 INT UNSIGNED DEFAULT (-1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1000(pk BIGINT PRIMARY KEY, v1 INT UNSIGNED DEFAULT (-1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "INSERT INTO t1000 (pk) VALUES (1)", nil) }) t.Run("Expression contains null on NOT NULL, fails on insertion", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1001(pk BIGINT PRIMARY KEY, v1 BIGINT NOT NULL DEFAULT (NULL))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1001(pk BIGINT PRIMARY KEY, v1 BIGINT NOT NULL DEFAULT (NULL))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "INSERT INTO t1001 (pk) VALUES (1)", sql.ErrColumnDefaultReturnedNull) }) t.Run("Add column first back reference to expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1002(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1002(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "ALTER TABLE t1002 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2) FIRST", sql.ErrInvalidDefaultValueOrder) }) t.Run("Add column after back reference to expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1003(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1003(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "ALTER TABLE t1003 ADD COLUMN v2 BIGINT DEFAULT (v1 + 2) AFTER pk", sql.ErrInvalidDefaultValueOrder) }) t.Run("Add column self reference", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1004(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1004(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk + 1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "ALTER TABLE t1004 ADD COLUMN v2 BIGINT DEFAULT (v2)", sql.ErrInvalidDefaultValueOrder) }) t.Run("Drop column referenced by other column", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1005(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1005(pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "ALTER TABLE t1005 DROP COLUMN v1", sql.ErrDropColumnReferencedInDefault) }) t.Run("Modify column moving back creates back reference to expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1006(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk), v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1006(pk BIGINT PRIMARY KEY, v1 BIGINT DEFAULT (pk), v2 BIGINT DEFAULT (v1))", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "ALTER TABLE t1006 MODIFY COLUMN v1 BIGINT DEFAULT (pk) AFTER v2", sql.ErrInvalidDefaultValueOrder) }) t.Run("Modify column moving forward creates back reference to expression", func(t *testing.T) { - TestQuery(t, harness, e, "CREATE TABLE t1007(pk BIGINT DEFAULT (v2) PRIMARY KEY, v1 BIGINT DEFAULT (pk), v2 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil) + TestQueryWithContext(t, ctx, e, "CREATE TABLE t1007(pk BIGINT DEFAULT (v2) PRIMARY KEY, v1 BIGINT DEFAULT (pk), v2 BIGINT)", []sql.Row{{sql.NewOkResult(0)}}, nil, nil) AssertErr(t, e, harness, "ALTER TABLE t1007 MODIFY COLUMN v1 BIGINT DEFAULT (pk) FIRST", sql.ErrInvalidDefaultValueOrder) }) } @@ -6473,14 +5609,14 @@ func TestPersist(t *testing.T, harness Harness, newPersistableSess func(ctx *sql }, } - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) defer e.Close() - ctx := NewContext(harness) - for _, tt := range q { t.Run(tt.Name, func(t *testing.T) { sql.InitSystemVariables() + ctx := NewContext(harness) ctx.Session = newPersistableSess(ctx) TestQueryWithContext(t, ctx, e, tt.Query, tt.Expected, nil, nil) @@ -6501,37 +5637,18 @@ func TestPersist(t *testing.T, harness Harness, newPersistableSess func(ctx *sql } func TestKeylessUniqueIndex(t *testing.T, harness Harness) { - for _, insertion := range InsertIntoKeylessUnique { - e := NewEngine(t, harness) - defer e.Close() - - TestQuery(t, harness, e, insertion.WriteQuery, insertion.ExpectedWriteResult, nil) - - // If we skipped the insert, also skip the select - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(insertion.WriteQuery) { - t.Logf("Skipping query %s", insertion.SelectQuery) - continue - } - } - - TestQuery(t, harness, e, insertion.SelectQuery, insertion.ExpectedSelect, nil) + harness.Setup(setup2.KeylessSetup...) + for _, tt := range queries.InsertIntoKeylessUnique { + runWriteQueryTest(t, harness, tt) } - for _, expectedFailure := range InsertIntoKeylessUniqueError { - t.Run(expectedFailure.Name, func(t *testing.T) { - if sh, ok := harness.(SkippingHarness); ok { - if sh.SkipQueryTest(expectedFailure.Query) { - t.Skipf("skipping query %s", expectedFailure.Query) - } - } - AssertErr(t, NewEngine(t, harness), harness, expectedFailure.Query, nil) - }) + for _, tt := range queries.InsertIntoKeylessUniqueError { + runGenericErrorTest(t, harness, tt) } } func TestPrepared(t *testing.T, harness Harness) { - qtests := []QueryTest{ + qtests := []queries.QueryTest{ { Query: "SELECT i, 1 AS foo, 2 AS bar FROM (SELECT i FROM mYtABLE WHERE i = ?) AS a ORDER BY foo, i", Expected: []sql.Row{ @@ -6654,20 +5771,22 @@ func TestPrepared(t *testing.T, harness Harness) { }, } - e := NewEngine(t, harness) + harness.Setup(setup2.MydbData, setup2.MytableData) + e := mustNewEngine(t, harness) + defer e.Close() RunQuery(t, e, harness, "CREATE TABLE a (x int, y int, z int)") RunQuery(t, e, harness, "INSERT INTO a VALUES (0,1,1), (1,1,1), (2,1,1), (3,2,2), (4,2,2)") - ctx := NewContext(harness) for _, tt := range qtests { t.Run(fmt.Sprintf("%s", tt.Query), func(t *testing.T) { + ctx := NewContext(harness) _, err := e.PrepareQuery(ctx, tt.Query) require.NoError(t, err) TestQueryWithContext(t, ctx, e, tt.Query, tt.Expected, tt.ExpectedColumns, tt.Bindings) }) } - repeatTests := []QueryTest{ + repeatTests := []queries.QueryTest{ { Bindings: map[string]sql.Expression{ "v1": expression.NewLiteral(int64(2), sql.Int64), @@ -6712,6 +5831,7 @@ func TestPrepared(t *testing.T, harness Harness) { }, } repeatQ := "select y, sum(y) from a where x > ? group by y order by y" + ctx := NewContext(harness) _, err := e.PrepareQuery(ctx, repeatQ) require.NoError(t, err) for _, tt := range repeatTests { @@ -6803,6 +5923,14 @@ func NewEngine(t *testing.T, harness Harness) *sqle.Engine { return engine } +func mustNewEngine(t *testing.T, h Harness) *sqle.Engine { + e, err := h.NewEngine(t) + if err != nil { + t.Fatal(err) + } + return e +} + // NewSpatialEngine creates test data and returns an engine using the harness provided. func NewSpatialEngine(t *testing.T, harness Harness) *sqle.Engine { dbs := CreateSpatialTestData(t, harness) @@ -6810,6 +5938,47 @@ func NewSpatialEngine(t *testing.T, harness Harness) *sqle.Engine { return engine } +// NewEngineWithSetup creates test data and returns an engine using the harness provided. +func NewEngineWithSetup(t *testing.T, harness Harness, setup []setup2.SetupScript) (*sqle.Engine, error) { + dbs := harness.NewDatabases("mydb") + dbs = append(dbs, information_schema.NewInformationSchemaDatabase()) + pro := harness.NewDatabaseProvider(dbs...) + e := NewEngineWithProvider(t, harness, pro) + ctx := NewContext(harness) + + var supportsIndexes bool + if ih, ok := harness.(IndexHarness); ok && ih.SupportsNativeIndexCreation() { + supportsIndexes = true + + } + return RunEngineScripts(ctx, e, setup, supportsIndexes) +} + +func RunEngineScripts(ctx *sql.Context, e *sqle.Engine, scripts []setup2.SetupScript, supportsIndexes bool) (*sqle.Engine, error) { + for i := range scripts { + for _, s := range scripts[i] { + if !supportsIndexes { + if strings.Contains("create index", s) { + continue + } + } + sch, iter, err := e.Query(ctx, s) + if err != nil { + return nil, setupErrf(err, s) + } + _, err = sql.RowIterToRows(ctx, sch, iter) + if err != nil { + return nil, setupErrf(err, s) + } + } + } + return e, nil +} + +func setupErrf(err error, s string) error { + return fmt.Errorf("failed query '%s': %w", s, err) +} + // NewEngineWithDbs returns a new engine with the databases provided. This is useful if you don't want to implement a // full harness but want to run your own tests on DBs you create. func NewEngineWithDbs(t *testing.T, harness Harness, databases []sql.Database) *sqle.Engine { @@ -6840,39 +6009,79 @@ func NewEngineWithProvider(_ *testing.T, harness Harness, provider sql.MutableDa return engine } -// TestQuery runs a query on the engine given and asserts that results are as expected. -func TestQuery(t *testing.T, harness Harness, e *sqle.Engine, q string, expected []sql.Row, expectedCols []*sql.Column) { +// TestQueryParallel runs a query on the engine given and asserts that results are as expected. +func TestQueryParallel(t *testing.T, harness Harness, q string, expected []sql.Row, expectedCols []*sql.Column) { t.Run(q, func(t *testing.T) { + t.Parallel() if sh, ok := harness.(SkippingHarness); ok { if sh.SkipQueryTest(q) { t.Skipf("Skipping query %s", q) } } - ctx := NewContextWithEngine(harness, e) + e := mustNewEngine(t, harness) + defer e.Close() + ctx := NewContext(harness) TestQueryWithContext(t, ctx, e, q, expected, expectedCols, nil) }) } +// TestQuery runs a query on the engine given and asserts that results are as expected. +func TestQuery(t *testing.T, harness Harness, q string, expected []sql.Row, expectedCols []*sql.Column, bindings map[string]sql.Expression) { + t.Run(q, func(t *testing.T) { + if sh, ok := harness.(SkippingHarness); ok { + if sh.SkipQueryTest(q) { + t.Skipf("Skipping query %s", q) + } + } + + e := mustNewEngine(t, harness) + defer e.Close() + ctx := NewContext(harness) + TestQueryWithContext(t, ctx, e, q, expected, expectedCols, bindings) + }) +} + +func TestQueryWithEngine(t *testing.T, harness Harness, e *sqle.Engine, tt queries.QueryTest) { + t.Run(tt.Query, func(t *testing.T) { + if sh, ok := harness.(SkippingHarness); ok { + if sh.SkipQueryTest(tt.Query) { + t.Skipf("Skipping query %s", tt.Query) + } + } + + ctx := NewContext(harness) + TestQueryWithContext(t, ctx, e, tt.Query, tt.Expected, tt.ExpectedColumns, tt.Bindings) + }) +} + // TestPreparedQuery runs a prepared query on the engine given and asserts that results are as expected. -func TestPreparedQuery(t *testing.T, - harness Harness, - e *sqle.Engine, - q string, - expected []sql.Row, - expectedCols []*sql.Column, -) { +func TestPreparedQuery(t *testing.T, harness Harness, q string, expected []sql.Row, expectedCols []*sql.Column) { t.Run(q, func(t *testing.T) { if sh, ok := harness.(SkippingHarness); ok { if sh.SkipQueryTest(q) { t.Skipf("Skipping query %s", q) } } - ctx := NewContextWithEngine(harness, e) + e := mustNewEngine(t, harness) + defer e.Close() + ctx := NewContext(harness) TestPreparedQueryWithContext(t, ctx, e, q, expected, expectedCols) }) } +func TestPreparedQueryWithEngine(t *testing.T, harness Harness, e *sqle.Engine, tt queries.QueryTest) { + t.Run(tt.Query, func(t *testing.T) { + if sh, ok := harness.(SkippingHarness); ok { + if sh.SkipQueryTest(tt.Query) { + t.Skipf("Skipping query %s", tt.Query) + } + } + ctx := NewContext(harness) + TestPreparedQueryWithContext(t, ctx, e, tt.Query, tt.Expected, tt.ExpectedColumns) + }) +} + func runQueryPreparedWithCtx( t *testing.T, ctx *sql.Context, @@ -6881,6 +6090,9 @@ func runQueryPreparedWithCtx( ) ([]sql.Row, sql.Schema, error) { require := require.New(t) parsed, err := parse.Parse(ctx, q) + if err != nil { + return nil, nil, err + } _, isInsert := parsed.(*plan.InsertInto) _, isDatabaser := parsed.(sql.Databaser) @@ -6947,10 +6159,7 @@ func runQueryPreparedWithCtx( if err != nil { return nil, nil, err } - e.PreparedData[ctx.Session.ID()] = sqle.PreparedData{ - Query: q, - Node: prepared, - } + e.CachePreparedStmt(ctx, prepared, q) sch, iter, err := e.QueryNodeWithBindings(ctx, q, nil, bindVars) require.NoError(err, "Unexpected error for query %s", q) @@ -7041,7 +6250,7 @@ func stripSchema(s sql.Schema) []*sql.Column { } func TestJsonScripts(t *testing.T, harness Harness) { - for _, script := range JsonScripts { + for _, script := range queries.JsonScripts { TestScript(t, harness, script) } } diff --git a/enginetest/harness.go b/enginetest/harness.go index 535a7e59c9..b1ed3902b0 100644 --- a/enginetest/harness.go +++ b/enginetest/harness.go @@ -14,7 +14,14 @@ package enginetest -import "github.com/dolthub/go-mysql-server/sql" +import ( + "testing" + + "github.com/dolthub/go-mysql-server/enginetest/scriptgen/setup" + + sqle "github.com/dolthub/go-mysql-server" + "github.com/dolthub/go-mysql-server/sql" +) // Harness provides a way for database integrators to validate their implementation against the standard set of queries // used to develop and test the engine itself. See memory_engine_test.go for an example. @@ -35,11 +42,19 @@ type Harness interface { // additional information (e.g. current DB) set uniformly. To replicated the behavior of tests during setup, // harnesses should generally dispatch to enginetest.NewContext(harness), rather than calling this method themselves. NewContext() *sql.Context + // Setup injects a test suite's setup scripts. The harness is expected to run + // these scripts before returning NewEngine + Setup(...[]setup.SetupScript) + // NewEngine creates a new sqle.Engine. Ready only tests may re-use an + // engine. Write tests call NewEngine before every test, expecting the + // fresh state provided by Setup. + NewEngine(*testing.T) (*sqle.Engine, error) } // ClientHarness allows for integrators to test user privileges, as mock clients are used to test functionality. type ClientHarness interface { Harness + // NewContextWithClient returns a context that will return the given client when requested from the session. NewContextWithClient(client sql.Client) *sql.Context } @@ -55,6 +70,7 @@ type SkippingHarness interface { // driver they provide. type IndexDriverHarness interface { Harness + // InitializeIndexDriver initializes the index driver for this test run with the databases given InitializeIndexDriver(dbs []sql.Database) } @@ -63,6 +79,7 @@ type IndexDriverHarness interface { // (table-supplied) indexes. Integrator tables must implement sql.IndexAlterableTable. type IndexHarness interface { Harness + // SupportsNativeIndexCreation returns whether this harness should accept CREATE INDEX statements as part of test // setup. SupportsNativeIndexCreation() bool @@ -72,6 +89,7 @@ type IndexHarness interface { // Integrator tables must implement sql.ForeignKeyTable. type ForeignKeyHarness interface { Harness + // SupportsForeignKeys returns whether this harness should accept CREATE FOREIGN KEY statements as part of test // setup. SupportsForeignKeys() bool @@ -82,6 +100,7 @@ type ForeignKeyHarness interface { // call to NewTableAsOf, some number of Delete and Insert operations, and then a call to SnapshotTable. type VersionedDBHarness interface { Harness + // NewTableAsOf creates a new table with the given name and schema, optionally handling snapshotting with the asOf // identifier. NewTableAsOf must ignore tables that already exist in the database. Tables returned by this method do // not need to have any previously created data in them, but they can. This behavior is implementation specific, and @@ -95,12 +114,14 @@ type VersionedDBHarness interface { // KeylessTableHarness is an extension to Harness that lets an integrator test their implementation with keyless tables. type KeylessTableHarness interface { Harness + // SupportsKeylessTables indicates integrator support for keyless tables. SupportsKeylessTables() bool } type TransactionHarness interface { Harness + // NewSession returns a context with a new Session, rather than reusing an existing session from previous calls to // NewContext() NewSession() *sql.Context @@ -109,6 +130,6 @@ type TransactionHarness interface { type ReadOnlyDatabaseHarness interface { Harness - // NewReadOnlyDatabases returns a []sql.ReadOnlyDatabase to use for a test. - NewReadOnlyDatabases(name ...string) []sql.ReadOnlyDatabase + // NewReadOnlyDatabases returns a sql.ReadOnlyDatabase to use for a test. + NewReadOnlyDatabases(...string) []sql.ReadOnlyDatabase } diff --git a/enginetest/index_queries.go b/enginetest/index_queries.go deleted file mode 100644 index 620691f3bc..0000000000 --- a/enginetest/index_queries.go +++ /dev/null @@ -1,2888 +0,0 @@ -// Copyright 2021 Dolthub, 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, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package enginetest - -import ( - "github.com/dolthub/go-mysql-server/sql" -) - -var ComplexIndexQueries = []ScriptTest{ - { - Name: "Two column index", - SetUpScript: []string{ - `CREATE TABLE comp_index_t0 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, INDEX (v1, v2));`, - `INSERT INTO comp_index_t0 VALUES (0,0,48),(1,0,52),(2,2,4),(3,2,10),(4,3,35),(5,5,36),(6,5,60),(7,6,1),(8,6,51), -(9,6,60),(10,6,73),(11,9,44),(12,9,97),(13,13,44),(14,14,53),(15,14,57),(16,14,98),(17,16,19),(18,16,53),(19,16,95), -(20,18,31),(21,19,48),(22,19,75),(23,19,97),(24,24,60),(25,25,14),(26,25,31),(27,27,9),(28,27,24),(29,28,24),(30,28,83), -(31,31,14),(32,33,39),(33,34,22),(34,34,91),(35,35,89),(36,38,20),(37,38,66),(38,39,55),(39,39,86),(40,40,97),(41,42,0), -(42,42,82),(43,43,63),(44,44,48),(45,44,67),(46,45,22),(47,45,31),(48,45,63),(49,45,86),(50,46,46),(51,47,5),(52,48,22), -(53,49,0),(54,50,0),(55,50,14),(56,51,35),(57,54,38),(58,56,0),(59,56,60),(60,57,29),(61,57,49),(62,58,12),(63,58,32), -(64,59,29),(65,59,45),(66,59,54),(67,60,66),(68,61,3),(69,61,34),(70,63,19),(71,63,69),(72,65,80),(73,65,97),(74,67,95), -(75,68,11),(76,69,34),(77,72,52),(78,74,81),(79,76,39),(80,78,0),(81,78,90),(82,79,36),(83,80,61),(84,80,88),(85,81,4), -(86,82,16),(87,83,30),(88,83,74),(89,84,9),(90,84,45),(91,86,56),(92,86,88),(93,87,51),(94,89,3),(95,93,19),(96,93,21), -(97,93,96),(98,98,0),(99,98,51),(100,98,61);`, - }, - Assertions: []ScriptTestAssertion{ - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<25) OR (v1>24));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=99 AND v2<>83) OR (v1>=1));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=38 AND v2<41) OR (v1>60)) OR (v1<22));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{33, 34, 22}, sql.Row{83, 80, 61}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{36, 38, 20}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>92 AND v2>25) OR (v1 BETWEEN 6 AND 24 AND v2=80));`, - Expected: []sql.Row{sql.Row{100, 98, 61}, sql.Row{99, 98, 51}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=29) OR (v1=49 AND v2<48));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{18, 16, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>75) OR (v1<=11));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=86) OR (v1<>9)) AND (v1=87 AND v2<=45);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=5) OR (v1=71)) OR (v1<>96));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=97) OR (v1 BETWEEN 36 AND 98));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1=86 AND v2>41) OR (v1<>6 AND v2>16));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{96, 93, 21}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>22 AND v2>18) OR (v1<>12)) OR (v1<=34));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<11) OR (v1>=66 AND v2=22));`, - Expected: []sql.Row{sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{1, 0, 52}, sql.Row{8, 6, 51}, sql.Row{6, 5, 60}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>45 AND v2>37) OR (v1<98 AND v2<=35));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=16 AND v2>96) OR (v1<80));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=98) OR (v1<85 AND v2>60)) OR (v1<>53 AND v2 BETWEEN 82 AND 89));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((((v1<71 AND v2<7) OR (v1<=21 AND v2<=48)) OR (v1=44 AND v2 BETWEEN 21 AND 83)) OR (v1<=72 AND v2<>27)) OR (v1=35 AND v2 BETWEEN 78 AND 89));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=16) OR (v1>=77 AND v2>77)) OR (v1>19 AND v2>27));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=46) AND (v1>=28 AND v2<>68) OR (v1>=33 AND v2<>39));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<39 AND v2<10) OR (v1>64 AND v2<=15)) AND (v1>=41);`, - Expected: []sql.Row{sql.Row{85, 81, 4}, sql.Row{89, 84, 9}, sql.Row{80, 78, 0}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=91) OR (v1<70 AND v2>=23)) OR (v1>23 AND v2<38));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<>45 AND v2=70) OR (v1 BETWEEN 40 AND 96 AND v2 BETWEEN 48 AND 96)) OR (v1<>87 AND v2<31)) OR (v1<>62 AND v2=51)) AND (v1>=47 AND v2<29);`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{62, 58, 12}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{68, 61, 3}, sql.Row{52, 48, 22}, sql.Row{53, 49, 0}, sql.Row{95, 93, 19}, sql.Row{89, 84, 9}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{70, 63, 19}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<71) OR (v1 BETWEEN 46 AND 79));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>52) OR (v1<=14));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>74) OR (v1<>40 AND v2>=54));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=69 AND v2<24) OR (v1<77 AND v2<=53));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{77, 72, 52}, sql.Row{33, 34, 22}, sql.Row{63, 58, 32}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{18, 16, 53}, sql.Row{36, 38, 20}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1=78 AND v2=87) OR (v1 BETWEEN 37 AND 58 AND v2>=30)) AND (v1=86 AND v2 BETWEEN 0 AND 70);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>94) OR (v1<=52));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>23 AND v2>64) OR (v1>73 AND v2<=66)) OR (v1 BETWEEN 39 AND 69 AND v2>84));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{92, 86, 88}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{79, 76, 39}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{67, 60, 66}, sql.Row{89, 84, 9}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>54 AND v2<16) OR (v1<74 AND v2>29)) AND (v1 BETWEEN 34 AND 48);`, - Expected: []sql.Row{sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{47, 45, 31}, sql.Row{45, 44, 67}, sql.Row{43, 43, 63}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{44, 44, 48}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>44 AND v2>12) OR (v1<=5 AND v2>27));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=54 AND v2<>13) OR (v1>84));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>1 AND v2<>51) OR (v1=28));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1>35) OR (v1 BETWEEN 11 AND 21)) OR (v1<>98));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1=16 AND v2=57) OR (v1<46 AND v2 BETWEEN 78 AND 89));`, - Expected: []sql.Row{sql.Row{49, 45, 86}, sql.Row{30, 28, 83}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<53 AND v2<10) AND (v1<>37) OR (v1>23));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((((v1<>30) OR (v1>=6 AND v2 BETWEEN 62 AND 65)) OR (v1<>89)) OR (v1<=40 AND v2>=73)) OR (v1<99));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 34 AND 34 AND v2 BETWEEN 0 AND 91) OR (v1 BETWEEN 54 AND 77 AND v2>92));`, - Expected: []sql.Row{sql.Row{73, 65, 97}, sql.Row{33, 34, 22}, sql.Row{74, 67, 95}, sql.Row{34, 34, 91}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((((v1<=55) OR (v1>=46 AND v2<=26)) OR (v1 BETWEEN 8 AND 54)) OR (v1>26 AND v2 BETWEEN 62 AND 89)) OR (v1<31 AND v2=11)) OR (v1>9 AND v2=60));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{78, 74, 81}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 17 AND 54 AND v2>=37) AND (v1<42 AND v2=96) OR (v1<>50));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>39 AND v2>66) OR (v1=99));`, - Expected: []sql.Row{sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{92, 86, 88}, sql.Row{45, 44, 67}, sql.Row{73, 65, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{84, 80, 88}, sql.Row{71, 63, 69}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 24 AND 66) OR (v1<=81 AND v2<>29));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>18 AND v2<>8) OR (v1>=10 AND v2>3)) OR (v1=53));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=42 AND v2>34) OR (v1<=40 AND v2<=49));`, - Expected: []sql.Row{sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{33, 34, 22}, sql.Row{83, 80, 61}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{48, 45, 63}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 8 AND 38) OR (v1>=23 AND v2 BETWEEN 36 AND 49));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{50, 46, 46}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{65, 59, 45}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>57 AND v2 BETWEEN 2 AND 93) OR (v1=52));`, - Expected: []sql.Row{sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<24) OR (v1<41)) OR (v1<12 AND v2=2)) OR (v1=3 AND v2<>66));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=52 AND v2<40) AND (v1<30) OR (v1<=75 AND v2 BETWEEN 54 AND 54)) OR (v1<>31 AND v2<>56));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>52 AND v2<90) OR (v1 BETWEEN 27 AND 77 AND v2 BETWEEN 49 AND 83));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{78, 74, 81}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>2) OR (v1<72 AND v2>=21)) AND (v1=69 AND v2 BETWEEN 44 AND 48);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((v1>77) OR (v1=57)) OR (v1>9 AND v2>80)) OR (v1=22));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{92, 86, 88}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{93, 87, 51}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{89, 84, 9}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{60, 57, 29}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((v1>28) OR (v1<=30 AND v2=30)) OR (v1<29)) OR (v1 BETWEEN 54 AND 74));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>30 AND v2 BETWEEN 20 AND 41) OR (v1>=69 AND v2=51));`, - Expected: []sql.Row{sql.Row{5, 5, 36}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{52, 48, 22}, sql.Row{69, 61, 34}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{56, 51, 35}, sql.Row{33, 34, 22}, sql.Row{63, 58, 32}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{64, 59, 29}, sql.Row{96, 93, 21}, sql.Row{32, 33, 39}, sql.Row{99, 98, 51}, sql.Row{60, 57, 29}, sql.Row{36, 38, 20}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>39) OR (v1=55)) AND (v1=67);`, - Expected: []sql.Row{sql.Row{74, 67, 95}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<20 AND v2<=46) OR (v1<>4 AND v2=26)) OR (v1>36 AND v2<>13));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{17, 16, 19}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=5 AND v2>66) OR (v1<=0)) OR (v1 BETWEEN 10 AND 87));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((((v1<>99 AND v2 BETWEEN 12 AND 31) OR (v1<56 AND v2<>69)) OR (v1>=37 AND v2<47)) OR (v1<=98 AND v2=50)) AND (v1 BETWEEN 15 AND 47) OR (v1>55 AND v2>85)) OR (v1>86));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<37) OR (v1<=48 AND v2<=54)) OR (v1=88));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{51, 47, 5}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>31) OR (v1<>43)) OR (v1>37 AND v2>5));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=91) OR (v1<>79)) OR (v1<64));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>48) OR (v1>11));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>40) OR (v1>=49 AND v2>=92));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<40) OR (v1<=59)) OR (v1<99)) AND (v1>=83) OR (v1>9));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=53 AND v2<=79) OR (v1>50 AND v2>26)) AND (v1>26) AND (v1>43 AND v2<7);`, - Expected: []sql.Row{sql.Row{54, 50, 0}, sql.Row{53, 49, 0}, sql.Row{51, 47, 5}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 27 AND 84) OR (v1<98 AND v2>38)) OR (v1<>30));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1=45) OR (v1=28));`, - Expected: []sql.Row{sql.Row{49, 45, 86}, sql.Row{47, 45, 31}, sql.Row{46, 45, 22}, sql.Row{30, 28, 83}, sql.Row{29, 28, 24}, sql.Row{48, 45, 63}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (v1 BETWEEN 11 AND 18) AND (v1>31 AND v2 BETWEEN 38 AND 88);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>95 AND v2>5) OR (v1>16 AND v2>=38));`, - Expected: []sql.Row{sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=23) OR (v1=47 AND v2>23));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1=30) OR (v1<>67));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=30 AND v2>=67) OR (v1<=52));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 48 AND 86 AND v2>=29) OR (v1<>82 AND v2<=93)) OR (v1 BETWEEN 79 AND 87 AND v2 BETWEEN 13 AND 69));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 3 AND 95 AND v2>=36) OR (v1>=40 AND v2<13)) OR (v1 BETWEEN 4 AND 8 AND v2=50));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{54, 50, 0}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{23, 19, 97}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{98, 98, 0}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<11 AND v2<>32) OR (v1 BETWEEN 35 AND 41)) OR (v1>=76));`, - Expected: []sql.Row{sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{92, 86, 88}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{79, 76, 39}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{89, 84, 9}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{36, 38, 20}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1=15 AND v2=8) AND (v1>2) OR (v1 BETWEEN 50 AND 97));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{65, 59, 45}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<67 AND v2<>39) OR (v1>36));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>66) OR (v1<50));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 5 AND 19) OR (v1<>50 AND v2>=51)) OR (v1>55));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 16 AND 65) OR (v1<>18 AND v2>=81)) OR (v1 BETWEEN 6 AND 48));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1>=31 AND v2>=55) OR (v1 BETWEEN 1 AND 28)) OR (v1 BETWEEN 26 AND 41 AND v2<=15));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=77 AND v2 BETWEEN 4 AND 26) OR (v1<=1 AND v2<>20)) OR (v1>8 AND v2>40));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{55, 50, 14}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((((v1=37 AND v2>32) OR (v1>13 AND v2>51)) AND (v1 BETWEEN 8 AND 19) OR (v1<>4)) OR (v1<=58 AND v2<>70)) OR (v1<87 AND v2>=24));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>50) OR (v1<=88)) OR (v1>=28 AND v2 BETWEEN 30 AND 85));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=94) OR (v1<=87));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>56 AND v2<93) OR (v1<73 AND v2<=70));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((v1>=85) OR (v1=91)) OR (v1<88 AND v2<42)) OR (v1<>42 AND v2<=10));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{89, 84, 9}, sql.Row{33, 34, 22}, sql.Row{63, 58, 32}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{36, 38, 20}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>42 AND v2<=13) OR (v1=7));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{62, 58, 12}, sql.Row{54, 50, 0}, sql.Row{68, 61, 3}, sql.Row{53, 49, 0}, sql.Row{89, 84, 9}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{94, 89, 3}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1=63) OR (v1 BETWEEN 55 AND 82 AND v2 BETWEEN 0 AND 6)) OR (v1=46));`, - Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{50, 46, 46}, sql.Row{68, 61, 3}, sql.Row{80, 78, 0}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 20 AND 77 AND v2>=49) OR (v1<13));`, - Expected: []sql.Row{sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{66, 59, 54}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{43, 43, 63}, sql.Row{1, 0, 52}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{6, 5, 60}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1>=72) OR (v1<49 AND v2<>36)) OR (v1>=10 AND v2<1));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 18 AND 87) OR (v1>=42 AND v2>44)) OR (v1<26 AND v2<=55)) AND (v1<=21);`, - Expected: []sql.Row{sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{22, 19, 75}, sql.Row{18, 16, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>98 AND v2<75) OR (v1=47));`, - Expected: []sql.Row{sql.Row{51, 47, 5}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=57 AND v2>=43) OR (v1<27 AND v2<>3));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{25, 25, 14}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 16 AND 45 AND v2=22) OR (v1>=87 AND v2=48));`, - Expected: []sql.Row{sql.Row{46, 45, 22}, sql.Row{33, 34, 22}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 45 AND 74 AND v2<=74) OR (v1<>48 AND v2>58));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{10, 6, 73}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<32 AND v2>=79) OR (v1<=28)) OR (v1 BETWEEN 46 AND 72)) OR (v1>16));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<10) OR (v1<89));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=64 AND v2>=69) OR (v1>=2));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=65) OR (v1<64));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1=46) OR (v1>9 AND v2>=22));`, - Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 21 AND 33 AND v2>25) OR (v1<0));`, - Expected: []sql.Row{sql.Row{30, 28, 83}, sql.Row{24, 24, 60}, sql.Row{26, 25, 31}, sql.Row{32, 33, 39}}, - }, - }, - }, - { - Name: "Three column index", - SetUpScript: []string{ - `CREATE TABLE comp_index_t1 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT, INDEX (v1, v2, v3));`, - `INSERT INTO comp_index_t1 VALUES (0,0,3,16),(1,2,65,9),(2,3,38,37),(3,3,99,99),(4,5,17,42),(5,6,6,76),(6,6,81,33), -(7,7,33,51),(8,7,37,42),(9,8,9,21),(10,8,37,90),(11,9,39,20),(12,9,71,82),(13,10,16,21),(14,10,32,46),(15,10,47,36), -(16,12,44,84),(17,12,66,40),(18,13,47,30),(19,13,56,41),(20,14,38,24),(21,14,91,1),(22,15,2,69),(23,16,40,36), -(24,20,29,93),(25,21,9,89),(26,21,42,76),(27,23,13,53),(28,23,28,68),(29,23,28,90),(30,23,30,44),(31,24,20,8), -(32,25,49,88),(33,26,15,28),(34,27,35,12),(35,28,39,84),(36,29,7,38),(37,29,21,74),(38,29,27,48),(39,29,77,46), -(40,31,47,21),(41,31,47,91),(42,32,40,76),(43,33,70,50),(44,34,27,58),(45,35,32,36),(46,36,4,36),(47,36,84,75), -(48,37,27,32),(49,38,88,68),(50,41,17,68),(51,41,77,26),(52,42,80,85),(53,45,1,57),(54,46,58,8),(55,49,26,11), -(56,50,49,20),(57,50,86,6),(58,54,13,78),(59,54,57,83),(60,55,45,46),(61,55,81,80),(62,56,0,97),(63,56,8,78), -(64,56,58,4),(65,56,66,33),(66,57,7,52),(67,59,77,53),(68,60,8,70),(69,61,11,25),(70,63,85,23),(71,65,17,9), -(72,66,46,46),(73,66,73,4),(74,67,55,27),(75,70,8,54),(76,70,58,33),(77,71,39,15),(78,72,65,64),(79,74,78,26), -(80,75,91,35),(81,76,40,52),(82,76,44,87),(83,81,32,4),(84,82,11,6),(85,82,46,32),(86,84,40,8),(87,84,93,37), -(88,85,53,50),(89,86,63,79),(90,87,22,34),(91,87,57,62),(92,88,88,42),(93,90,30,67),(94,91,15,15),(95,93,7,26), -(96,94,92,38),(97,95,89,66),(98,97,63,19),(99,98,31,21),(100,98,42,22);`, - }, - Assertions: []ScriptTestAssertion{ - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>87 AND v2 BETWEEN 8 AND 33) OR (v1 BETWEEN 39 AND 69 AND v3<4));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{99, 98, 31, 21}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=55 AND v2>=72 AND v3=63) AND (v1<>54 AND v2 BETWEEN 3 AND 80) OR (v1=15)) AND (v1<>50);`, - Expected: []sql.Row{sql.Row{22, 15, 2, 69}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<93 AND v2<39 AND v3 BETWEEN 30 AND 97) OR (v1>54)) OR (v1<66));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>59 AND v2<=15) OR (v1 BETWEEN 2 AND 51)) OR (v1>15 AND v2 BETWEEN 31 AND 81));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<3 AND v2<>23 AND v3<>11) OR (v1<>49)) AND (v1<=41 AND v2>40);`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 28 AND 38 AND v3<33) OR (v1 BETWEEN 75 AND 85)) AND (v1>=60) OR (v1>=53 AND v2 BETWEEN 36 AND 53 AND v3>48));`, - Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{84, 82, 11, 6}, sql.Row{80, 75, 91, 35}, sql.Row{81, 76, 40, 52}, sql.Row{82, 76, 44, 87}, sql.Row{85, 82, 46, 32}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<6 AND v2<>44) OR (v1 BETWEEN 27 AND 96)) OR (v1>22 AND v2<>30 AND v3<49));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>29 AND v2=40) OR (v1<=74)) OR (v1<13 AND v2 BETWEEN 27 AND 82 AND v3<82));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>6 AND v2 BETWEEN 0 AND 97) OR (v1<>40 AND v3<10 AND v2<>10));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>=35) OR (v1=86)) OR (v1>41 AND v2>=92)) OR (v1<>28));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<16 AND v3=63 AND v2>=20) OR (v1<>41)) OR (v1<=74 AND v3 BETWEEN 14 AND 74 AND v2<>13));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1 BETWEEN 1 AND 11) OR (v1>2 AND v3<=93 AND v2 BETWEEN 28 AND 84)) OR (v1 BETWEEN 34 AND 52 AND v2=73)) OR (v1<>80 AND v2<=32 AND v3 BETWEEN 3 AND 7));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<45) OR (v1<>72)) OR (v1 BETWEEN 10 AND 86 AND v2=92)) OR (v1 BETWEEN 32 AND 81 AND v2>59));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=11 AND v2>50 AND v3 BETWEEN 5 AND 67) AND (v1>74 AND v2 BETWEEN 6 AND 63 AND v3<=1) OR (v1>=53 AND v2>69 AND v3>54));`, - Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{61, 55, 81, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>9) OR (v1>14 AND v2>10));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=39 AND v2 BETWEEN 17 AND 34) OR (v1=89 AND v3>49 AND v2>58)) OR (v1>97));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{99, 98, 31, 21}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<7 AND v2<>43) OR (v1<>5 AND v3<0 AND v2<1));`, - Expected: []sql.Row{sql.Row{2, 3, 38, 37}, sql.Row{3, 3, 99, 99}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{4, 5, 17, 42}, sql.Row{5, 6, 6, 76}, sql.Row{0, 0, 3, 16}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>30 AND v2 BETWEEN 23 AND 60 AND v3=58) OR (v1<=3 AND v2 BETWEEN 68 AND 72)) OR (v1<=17)) OR (v1>6 AND v2>=24)) AND (v1<89 AND v2=73);`, - Expected: []sql.Row{sql.Row{73, 66, 73, 4}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>27) OR (v1>=22 AND v2>99 AND v3>=43));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>25 AND v2 BETWEEN 1 AND 82) OR (v1>31 AND v2=86));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>12 AND v2<60 AND v3=91) OR (v1>63 AND v2>=8 AND v3<>32)) OR (v1>35 AND v3>=98));`, - Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>27 AND v3=10) OR (v1>=25 AND v2<26)) AND (v1>=62 AND v2<=96 AND v3>28);`, - Expected: []sql.Row{sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>30 AND v2=40 AND v3 BETWEEN 35 AND 35) OR (v1 BETWEEN 20 AND 77 AND v2>=56 AND v3>62));`, - Expected: []sql.Row{sql.Row{47, 36, 84, 75}, sql.Row{78, 72, 65, 64}, sql.Row{49, 38, 88, 68}, sql.Row{52, 42, 80, 85}, sql.Row{59, 54, 57, 83}, sql.Row{61, 55, 81, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((((v1<=92 AND v3=0 AND v2>=9) OR (v1 BETWEEN 48 AND 79)) OR (v1>70 AND v2<=26 AND v3 BETWEEN 14 AND 82)) OR (v1>=29 AND v2<>21 AND v3 BETWEEN 37 AND 55)) OR (v1>=6 AND v3<=47));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=15 AND v2>28) OR (v1<=84 AND v2<>91));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=49 AND v2<=52 AND v3 BETWEEN 23 AND 38) OR (v1 BETWEEN 30 AND 84 AND v2=94));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 8 AND 18) OR (v1=27 AND v2<=4 AND v3<14));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{22, 15, 2, 69}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{15, 10, 47, 36}, sql.Row{9, 8, 9, 21}, sql.Row{10, 8, 37, 90}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{20, 14, 38, 24}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=4) OR (v1=0 AND v2<=63));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1<=99 AND v2<>86) AND (v1>=21 AND v2>36);`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>43) OR (v1=14));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1 BETWEEN 21 AND 44 AND v2 BETWEEN 18 AND 88 AND v3=42) AND (v1>=52 AND v2>37 AND v3 BETWEEN 26 AND 91);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>29 AND v2>93 AND v3<64) OR (v1<>54 AND v2>35));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<88) OR (v1<>45 AND v2<89)) AND (v1=98 AND v2<=81 AND v3 BETWEEN 34 AND 77);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>65 AND v2<>86 AND v3<=2) OR (v1<>37 AND v2<=96));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>79) OR (v1>66)) AND (v1<>81 AND v2<34 AND v3>=25) AND (v1<42) OR (v1<>12 AND v2<>17 AND v3<=23));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{50, 41, 17, 68}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{70, 63, 85, 23}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<81 AND v2>=28) OR (v1=19 AND v2 BETWEEN 9 AND 57));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<32) OR (v1>=52)) OR (v1>=98));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>47) OR (v1<>25));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1>27 AND v2<=80 AND v3 BETWEEN 11 AND 37) AND (v1=87 AND v2<54) AND (v1>29);`, - Expected: []sql.Row{sql.Row{90, 87, 22, 34}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>65 AND v2>=52) OR (v1<=85)) OR (v1<=64 AND v3=9 AND v2>=36));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=12 AND v2>=65) OR (v1=11 AND v2<1));`, - Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{49, 38, 88, 68}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{43, 33, 70, 50}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{61, 55, 81, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=92 AND v2<=42) OR (v1>=58));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>0) OR (v1<81 AND v2>=70)) OR (v1>=52));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>5 AND v3<=32) OR (v1 BETWEEN 77 AND 85 AND v3 BETWEEN 16 AND 21 AND v2 BETWEEN 10 AND 42));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>43 AND v2<53 AND v3<=20) OR (v1<7 AND v2<>79));`, - Expected: []sql.Row{sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{71, 65, 17, 9}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{4, 5, 17, 42}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{5, 6, 6, 76}, sql.Row{0, 0, 3, 16}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1>=17 AND v2 BETWEEN 17 AND 78 AND v3=10) AND (v1<=67) AND (v1>=81 AND v2<=88 AND v3>=70);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<77 AND v2<35 AND v3=73) OR (v1=85 AND v2>0 AND v3<65)) AND (v1>=20 AND v3<23 AND v2<=81) OR (v1<34 AND v2<=21 AND v3<=45));`, - Expected: []sql.Row{sql.Row{13, 10, 16, 21}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{31, 24, 20, 8}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{0, 0, 3, 16}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((((v1<=69) AND (v1>=60 AND v2<18 AND v3=15) OR (v1<=75)) OR (v1>=52 AND v2<10)) OR (v1<37 AND v2<=64)) OR (v1>38 AND v2=27));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1<=76) AND (v1<=94);`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<>40 AND v2>1) OR (v1>3 AND v2<=42)) OR (v1=99 AND v2>62)) OR (v1<17 AND v2<>75 AND v3=6));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=39) OR (v1=40 AND v2<>49)) OR (v1<>35 AND v2>4 AND v3>26)) OR (v1=32 AND v2<>55));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{12, 9, 71, 82}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=16 AND v2<>25 AND v3<>3) OR (v1>=4 AND v2 BETWEEN 4 AND 93 AND v3>39));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{12, 9, 71, 82}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{81, 76, 40, 52}, sql.Row{67, 59, 77, 53}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>=51 AND v2<83) OR (v1>=15 AND v2>=3)) OR (v1<=49)) OR (v1<69));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1<>43 AND v2>10) AND (v1>30 AND v2 BETWEEN 18 AND 78 AND v3 BETWEEN 75 AND 81);`, - Expected: []sql.Row{sql.Row{89, 86, 63, 79}, sql.Row{42, 32, 40, 76}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>1) OR (v1<34 AND v2>=57 AND v3 BETWEEN 15 AND 67));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>3 AND v2>32) OR (v1<=26 AND v3>=27 AND v2>=5));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>25 AND v2<>70 AND v3<=51) OR (v1<=71 AND v2>59));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 0 AND 61 AND v2<0) OR (v1 BETWEEN 0 AND 38 AND v2>34)) OR (v1>=13 AND v2>=41));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>68 AND v2<=57) AND (v1<>84 AND v3 BETWEEN 24 AND 98 AND v2 BETWEEN 28 AND 45) OR (v1>0 AND v2<>47 AND v3>=69)) OR (v1>=44));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{12, 9, 71, 82}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=48 AND v2 BETWEEN 33 AND 66) OR (v1>=91));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{7, 7, 33, 51}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 17 AND 52 AND v2<96) OR (v1<=12 AND v2<>4 AND v3>53)) OR (v1<98 AND v3<94 AND v2=5));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>26 AND v2 BETWEEN 66 AND 79 AND v3<=94) OR (v1 BETWEEN 16 AND 55));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1 BETWEEN 36 AND 67 AND v3<74 AND v2=26) AND (v1 BETWEEN 9 AND 10 AND v2=96) AND (v1<=11 AND v2<>63 AND v3>=62);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 28 AND 49 AND v2<47) OR (v1>37 AND v2 BETWEEN 45 AND 61 AND v3<73));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{38, 29, 27, 48}, sql.Row{54, 46, 58, 8}, sql.Row{74, 67, 55, 27}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{35, 28, 39, 84}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<37 AND v2>=26 AND v3<=14) OR (v1<64)) OR (v1 BETWEEN 31 AND 53 AND v2>55 AND v3<=55));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=77) OR (v1<50)) AND (v1<=53 AND v2>35 AND v3<>98);`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=2 AND v2=40 AND v3 BETWEEN 18 AND 67) OR (v1=14 AND v2<=24 AND v3<=87)) OR (v1 BETWEEN 8 AND 31 AND v2>86)) OR (v1>30));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>46 AND v2<>49 AND v3<=44) OR (v1 BETWEEN 64 AND 80 AND v2=41 AND v3<=68));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=95 AND v3<47 AND v2>=97) OR (v1 BETWEEN 11 AND 36 AND v2<=83));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{38, 29, 27, 48}, sql.Row{22, 15, 2, 69}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=65 AND v2=39 AND v3 BETWEEN 49 AND 67) OR (v1<57 AND v2>35));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{65, 56, 66, 33}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>71 AND v2=33) OR (v1<>85 AND v2<>50 AND v3 BETWEEN 34 AND 67)) OR (v1 BETWEEN 5 AND 47 AND v3 BETWEEN 13 AND 76 AND v2=4)) OR (v1=16 AND v2>=29 AND v3<>80));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{27, 23, 13, 53}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{67, 59, 77, 53}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{30, 23, 30, 44}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=17 AND v2>38) AND (v1>=79) OR (v1<>38));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=4 AND v2=26) OR (v1>21 AND v2 BETWEEN 14 AND 64));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>50) OR (v1<=58 AND v2<=95)) OR (v1=10));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=21 AND v2<>95) OR (v1<>23 AND v2 BETWEEN 15 AND 22)) OR (v1<=53 AND v2>=6)) OR (v1<=13 AND v2<>93 AND v3<15));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1<64 AND v2>=90 AND v3>41) AND (v1>=14 AND v2 BETWEEN 30 AND 70 AND v3>=25);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<27 AND v2<=43) OR (v1<62 AND v2<=99)) OR (v1<>48 AND v2<29 AND v3<>69));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<11 AND v2<70 AND v3>27) OR (v1>=80 AND v2<31 AND v3<65)) OR (v1>=98 AND v2 BETWEEN 30 AND 85 AND v3>=30));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{2, 3, 38, 37}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{7, 7, 33, 51}, sql.Row{4, 5, 17, 42}, sql.Row{15, 10, 47, 36}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{90, 87, 22, 34}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1<>44 AND v2>=10) AND (v1=47 AND v2=14 AND v3<30);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>6 AND v2=50) OR (v1>=16));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=31) OR (v1>53 AND v2<>11 AND v3<>94)) OR (v1>48 AND v2 BETWEEN 11 AND 29 AND v3 BETWEEN 68 AND 72));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 55 AND 59) OR (v1<=10 AND v2>=24)) AND (v1>93 AND v3<70 AND v2 BETWEEN 44 AND 79) AND (v1>=22 AND v2=27);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=43 AND v2<28 AND v3<>24) OR (v1<36 AND v2=14 AND v3 BETWEEN 16 AND 55));`, - Expected: []sql.Row{sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{62, 56, 0, 97}, sql.Row{53, 45, 1, 57}, sql.Row{55, 49, 26, 11}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{69, 61, 11, 25}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>48 AND v2<=80) OR (v1=72 AND v3 BETWEEN 45 AND 52 AND v2=98));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{78, 72, 65, 64}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1>=98 AND v2=51) AND (v1>34);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>2) OR (v1<=30)) OR (v1<>35 AND v2 BETWEEN 6 AND 61 AND v3>=16));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>19) OR (v1<>48));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 12 AND 42 AND v2<=12) OR (v1<34 AND v2 BETWEEN 30 AND 47 AND v3<>50));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{7, 7, 33, 51}, sql.Row{22, 15, 2, 69}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{41, 31, 47, 91}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((((v1>=6) OR (v1>7)) OR (v1<88 AND v2<=34 AND v3<=47)) OR (v1>=10)) OR (v1=10));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=74) OR (v1>=1)) OR (v1=54 AND v2>=38 AND v3>2)) AND (v1>5);`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=45 AND v2>18) OR (v1<64 AND v2=25 AND v3>97));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<37 AND v3>77) OR (v1>38 AND v3<>57 AND v2=87));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{12, 9, 71, 82}, sql.Row{3, 3, 99, 99}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{29, 23, 28, 90}, sql.Row{41, 31, 47, 91}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{35, 28, 39, 84}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<96 AND v2>11 AND v3<76) OR (v1<=14 AND v2=23)) OR (v1<=15 AND v2<21 AND v3<91)) OR (v1=45 AND v2<11 AND v3=1));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{33, 26, 15, 28}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{5, 6, 6, 76}, sql.Row{30, 23, 30, 44}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>23 AND v3<=52) OR (v1<>19 AND v2=25));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1<=12 AND v2>=65) AND (v1<6 AND v2>=92);`, - Expected: []sql.Row{sql.Row{3, 3, 99, 99}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=62 AND v2<>32) OR (v1>=55 AND v2=41 AND v3>73));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>34 AND v2<=62) OR (v1>5 AND v2 BETWEEN 59 AND 98 AND v3<69)) OR (v1>34));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1=61 AND v2 BETWEEN 10 AND 22 AND v3<34) OR (v1=68)) OR (v1<=97 AND v3 BETWEEN 7 AND 63 AND v2<67));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=42) OR (v1 BETWEEN 13 AND 30 AND v2<50));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 16 AND 49) OR (v1<=69 AND v2>9 AND v3<=8));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>71 AND v2>44) OR (v1<76 AND v2>=10)) OR (v1>=44 AND v2=66));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((((v1>=26) OR (v1>=13 AND v2 BETWEEN 35 AND 95 AND v3>=29)) OR (v1<>54 AND v2 BETWEEN 0 AND 54)) OR (v1 BETWEEN 17 AND 17 AND v2<=71)) OR (v1>50 AND v3>=42)) OR (v1<>0));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=99 AND v2<66) OR (v1 BETWEEN 1 AND 47)) OR (v1<>2 AND v2<30));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>9 AND v2<74) AND (v1<=63 AND v2=18) OR (v1<46));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=20 AND v2<=62) OR (v1>45 AND v2=33 AND v3<=4)) OR (v1>29));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=55 AND v2 BETWEEN 82 AND 96 AND v3>=13) OR (v1>=89 AND v2<18 AND v3<19)) OR (v1=98 AND v3>=40)) OR (v1 BETWEEN 7 AND 74 AND v2<=73));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=26 AND v2 BETWEEN 6 AND 80) AND (v1=47 AND v2<67 AND v3<7) OR (v1>63));`, - Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<11) OR (v1<>33));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=35) AND (v1=44 AND v2<78 AND v3>=40) OR (v1<>88 AND v2=8)) AND (v1>=99 AND v2=62) OR (v1<=94)) OR (v1 BETWEEN 22 AND 23 AND v2 BETWEEN 14 AND 46));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<9 AND v2=94 AND v3>8) OR (v1>=63));`, - Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<43) OR (v1 BETWEEN 40 AND 49 AND v2>26 AND v3 BETWEEN 22 AND 80));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 4 AND 85 AND v2<>45 AND v3<=41) OR (v1>67 AND v2<25));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>77) OR (v1<=54 AND v2<=71 AND v3>=49)) OR (v1>54 AND v2<30 AND v3=6));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1 BETWEEN 21 AND 53 AND v2=0 AND v3>32) OR (v1=93 AND v2>=94 AND v3<1)) OR (v1<26)) OR (v1<>11 AND v2<>32 AND v3=6)) AND (v1>=45);`, - Expected: []sql.Row{sql.Row{84, 82, 11, 6}, sql.Row{57, 50, 86, 6}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>50) OR (v1<=71));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=41) OR (v1>29 AND v2<>31));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<88 AND v2<91 AND v3>9) AND (v1>=5 AND v2 BETWEEN 21 AND 29 AND v3>18) OR (v1>=40));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>2 AND v2<76 AND v3<=35) OR (v1<=12 AND v3 BETWEEN 25 AND 30));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{18, 13, 47, 30}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1 BETWEEN 25 AND 84 AND v2<=94) OR (v1>66 AND v2>4 AND v3>=57)) OR (v1=78 AND v2>66 AND v3=19)) OR (v1<>48));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=24) OR (v1>=47 AND v2<=75 AND v3<=52));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=21 AND v2<>70) OR (v1<=77 AND v2>4)) OR (v1<28 AND v2<=3 AND v3<>21));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=60 AND v2>91) OR (v1<=10));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{3, 3, 99, 99}, sql.Row{7, 7, 33, 51}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{13, 10, 16, 21}, sql.Row{4, 5, 17, 42}, sql.Row{15, 10, 47, 36}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{0, 0, 3, 16}, sql.Row{87, 84, 93, 37}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>98 AND v2<52) OR (v1 BETWEEN 65 AND 67)) OR (v1 BETWEEN 18 AND 54)) AND (v1>=14 AND v2=27);`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{38, 29, 27, 48}, sql.Row{48, 37, 27, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=43 AND v2<>39) AND (v1<=32 AND v2<=15 AND v3>=54) OR (v1<>68 AND v2 BETWEEN 42 AND 46));`, - Expected: []sql.Row{sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{60, 55, 45, 46}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{26, 21, 42, 76}, sql.Row{85, 82, 46, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1>=19 AND v2<2) AND (v1<4 AND v3>23 AND v2<>53);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 34 AND 40) OR (v1<=80 AND v2<>53)) AND (v1=81 AND v2=17 AND v3<>12);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>34 AND v2 BETWEEN 18 AND 67 AND v3<67) OR (v1>21));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>45) OR (v1>=91 AND v2>=8 AND v3<=38)) OR (v1<>58 AND v3<=32 AND v2<>45));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=48) OR (v1<38 AND v2>=26)) AND (v1<=45 AND v2>21) AND (v1=83 AND v2=20);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>25) OR (v1<53));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<95 AND v2>=12) OR (v1 BETWEEN 41 AND 55 AND v2<=81 AND v3<46));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>39 AND v2 BETWEEN 53 AND 73 AND v3<=11) OR (v1<=31 AND v2=68 AND v3>=71)) OR (v1<>18 AND v2<=51));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1>4) AND (v1=3 AND v2 BETWEEN 4 AND 34 AND v3<=40);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>36 AND v2>82) OR (v1 BETWEEN 22 AND 59));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=0) OR (v1 BETWEEN 17 AND 45));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{34, 27, 35, 12}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<1 AND v3<=34) OR (v1 BETWEEN 2 AND 57 AND v2<>70));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1>4) AND (v1 BETWEEN 8 AND 35 AND v2>=94 AND v3=32) AND (v1>=12);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=93 AND v3<>47) OR (v1>=93 AND v2 BETWEEN 15 AND 42 AND v3<=6)) OR (v1>15)) OR (v1 BETWEEN 0 AND 1 AND v2>33));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>12) OR (v1>=26 AND v2 BETWEEN 77 AND 87 AND v3<19)) OR (v1<=89));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1=27 AND v2=16 AND v3>=8) OR (v1<20 AND v2>=1 AND v3 BETWEEN 28 AND 47)) OR (v1 BETWEEN 15 AND 43 AND v2>30));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{2, 3, 38, 37}, sql.Row{40, 31, 47, 21}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=67 AND v2<>69) OR (v1<28 AND v2<62 AND v3>=99));`, - Expected: []sql.Row{sql.Row{74, 67, 55, 27}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<45 AND v2>5 AND v3>20) OR (v1<17));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=40 AND v2<>18) OR (v1<>97 AND v2<>17 AND v3<>48));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>63) AND (v1<=44 AND v2<>43 AND v3=29) OR (v1=38 AND v2>45));`, - Expected: []sql.Row{sql.Row{49, 38, 88, 68}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=6) OR (v1>0 AND v2 BETWEEN 3 AND 50));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{50, 41, 17, 68}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 5 AND 35 AND v2<=3 AND v3<>14) OR (v1>11));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<50) AND (v1<19 AND v2>=10) OR (v1<36 AND v2>10 AND v3<>65));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=56 AND v3<=4 AND v2=46) OR (v1 BETWEEN 21 AND 53 AND v2<>63)) OR (v1 BETWEEN 10 AND 62 AND v2>=62)) OR (v1>31));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<20 AND v2>=1 AND v3=26) OR (v1=12));`, - Expected: []sql.Row{sql.Row{16, 12, 44, 84}, sql.Row{17, 12, 66, 40}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>51) AND (v1<>4 AND v2<47 AND v3>=77) OR (v1>41 AND v3>62));`, - Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{78, 72, 65, 64}, sql.Row{62, 56, 0, 97}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{93, 90, 30, 67}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{35, 28, 39, 84}, sql.Row{59, 54, 57, 83}, sql.Row{61, 55, 81, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<35) OR (v1>=58 AND v2>=0));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>28 AND v2<95) OR (v1<91));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (v1=99 AND v2<=41 AND v3>=61) AND (v1=34 AND v2>68 AND v3<=42);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=74 AND v2<=18) OR (v1>=72)) AND (v1=95 AND v2=31 AND v3 BETWEEN 5 AND 19);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1=64) OR (v1>=49 AND v2<9 AND v3<=49));`, - Expected: []sql.Row{sql.Row{95, 93, 7, 26}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=46) AND (v1<22 AND v2<>42 AND v3<>54) OR (v1>=55 AND v2 BETWEEN 11 AND 84));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{78, 72, 65, 64}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{86, 84, 40, 8}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=7) OR (v1<54));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=95 AND v2=55 AND v3>34) OR (v1=19));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=51 AND v2<=9) OR (v1<>50)) OR (v1<>4 AND v2>56)) OR (v1 BETWEEN 3 AND 18 AND v2>10 AND v3=12));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=90 AND v2<=17) OR (v1=2)) OR (v1<>70 AND v2>=84 AND v3<>42)) OR (v1<11 AND v2<>47 AND v3<55));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{62, 56, 0, 97}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{5, 6, 6, 76}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 50 AND 59) OR (v1>=23 AND v3>=87 AND v2<>46));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{63, 56, 8, 78}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{41, 31, 47, 91}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{59, 54, 57, 83}, sql.Row{57, 50, 86, 6}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<53) OR (v1<=3));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=16 AND v2 BETWEEN 66 AND 94) OR (v1>70 AND v2<=3)) AND (v1<>91) OR (v1=17 AND v2>=7));`, - Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{49, 38, 88, 68}, sql.Row{79, 74, 78, 26}, sql.Row{43, 33, 70, 50}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{61, 55, 81, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<29 AND v3>=33 AND v2=43) OR (v1<59));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>19 AND v2>84 AND v3>94) OR (v1>=42 AND v3=41));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=8 AND v2<=97 AND v3>=77) OR (v1<>4)) OR (v1<=41));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>33) OR (v1<=28)) OR (v1<>68));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>15 AND v2>=22 AND v3<=51) OR (v1<>40 AND v2>26 AND v3<95));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>6) OR (v1<=67 AND v2<>67 AND v3>=88));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=0) OR (v1<=53)) OR (v1<=38));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1=60 AND v3 BETWEEN 2 AND 13 AND v2 BETWEEN 10 AND 69) OR (v1 BETWEEN 1 AND 49)) OR (v1=8 AND v2<26));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 14 AND 20 AND v2<>70) OR (v1>78 AND v2 BETWEEN 31 AND 52 AND v3>16)) OR (v1 BETWEEN 77 AND 78));`, - Expected: []sql.Row{sql.Row{22, 15, 2, 69}, sql.Row{100, 98, 42, 22}, sql.Row{99, 98, 31, 21}, sql.Row{24, 20, 29, 93}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<80 AND v2 BETWEEN 41 AND 74) OR (v1>=36 AND v2=32));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=24 AND v2=62) OR (v1<=24 AND v3<>22 AND v2 BETWEEN 12 AND 25)) OR (v1 BETWEEN 48 AND 49 AND v3>=90)) AND (v1<15 AND v2<>55 AND v3=51);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<66 AND v2>=11 AND v3<90) OR (v1<>90)) OR (v1<=7 AND v2=52));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 6 AND 74 AND v2=52) OR (v1>44 AND v3>=15 AND v2 BETWEEN 17 AND 94)) OR (v1>84));`, - Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=38) OR (v1=13)) OR (v1=25 AND v2<=32 AND v3 BETWEEN 12 AND 92));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=84) OR (v1=41)) OR (v1<83 AND v2=13 AND v3=58));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<36 AND v2<=79 AND v3>47) OR (v1 BETWEEN 24 AND 89 AND v2<29));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{12, 9, 71, 82}, sql.Row{84, 82, 11, 6}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{22, 15, 2, 69}, sql.Row{62, 56, 0, 97}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{42, 32, 40, 76}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 3 AND 19 AND v2<=57 AND v3>61) OR (v1<=58 AND v2>=36 AND v3=31)) AND (v1>94);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1<78 AND v2 BETWEEN 55 AND 64 AND v3>=0) OR (v1<74));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>1 AND v2=88 AND v3<33) OR (v1<=38)) OR (v1>74 AND v3<>55 AND v2>=9));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 15 AND 96 AND v2<>73) OR (v1>=16));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=72 AND v2<>19 AND v3 BETWEEN 9 AND 12) OR (v1<=77 AND v2=30 AND v3<=10));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>28 AND v2>=73 AND v3=79) AND (v1<=70 AND v2 BETWEEN 5 AND 36) OR (v1<=31)) OR (v1<36)) OR (v1=47 AND v2 BETWEEN 0 AND 92 AND v3<=43));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>24) AND (v1>68 AND v2 BETWEEN 1 AND 79 AND v3 BETWEEN 23 AND 44) OR (v1>78));`, - Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{96, 94, 92, 38}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1=47 AND v2=7) OR (v1>=7 AND v2<>87)) OR (v1<>6 AND v2<=84));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>=49 AND v2>53 AND v3<>12) OR (v1=95 AND v2<1 AND v3<>89)) OR (v1=62 AND v3>=37 AND v2<=22)) OR (v1>30 AND v2>=66));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{97, 95, 89, 66}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{49, 38, 88, 68}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{43, 33, 70, 50}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1=24 AND v2<81) OR (v1<=22 AND v2>34 AND v3<55)) OR (v1=45 AND v2>=94 AND v3>17));`, - Expected: []sql.Row{sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{15, 10, 47, 36}, sql.Row{8, 7, 37, 42}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{20, 14, 38, 24}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>38) OR (v1<51 AND v2>=28 AND v3=44)) OR (v1 BETWEEN 23 AND 61 AND v2 BETWEEN 54 AND 75 AND v3<>44)) OR (v1>72));`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>40 AND v2 BETWEEN 26 AND 30) OR (v1<3 AND v2>=62 AND v3<=8)) OR (v1<>57)) OR (v1=16 AND v2>92 AND v3<=74));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=34 AND v2 BETWEEN 29 AND 35 AND v3>=64) OR (v1<>47)) AND (v1>=11) OR (v1<>46 AND v2 BETWEEN 4 AND 26));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 41 AND 98 AND v2>54) OR (v1<29)) OR (v1<32));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=79 AND v3 BETWEEN 9 AND 95) OR (v1 BETWEEN 50 AND 50 AND v2 BETWEEN 16 AND 38 AND v3<>94));`, - Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{96, 94, 92, 38}, sql.Row{89, 86, 63, 79}, sql.Row{100, 98, 42, 22}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((((v1<>79) OR (v1 BETWEEN 9 AND 11 AND v2<48 AND v3<=73)) OR (v1<=46)) OR (v1 BETWEEN 66 AND 67)) OR (v1<=86 AND v2<4));`, - Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=2 AND v2 BETWEEN 32 AND 59 AND v3 BETWEEN 50 AND 52) OR (v1<26)) OR (v1<>2 AND v2>11)) AND (v1>32 AND v2<=92) AND (v1>45 AND v2<>5 AND v3<>49);`, - Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=19) AND (v1<=73) OR (v1=9 AND v2=5 AND v3<=5));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE (((v1<62) AND (v1<=57 AND v2>51 AND v3 BETWEEN 29 AND 30) OR (v1>=28 AND v2<=62 AND v3<>76)) OR (v1>=94));`, - Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>21) OR (v1>=86 AND v2>2 AND v3>=67));`, - Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=94) OR (v1>=57 AND v2<>53 AND v3>22));`, - Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{95, 93, 7, 26}, sql.Row{68, 60, 8, 70}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{91, 87, 57, 62}}, - }, - }, - }, - { - Name: "Four column index", - SetUpScript: []string{ - `CREATE TABLE comp_index_t2 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT, v4 BIGINT, INDEX (v1, v2, v3, v4));`, - `INSERT INTO comp_index_t2 VALUES (0,0,33,2,67),(1,0,55,14,32),(2,1,43,13,36),(3,1,72,29,21),(4,2,27,1,75), -(5,3,31,22,81),(6,4,6,67,80),(7,4,10,53,69),(8,4,27,77,5),(9,5,17,52,13),(10,5,32,30,48),(11,5,76,70,46),(12,7,7,66,62), -(13,7,21,75,70),(14,7,76,26,47),(15,8,54,46,87),(16,8,99,43,1),(17,9,7,74,92),(18,9,19,38,35),(19,10,36,27,5), -(20,12,0,33,62),(21,12,42,15,31),(22,12,46,43,23),(23,15,42,17,60),(24,17,49,14,7),(25,17,75,86,18),(26,20,30,34,71), -(27,21,21,32,8),(28,22,21,28,78),(29,22,98,22,21),(30,23,43,13,11),(31,24,26,69,25),(32,24,45,96,0),(33,29,72,97,93), -(34,32,16,97,29),(35,33,29,69,6),(36,33,53,56,88),(37,33,86,12,22),(38,34,55,37,34),(39,34,87,13,51),(40,34,89,27,90), -(41,35,6,86,74),(42,36,7,40,16),(43,37,35,6,44),(44,37,41,36,10),(45,38,71,22,37),(46,39,45,75,55),(47,41,1,85,9), -(48,41,21,82,54),(49,43,23,15,0),(50,43,66,85,66),(51,45,9,76,9),(52,47,94,56,21),(53,48,3,11,18),(54,50,26,23,71), -(55,50,36,73,58),(56,50,39,26,37),(57,50,79,10,12),(58,50,97,0,79),(59,51,97,39,36),(60,52,72,44,2),(61,53,6,53,89), -(62,53,48,19,36),(63,55,31,29,92),(64,57,25,97,65),(65,63,50,20,43),(66,64,23,33,5),(67,64,26,77,97),(68,64,41,74,85), -(69,64,77,41,17),(70,66,97,6,39),(71,67,39,87,15),(72,69,81,70,37),(73,70,40,19,5),(74,70,56,21,22),(75,71,3,49,55), -(76,71,48,89,99),(77,73,10,2,0),(78,73,91,56,0),(79,74,22,42,16),(80,74,35,72,97),(81,76,74,97,18),(82,82,29,66,71), -(83,82,31,22,99),(84,82,70,5,47),(85,83,37,36,16),(86,83,41,53,57),(87,84,56,78,18),(88,85,2,3,88),(89,86,7,57,96), -(90,87,23,16,63),(91,87,66,8,22),(92,88,57,12,88),(93,89,1,27,50),(94,89,91,7,45),(95,90,25,0,17),(96,91,23,2,9), -(97,93,56,71,53),(98,94,43,71,43),(99,94,79,53,73),(100,96,73,38,38);`, - }, - Assertions: []ScriptTestAssertion{ - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<40 AND v2=9) OR (v1<11 AND v2=15 AND v3<>55 AND v4<>95));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=82 AND v2=74 AND v3=98) OR (v1=27 AND v2 BETWEEN 16 AND 46 AND v3<>27)) OR (v1>=80 AND v2<>42 AND v3>=47));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{82, 82, 29, 66, 71}, sql.Row{86, 83, 41, 53, 57}, sql.Row{89, 86, 7, 57, 96}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=47 AND v2<=37 AND v3<90 AND v4=25) OR (v1<42 AND v2>=96 AND v3=38)) OR (v1>26)) OR (v1>=80));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>33 AND v2>=16) OR (v1>=24));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=51 AND v4 BETWEEN 36 AND 55 AND v2>62 AND v3<43) OR (v1 BETWEEN 5 AND 60 AND v2<1)) OR (v1=51 AND v2>=98 AND v3>=94));`, - Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{59, 51, 97, 39, 36}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=6 AND v4<95 AND v2<41 AND v3<=4) AND (v1>=81 AND v4>44 AND v2 BETWEEN 6 AND 11) OR (v1<=98));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=12 AND v2<=78 AND v3 BETWEEN 28 AND 63 AND v4 BETWEEN 46 AND 95) OR (v1=87 AND v2<=44)) OR (v1<14 AND v2<>37 AND v3 BETWEEN 6 AND 32));`, - Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{21, 12, 42, 15, 31}, sql.Row{10, 5, 32, 30, 48}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{19, 10, 36, 27, 5}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=80 AND v2=72 AND v3>19) OR (v1<>38 AND v2>=86 AND v3=7)) OR (v1<=52 AND v2=25 AND v3 BETWEEN 7 AND 32 AND v4<=31));`, - Expected: []sql.Row{sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{60, 52, 72, 44, 2}, sql.Row{33, 29, 72, 97, 93}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=70) OR (v1>=38 AND v3 BETWEEN 25 AND 30));`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{93, 89, 1, 27, 50}, sql.Row{74, 70, 56, 21, 22}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=33) OR (v1<=31 AND v4<>35 AND v2=38));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>14 AND v2<51 AND v3 BETWEEN 67 AND 78 AND v4=8) OR (v1>=44 AND v2<>35 AND v3<35 AND v4>=12)) OR (v1>=63 AND v2<=3));`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{58, 50, 97, 0, 79}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=6 AND v2<=25 AND v3>39) OR (v1 BETWEEN 17 AND 94 AND v2>96));`, - Expected: []sql.Row{sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{58, 50, 97, 0, 79}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((((v1>=91 AND v4<=47 AND v2>=43) OR (v1=75)) OR (v1<41 AND v4>=64 AND v2>83)) OR (v1 BETWEEN 72 AND 88 AND v2=48 AND v3<=10)) OR (v1<=44));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=31) OR (v1<84 AND v2<=73 AND v3<>2 AND v4<=51));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{85, 83, 37, 36, 16}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{2, 1, 43, 13, 36}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=20 AND v2<=29 AND v3<52 AND v4<>34) OR (v1<>46 AND v2<>98));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<52 AND v3 BETWEEN 39 AND 57 AND v4 BETWEEN 13 AND 13 AND v2 BETWEEN 76 AND 99) OR (v1>44)) OR (v1<71 AND v4>7 AND v2<98)) OR (v1<>5 AND v2 BETWEEN 35 AND 40 AND v3<=10));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=40) OR (v1=27)) OR (v1>90 AND v2>50 AND v3=66 AND v4<83));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1<=92 AND v4 BETWEEN 8 AND 90) AND (v1 BETWEEN 39 AND 42);`, - Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}, sql.Row{46, 39, 45, 75, 55}, sql.Row{47, 41, 1, 85, 9}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 23 AND 85 AND v2<=51 AND v3<>68) OR (v1 BETWEEN 30 AND 58 AND v2<>75));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=67 AND v2<=17 AND v3<>91 AND v4<82) OR (v1>28 AND v2 BETWEEN 17 AND 71 AND v3<12));`, - Expected: []sql.Row{sql.Row{43, 37, 35, 6, 44}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{93, 89, 1, 27, 50}, sql.Row{84, 82, 70, 5, 47}, sql.Row{77, 73, 10, 2, 0}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>77 AND v4>82 AND v2>=96) OR (v1 BETWEEN 41 AND 80 AND v2<>21 AND v3>60));`, - Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{67, 64, 26, 77, 97}, sql.Row{55, 50, 36, 73, 58}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1=28 AND v4 BETWEEN 44 AND 50) AND (v1>=49);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 81 AND 87 AND v3<>81 AND v4<30) AND (v1=17) OR (v1<27 AND v2<>8 AND v3>35)) OR (v1>28 AND v2<62));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>65 AND v2=64) OR (v1=82 AND v3<>99)) OR (v1>=68 AND v2=3 AND v3 BETWEEN 1 AND 51 AND v4<=73));`, - Expected: []sql.Row{sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{84, 82, 70, 5, 47}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=27 AND v3>23) OR (v1<70 AND v2<>43));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>34 AND v2>=89 AND v3>=14) OR (v1<=42 AND v3<1)) OR (v1<59 AND v2>=23 AND v3 BETWEEN 17 AND 37 AND v4 BETWEEN 21 AND 38));`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{52, 47, 94, 56, 21}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{45, 38, 71, 22, 37}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=52 AND v2>=55) OR (v1<73 AND v2<=1 AND v3>75 AND v4<=36)) OR (v1>=45 AND v2>=49 AND v3<=26 AND v4 BETWEEN 40 AND 83));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{91, 87, 66, 8, 22}, sql.Row{92, 88, 57, 12, 88}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>0 AND v2=94 AND v3<>0) OR (v1>=83 AND v2<69 AND v3<84));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{52, 47, 94, 56, 21}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<83 AND v4>51) OR (v1<>30));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<92) OR (v1 BETWEEN 6 AND 39 AND v2=47 AND v3>=63));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=98) OR (v1<=2 AND v2<5));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>29 AND v4=40 AND v2>=63) OR (v1<70 AND v2<70 AND v3<=20)) OR (v1 BETWEEN 7 AND 61 AND v2>=33 AND v3>78)) OR (v1>=4 AND v2<=22));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{17, 9, 7, 74, 92}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=12) OR (v1=28));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=94 AND v2>=13 AND v3<=46 AND v4<>36) AND (v1=84) OR (v1 BETWEEN 52 AND 98 AND v2<71 AND v3<>45));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>64) OR (v1<>55 AND v2=85 AND v3<=88));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 54 AND 87 AND v2<78 AND v3<33) OR (v1<>52)) OR (v1 BETWEEN 3 AND 61 AND v4<=49)) OR (v1>3 AND v2<73 AND v3>59));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 2 AND 23) OR (v1 BETWEEN 7 AND 14 AND v2<=27 AND v3<=82)) OR (v1>61));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=31 AND v2>44) OR (v1<44 AND v4<>6 AND v2<>10 AND v3<>14)) AND (v1=96 AND v3>25 AND v4<>32);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=85 AND v2<12) AND (v1>=25);`, - Expected: []sql.Row{sql.Row{88, 85, 2, 3, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=0) OR (v1=31)) OR (v1<>73 AND v4>9 AND v2 BETWEEN 27 AND 69 AND v3=14));`, - Expected: []sql.Row{sql.Row{0, 0, 33, 2, 67}, sql.Row{1, 0, 55, 14, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=42 AND v2=41 AND v3 BETWEEN 29 AND 94 AND v4<71) OR (v1>=71 AND v2 BETWEEN 67 AND 87 AND v3>=9)) OR (v1<2 AND v2<=1 AND v3<36 AND v4>41));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{86, 83, 41, 53, 57}, sql.Row{100, 96, 73, 38, 38}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=3 AND v2<57 AND v3<>74 AND v4>=69) OR (v1<>66 AND v2=16)) OR (v1=44 AND v3=58));`, - Expected: []sql.Row{sql.Row{5, 3, 31, 22, 81}, sql.Row{34, 32, 16, 97, 29}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=22 AND v2<=41) OR (v1=61 AND v2>21)) OR (v1<>10)) OR (v1 BETWEEN 43 AND 44 AND v2>=35 AND v3<>87));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=13 AND v3>20) OR (v1 BETWEEN 18 AND 26 AND v2>11 AND v3>22)) OR (v1<18 AND v2>=47 AND v3<11)) OR (v1>19));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 42 AND 54 AND v2>20) OR (v1<>68 AND v3>32));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 20 AND 93) AND (v1=66 AND v2<>21 AND v3 BETWEEN 43 AND 94);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>83 AND v2<>16 AND v3=22) AND (v1=34) AND (v1=79 AND v2<=45 AND v3=49);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=44 AND v2<=98) AND (v1>15) OR (v1<=45 AND v2=1 AND v3<>54));`, - Expected: []sql.Row{sql.Row{47, 41, 1, 85, 9}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<38 AND v2>24) OR (v1<20 AND v3>=3 AND v4 BETWEEN 59 AND 81)) OR (v1<31 AND v4 BETWEEN 2 AND 16 AND v2=6 AND v3<=69));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((((v1<43 AND v4<=22) OR (v1<=72 AND v2>=35 AND v3>=96)) OR (v1=63 AND v2=55 AND v3<>46)) OR (v1>=9 AND v2=52 AND v3=86 AND v4<=27)) OR (v1 BETWEEN 37 AND 62));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=52) OR (v1>=59 AND v2<=30 AND v3=98 AND v4 BETWEEN 43 AND 74));`, - Expected: []sql.Row{sql.Row{60, 52, 72, 44, 2}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=37 AND v3>=74 AND v4=54) OR (v1>=36 AND v3<=42 AND v4<=94)) AND (v1=59 AND v2<=56) OR (v1>=83 AND v2<=11));`, - Expected: []sql.Row{sql.Row{88, 85, 2, 3, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>39 AND v3<44 AND v4 BETWEEN 3 AND 31 AND v2>16) OR (v1>72 AND v2=73 AND v3<37 AND v4<=43)) OR (v1=9 AND v2<50));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<31 AND v2<>14 AND v3 BETWEEN 0 AND 10 AND v4>=95) OR (v1<>91)) OR (v1<>35));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>13) OR (v1<>3 AND v4<=42 AND v2 BETWEEN 89 AND 94));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<29 AND v2<=19) AND (v1>=26) OR (v1>=87 AND v2<=12 AND v3=36 AND v4<20)) AND (v1<=24 AND v4>85 AND v2 BETWEEN 1 AND 64) OR (v1>27 AND v2>=8 AND v3<24));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<77 AND v2 BETWEEN 5 AND 22 AND v3<>91 AND v4<34) OR (v1=68 AND v2=50)) OR (v1<44 AND v2>84 AND v3<37 AND v4>=67));`, - Expected: []sql.Row{sql.Row{40, 34, 89, 27, 90}, sql.Row{9, 5, 17, 52, 13}, sql.Row{79, 74, 22, 42, 16}, sql.Row{42, 36, 7, 40, 16}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<4 AND v2>=71) OR (v1<18 AND v2=57));`, - Expected: []sql.Row{sql.Row{3, 1, 72, 29, 21}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>61 AND v2 BETWEEN 46 AND 51) OR (v1 BETWEEN 32 AND 75 AND v4<=32)) AND (v1>97) OR (v1<97));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 4 AND 71 AND v2<=70) AND (v1<>47 AND v2 BETWEEN 19 AND 65) OR (v1=59 AND v2 BETWEEN 25 AND 58));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{38, 34, 55, 37, 34}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<70 AND v2<=90) OR (v1<5 AND v2<>13 AND v3 BETWEEN 20 AND 96 AND v4>92)) OR (v1<>76)) OR (v1 BETWEEN 12 AND 88 AND v2 BETWEEN 53 AND 67 AND v3>=39));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 8 AND 38 AND v2<=31 AND v3 BETWEEN 30 AND 46 AND v4>=28) OR (v1<=22 AND v4<>40 AND v2>76 AND v3 BETWEEN 38 AND 42)) OR (v1<=52 AND v2<93 AND v3>=83)) OR (v1>=33 AND v3>13 AND v4>34));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{67, 64, 26, 77, 97}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{89, 86, 7, 57, 96}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 13 AND 40 AND v2>=0) OR (v1<>3 AND v2>47 AND v3<44 AND v4>49)) OR (v1=23));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{92, 88, 57, 12, 88}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{58, 50, 97, 0, 79}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>35 AND v2<>26) OR (v1<=30 AND v2 BETWEEN 6 AND 61 AND v3<=95 AND v4>5)) AND (v1<>97) OR (v1>31));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=43 AND v2>=64) OR (v1>6 AND v3=92 AND v4>=15)) OR (v1<=55 AND v3=6 AND v4<=77 AND v2<=3)) OR (v1=96 AND v3<=80 AND v4<=13));`, - Expected: []sql.Row{sql.Row{50, 43, 66, 85, 66}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>8 AND v3 BETWEEN 14 AND 75 AND v4=28) AND (v1>=95 AND v2<>72 AND v3=22) OR (v1=5));`, - Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=95 AND v2<1 AND v3 BETWEEN 49 AND 61 AND v4=51) OR (v1>29 AND v2>=9 AND v3>=63 AND v4<=88));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{82, 82, 29, 66, 71}, sql.Row{55, 50, 36, 73, 58}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>30 AND v2 BETWEEN 20 AND 64) AND (v1<=29) AND (v1>=25 AND v2<>0);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=89 AND v2<=1 AND v3<=7 AND v4>=4) AND (v1<=87) OR (v1 BETWEEN 10 AND 46 AND v2 BETWEEN 18 AND 76));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{38, 34, 55, 37, 34}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=44 AND v2>=45 AND v3>=34 AND v4>1) OR (v1=33));`, - Expected: []sql.Row{sql.Row{35, 33, 29, 69, 6}, sql.Row{36, 33, 53, 56, 88}, sql.Row{37, 33, 86, 12, 22}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>12 AND v2<=6) OR (v1>99 AND v2<>51 AND v3=38)) OR (v1>60)) OR (v1 BETWEEN 69 AND 77 AND v2>=49 AND v3>=43));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 49 AND 53 AND v4 BETWEEN 22 AND 96) OR (v1 BETWEEN 7 AND 79)) AND (v1<=45 AND v2<=11) OR (v1 BETWEEN 16 AND 65 AND v2<53 AND v3<>15 AND v4>22));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{31, 24, 26, 69, 25}, sql.Row{55, 50, 36, 73, 58}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<11) OR (v1<=38 AND v2>=93 AND v3<=34 AND v4>7));`, - Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=97 AND v3<>2) OR (v1=49 AND v2 BETWEEN 29 AND 30 AND v3<>97));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=64) OR (v1>21 AND v2 BETWEEN 0 AND 58)) OR (v1<15 AND v4 BETWEEN 63 AND 76 AND v2>84));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 24 AND 98 AND v2>0 AND v3>=87) OR (v1 BETWEEN 2 AND 3 AND v2 BETWEEN 15 AND 78));`, - Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{5, 3, 31, 22, 81}, sql.Row{34, 32, 16, 97, 29}, sql.Row{64, 57, 25, 97, 65}, sql.Row{33, 29, 72, 97, 93}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>37) OR (v1<=94 AND v2 BETWEEN 53 AND 65 AND v3>=9)) OR (v1<10 AND v3<>26 AND v4<91)) OR (v1<>21 AND v2<>24 AND v3<46));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>21 AND v2>27 AND v3>=97 AND v4 BETWEEN 25 AND 67) OR (v1>=66 AND v2<=56)) OR (v1=37));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=43 AND v2<48 AND v3<16 AND v4<=75) OR (v1<71));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>91 AND v2=91 AND v3>=15) OR (v1 BETWEEN 16 AND 30)) OR (v1<>27 AND v4=62));`, - Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{78, 73, 91, 56, 0}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=54 AND v3>26 AND v4>30 AND v2 BETWEEN 3 AND 8) OR (v1>8 AND v2<=43 AND v3<>97));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=38 AND v2<>11 AND v3>=26) OR (v1 BETWEEN 37 AND 90 AND v4<85 AND v2<0)) OR (v1<>23));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<20 AND v2<>84 AND v3<25 AND v4>=93) OR (v1<13));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=81 AND v2 BETWEEN 55 AND 77 AND v3=64) OR (v1=20 AND v2=21));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>30 AND v2 BETWEEN 58 AND 72 AND v3<=35) OR (v1 BETWEEN 28 AND 28 AND v2>=76)) OR (v1=74 AND v2<26));`, - Expected: []sql.Row{sql.Row{91, 87, 66, 8, 22}, sql.Row{79, 74, 22, 42, 16}, sql.Row{84, 82, 70, 5, 47}, sql.Row{45, 38, 71, 22, 37}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>5 AND v2>8) OR (v1>78 AND v2<=39 AND v3>=41 AND v4<=35)) AND (v1<=11 AND v2<35 AND v3<=10 AND v4<76) OR (v1>=22)) OR (v1=1 AND v4<>29 AND v2 BETWEEN 64 AND 81 AND v3>46));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=49) OR (v1<43 AND v2>=34));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=72) OR (v1<>17)) OR (v1=47 AND v2<>1 AND v3 BETWEEN 75 AND 78 AND v4 BETWEEN 10 AND 44)) OR (v1>=64 AND v2>=74 AND v3=10 AND v4 BETWEEN 11 AND 93));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<2 AND v2<>94) OR (v1<>76 AND v2=27 AND v3<=31 AND v4<38));`, - Expected: []sql.Row{sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>11 AND v2>47 AND v3>=67 AND v4=29) OR (v1>=59 AND v3 BETWEEN 4 AND 29 AND v4>=65 AND v2<>96)) OR (v1<=62)) OR (v1<61 AND v2<>28 AND v3<>8 AND v4<>30));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 36 AND 72) OR (v1<>48 AND v4>91 AND v2<5 AND v3>=38)) OR (v1<>17 AND v3=50));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<86) OR (v1<=5 AND v2<25 AND v3<>24)) OR (v1<32 AND v3 BETWEEN 51 AND 54 AND v4<=70));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=6) OR (v1 BETWEEN 24 AND 89)) OR (v1<87 AND v2=35 AND v3=19)) AND (v1>94 AND v2=33 AND v3>28) OR (v1 BETWEEN 36 AND 40));`, - Expected: []sql.Row{sql.Row{43, 37, 35, 6, 44}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{45, 38, 71, 22, 37}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=24 AND v2=61 AND v3<49 AND v4<82) OR (v1<4 AND v2>51 AND v3=9));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 0 AND 87 AND v2>=44 AND v3<>68 AND v4=50) OR (v1<1 AND v4<66 AND v2<11 AND v3<>44));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1<17 AND v2<54) AND (v1>=70 AND v2 BETWEEN 53 AND 53 AND v3>10 AND v4=17);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=21 AND v2>25 AND v3>=7) OR (v1 BETWEEN 23 AND 88 AND v2<=26 AND v3>=87 AND v4 BETWEEN 42 AND 95)) OR (v1<4 AND v2>=66 AND v3<=24 AND v4=10)) OR (v1>69));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 0 AND 39) OR (v1<18 AND v4>=90));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<99 AND v2>1 AND v3<=56) OR (v1>36 AND v2=53 AND v3>17)) OR (v1<>71)) AND (v1 BETWEEN 2 AND 86 AND v2<>78 AND v3<>29 AND v4<>63);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=5) OR (v1=53));`, - Expected: []sql.Row{sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{8, 4, 27, 77, 5}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{7, 4, 10, 53, 69}, sql.Row{61, 53, 6, 53, 89}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>12 AND v2 BETWEEN 27 AND 46 AND v3 BETWEEN 19 AND 27 AND v4>=50) OR (v1 BETWEEN 17 AND 88)) OR (v1<=36 AND v2<=37 AND v3<64)) OR (v1<>82 AND v2>84 AND v3>=90)) AND (v1>34 AND v3>4);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=82) OR (v1<=95 AND v2<>23 AND v3<18 AND v4<>50));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=51) AND (v1=55 AND v2>=59 AND v3>=49) OR (v1>5 AND v2<34));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>4 AND v2<=21 AND v3>=15) OR (v1=93 AND v2>=1 AND v3<>63)) OR (v1 BETWEEN 24 AND 86 AND v3<=5));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<63 AND v2<>32 AND v3>=14) OR (v1=18 AND v3 BETWEEN 4 AND 42 AND v4>10)) OR (v1<23 AND v2>=21));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>34 AND v3 BETWEEN 27 AND 48 AND v4<=11 AND v2>42) AND (v1<>47 AND v2<48 AND v3<=47 AND v4<>12) OR (v1<=36 AND v2<>17));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=34 AND v2<=80 AND v3<=27) AND (v1 BETWEEN 0 AND 33) OR (v1<=56 AND v2=50 AND v3 BETWEEN 0 AND 5 AND v4<>31));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=93 AND v2<>5) OR (v1>=81 AND v4=9 AND v2>33 AND v3<99));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=37 AND v2=4 AND v3=3) AND (v1=12 AND v2>9 AND v3<89 AND v4<>12) OR (v1=1 AND v2=43 AND v3<=2));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=82) OR (v1<=4 AND v2>=51)) OR (v1=58 AND v4<86));`, - Expected: []sql.Row{sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=42 AND v4<85 AND v2<8 AND v3<3) OR (v1>=78 AND v2<>28 AND v3<52)) OR (v1<8 AND v2<>76 AND v3 BETWEEN 36 AND 70)) OR (v1=70));`, - Expected: []sql.Row{sql.Row{90, 87, 23, 16, 63}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{7, 4, 10, 53, 69}, sql.Row{73, 70, 40, 19, 5}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>69) OR (v1>=43));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 39 AND 76 AND v4>16 AND v2<>15 AND v3<>35) AND (v1<>50 AND v2>21 AND v3 BETWEEN 27 AND 90 AND v4>18) OR (v1<25 AND v4=58));`, - Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{67, 64, 26, 77, 97}, sql.Row{59, 51, 97, 39, 36}, sql.Row{46, 39, 45, 75, 55}, sql.Row{50, 43, 66, 85, 66}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=62) OR (v1 BETWEEN 24 AND 36 AND v2>=94 AND v3 BETWEEN 10 AND 55 AND v4>=89));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=31) OR (v1<=95 AND v2<=26 AND v3 BETWEEN 40 AND 72)) OR (v1<51 AND v2=23));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{31, 24, 26, 69, 25}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{7, 4, 10, 53, 69}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=3) OR (v1>40)) AND (v1>66 AND v2>33);`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=69 AND v2=61 AND v3=87 AND v4 BETWEEN 63 AND 87) OR (v1 BETWEEN 48 AND 62)) OR (v1<>81 AND v2<=67 AND v3<>43));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=19) AND (v1<=20 AND v2>=2) OR (v1 BETWEEN 12 AND 53 AND v4>=1 AND v2<43 AND v3<59));`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=42 AND v2<=65) AND (v1<=21) OR (v1<=14 AND v2<>1 AND v3<62));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>5) OR (v1<96 AND v2>=14)) OR (v1<>96)) AND (v1<>51 AND v3>41);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>97 AND v3<>77 AND v4=30 AND v2<>45) OR (v1=36 AND v2<77 AND v3>94)) OR (v1=26));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 34 AND 37 AND v3>23 AND v4>31) OR (v1 BETWEEN 43 AND 81 AND v3>=54 AND v4>=72));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{76, 71, 48, 89, 99}, sql.Row{68, 64, 41, 74, 85}, sql.Row{67, 64, 26, 77, 97}, sql.Row{38, 34, 55, 37, 34}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=17 AND v2<>19) OR (v1>45));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=57) OR (v1>=1 AND v2<=5 AND v3>=10 AND v4<5)) OR (v1>55));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=23 AND v2<=48) OR (v1>41 AND v2>=46 AND v3 BETWEEN 11 AND 29)) AND (v1<>11) OR (v1=70 AND v3<54 AND v4<=47 AND v2<>62));`, - Expected: []sql.Row{sql.Row{65, 63, 50, 20, 43}, sql.Row{62, 53, 48, 19, 36}, sql.Row{92, 88, 57, 12, 88}, sql.Row{74, 70, 56, 21, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{73, 70, 40, 19, 5}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>73) OR (v1>5 AND v2>=7 AND v3>=43 AND v4<=53)) OR (v1<34 AND v2<95 AND v3 BETWEEN 9 AND 81 AND v4<>8)) AND (v1<=68 AND v4>48 AND v2>11 AND v3 BETWEEN 17 AND 89) OR (v1=41 AND v2 BETWEEN 56 AND 93));`, - Expected: []sql.Row{sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{15, 8, 54, 46, 87}, sql.Row{36, 33, 53, 56, 88}, sql.Row{5, 3, 31, 22, 81}, sql.Row{13, 7, 21, 75, 70}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>3 AND v3>=34) OR (v1<>31 AND v2<16 AND v3<8));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 88 AND 97) OR (v1>67 AND v4<=27 AND v2<5 AND v3>40)) OR (v1 BETWEEN 5 AND 83 AND v2>=34 AND v3=59));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{94, 89, 91, 7, 45}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>96 AND v2<=2 AND v3=17 AND v4<79) OR (v1=67 AND v2=30 AND v3=38 AND v4=53));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>45 AND v2>76) OR (v1=30 AND v2=53));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{37, 33, 86, 12, 22}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 3 AND 34 AND v2>39) OR (v1>1 AND v2>=92 AND v3=99)) OR (v1>=36 AND v2<>65 AND v3=69));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=54 AND v2=38 AND v3>=64 AND v4>36) OR (v1<=48)) OR (v1<37 AND v2=13 AND v3<20));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>70) OR (v1<>2 AND v2>79 AND v3<>6 AND v4<>42));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>46 AND v2>93 AND v3>19) AND (v1<51 AND v2=39) OR (v1<61)) AND (v1<>22);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=53 AND v2>0 AND v3=95 AND v4<=2) OR (v1<41 AND v4<10 AND v2 BETWEEN 11 AND 35)) OR (v1=11 AND v2<20 AND v3=51 AND v4<>30));`, - Expected: []sql.Row{sql.Row{35, 33, 29, 69, 6}, sql.Row{8, 4, 27, 77, 5}, sql.Row{27, 21, 21, 32, 8}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=32 AND v2>6 AND v3=55) OR (v1=87 AND v2<=80)) OR (v1=88 AND v2<=87 AND v3>=45));`, - Expected: []sql.Row{sql.Row{90, 87, 23, 16, 63}, sql.Row{91, 87, 66, 8, 22}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>8) OR (v1 BETWEEN 16 AND 25 AND v2<>79 AND v3>=55 AND v4<=5));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=45 AND v2>55 AND v3<90) OR (v1>26 AND v2>=2 AND v3<>85 AND v4<=74));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=59) OR (v1<>85 AND v4<6 AND v2 BETWEEN 14 AND 82));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{66, 64, 23, 33, 5}, sql.Row{8, 4, 27, 77, 5}, sql.Row{60, 52, 72, 44, 2}, sql.Row{19, 10, 36, 27, 5}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=94 AND v2>32 AND v3>61) OR (v1>51 AND v4>84 AND v2>=46)) OR (v1=39));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{92, 88, 57, 12, 88}, sql.Row{46, 39, 45, 75, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=89) OR (v1<=28 AND v2=13));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{93, 89, 1, 27, 50}, sql.Row{94, 89, 91, 7, 45}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=5 AND v2<65 AND v3<64 AND v4=81) OR (v1<=75)) AND (v1=87);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=31 AND v4>30 AND v2<>38) OR (v1<>35)) OR (v1<=8 AND v2<43 AND v3<=50 AND v4<=33));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((((v1>65 AND v2=89 AND v3>12) OR (v1 BETWEEN 37 AND 75 AND v2=42 AND v3<=14)) OR (v1>=87 AND v2=85)) OR (v1<>48 AND v4 BETWEEN 32 AND 33 AND v2>21 AND v3<=25)) OR (v1 BETWEEN 51 AND 88 AND v2<>67));`, - Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>82) OR (v1<1 AND v3>=22)) AND (v1=4) OR (v1>27 AND v2 BETWEEN 7 AND 79 AND v3 BETWEEN 9 AND 29 AND v4<85));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{45, 38, 71, 22, 37}, sql.Row{73, 70, 40, 19, 5}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=41 AND v2<13 AND v3 BETWEEN 62 AND 87) AND (v1<=67 AND v2>68 AND v3=56 AND v4>28);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 23 AND 34 AND v2 BETWEEN 4 AND 75 AND v3<91) OR (v1>=31));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<59) OR (v1 BETWEEN 6 AND 86 AND v4<97)) OR (v1<>90 AND v2=43 AND v3=29));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=1 AND v2<34) OR (v1<78));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=10 AND v2<>64 AND v3>25 AND v4<29) OR (v1>39));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>35 AND v2>=14 AND v3<65 AND v4<>9) OR (v1<>14 AND v3<51 AND v4<32)) OR (v1>=21 AND v3<>25 AND v4<>16));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>12 AND v2<0) OR (v1=36 AND v3<37));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1=83 AND v3>=72 AND v4<=74) AND (v1>61 AND v2 BETWEEN 32 AND 44);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1=78 AND v2>28 AND v3<=47) AND (v1<35 AND v2=69 AND v3>16);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 31 AND 49 AND v2=20 AND v3 BETWEEN 8 AND 46) AND (v1<>57 AND v2<5);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=39 AND v2<>3) OR (v1=97 AND v2<>37));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=19 AND v4<>62 AND v2<>19 AND v3<>29) OR (v1 BETWEEN 37 AND 75 AND v4<23 AND v2 BETWEEN 6 AND 43));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<8 AND v2<=33 AND v3 BETWEEN 54 AND 85) OR (v1=46));`, - Expected: []sql.Row{sql.Row{8, 4, 27, 77, 5}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=69 AND v2<8) AND (v1>=34 AND v2>=99 AND v3>96 AND v4 BETWEEN 36 AND 99) OR (v1=0 AND v2>=71));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 20 AND 54 AND v2<>31 AND v3 BETWEEN 15 AND 21) OR (v1<=46 AND v3>76)) OR (v1 BETWEEN 31 AND 71));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>37 AND v2<>5 AND v3=8 AND v4 BETWEEN 26 AND 50) OR (v1>=53)) AND (v1 BETWEEN 5 AND 80);`, - Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=25) OR (v1<=87));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=99 AND v2>=85) AND (v1<=83 AND v2=99) OR (v1<=6 AND v2 BETWEEN 36 AND 68 AND v3>62 AND v4=79));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 30 AND 32 AND v2<68 AND v3<24) AND (v1>=32);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>62 AND v2>0) OR (v1<>80 AND v2>55 AND v3=10 AND v4=91));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=7 AND v2 BETWEEN 55 AND 81) OR (v1<>56 AND v2<=76 AND v3<>36)) AND (v1<56 AND v2<>69 AND v3=25);`, - Expected: []sql.Row{}, - }, - { - Query: ``, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>18) OR (v1>=42 AND v2<=65 AND v3=87 AND v4=80));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=27) OR (v1<23 AND v2>=41));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>71 AND v4>0) OR (v1<48 AND v2=89 AND v3>=46 AND v4<=32)) OR (v1<62 AND v2>=33 AND v3>58)) OR (v1>=31 AND v3<>71));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 9 AND 40 AND v3<=43 AND v4=62 AND v2>=43) OR (v1=61 AND v2>12 AND v3 BETWEEN 0 AND 13 AND v4>=8));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<58) OR (v1 BETWEEN 17 AND 20 AND v2<>99 AND v3<=76)) OR (v1 BETWEEN 48 AND 87)) OR (v1<39 AND v2 BETWEEN 48 AND 94 AND v3<>0));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=33) OR (v1 BETWEEN 7 AND 41 AND v2<82 AND v3<53 AND v4<>3));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=9 AND v4=22 AND v2>=95) OR (v1>96));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=56) OR (v1>=31 AND v4<38 AND v2>20)) OR (v1=91 AND v2<48));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=75 AND v4<=30) OR (v1>=41 AND v2 BETWEEN 16 AND 25 AND v3>=99));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 2 AND 64) OR (v1>=23));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=26 AND v2<1 AND v3=82 AND v4<=42) OR (v1 BETWEEN 42 AND 73));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=23 AND v2<=10) AND (v1>=75 AND v4 BETWEEN 24 AND 68) AND (v1>44 AND v2>8 AND v3<=16);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((((v1>6 AND v2>61 AND v3=0 AND v4>=76) OR (v1<23)) OR (v1<>46 AND v2=29 AND v3>4)) OR (v1>=59)) OR (v1=87 AND v2<=98 AND v3>=47));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=59 AND v2 BETWEEN 15 AND 53 AND v3<>17 AND v4>=10) OR (v1 BETWEEN 37 AND 95 AND v2<=32 AND v3>=81));`, - Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 6 AND 92 AND v2=75 AND v3>79) OR (v1>=10)) OR (v1<=35 AND v2<=42)) AND (v1<>65);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>84 AND v4<=53 AND v2=77 AND v3>=40) OR (v1>78 AND v2<>1 AND v3=98 AND v4>=76));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>79 AND v2<=85) OR (v1<>13)) OR (v1 BETWEEN 4 AND 67));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>34) OR (v1<35 AND v2>=93)) OR (v1>8));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((((v1<65) OR (v1<>44)) OR (v1<=39 AND v3>=14)) OR (v1<=33 AND v2<>11)) OR (v1=75 AND v2=0 AND v3<28));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>50 AND v2>=46) AND (v1<>17 AND v2=45 AND v3<=79) OR (v1=10 AND v2>=35)) AND (v1=44 AND v2=38);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<34) OR (v1<=62 AND v4<>18 AND v2 BETWEEN 1 AND 41)) OR (v1>=65 AND v2>=93 AND v3 BETWEEN 34 AND 41));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>8) OR (v1>20 AND v4>=99));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>57) OR (v1<87 AND v2<>91 AND v3 BETWEEN 47 AND 98));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=57) OR (v1=88 AND v2 BETWEEN 72 AND 93));`, - Expected: []sql.Row{sql.Row{64, 57, 25, 97, 65}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>10 AND v2=20 AND v3<=21 AND v4<>88) OR (v1<28 AND v2 BETWEEN 38 AND 59 AND v3<>98 AND v4>=26));`, - Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{1, 0, 55, 14, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>5 AND v3<>53 AND v4>=49) OR (v1<18 AND v2<94));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{25, 17, 75, 86, 18}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<52 AND v2 BETWEEN 33 AND 75 AND v3=32) OR (v1<=98 AND v2<=41 AND v3<>87 AND v4<>83));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>28 AND v4>57 AND v2<62 AND v3 BETWEEN 14 AND 41) AND (v1<>72 AND v2>=13 AND v3>29 AND v4>38) OR (v1<=22 AND v2>58));`, - Expected: []sql.Row{sql.Row{11, 5, 76, 70, 46}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{25, 17, 75, 86, 18}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=13 AND v2<=52 AND v3=28 AND v4>88) OR (v1<>5 AND v2<=42));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>35 AND v4<>20 AND v2<81 AND v3=27) OR (v1>13 AND v3=27));`, - Expected: []sql.Row{sql.Row{40, 34, 89, 27, 90}, sql.Row{93, 89, 1, 27, 50}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=26) OR (v1<59 AND v2 BETWEEN 2 AND 30 AND v3>=69));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<11) OR (v1<>9 AND v2 BETWEEN 51 AND 62 AND v3=98));`, - Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=92 AND v2>25) OR (v1=91 AND v2=21 AND v3<=18 AND v4<>15)) OR (v1=79 AND v2>67 AND v3<>48 AND v4<42));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=86 AND v2<5 AND v3<36 AND v4<81) OR (v1>=52 AND v2>24 AND v3<5)) OR (v1 BETWEEN 5 AND 80 AND v3<>80));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>67) OR (v1>69 AND v2>11 AND v3=13 AND v4=20));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>31) OR (v1 BETWEEN 27 AND 87 AND v2=71 AND v3=38 AND v4=1));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>2 AND v4=0 AND v2 BETWEEN 6 AND 23 AND v3 BETWEEN 46 AND 52) OR (v1<=63 AND v2>=71 AND v3=28)) AND (v1<=52);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 10 AND 90) AND (v1=86 AND v4>=4) AND (v1 BETWEEN 6 AND 58 AND v2=85);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=46 AND v4>41 AND v2<>12) OR (v1>17 AND v2>=34 AND v3<>68 AND v4<=13)) OR (v1>=98 AND v4 BETWEEN 3 AND 62 AND v2=39));`, - Expected: []sql.Row{sql.Row{78, 73, 91, 56, 0}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=12 AND v2<>4 AND v3 BETWEEN 18 AND 42) OR (v1>=73)) OR (v1<60 AND v2=93 AND v3>=79));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{10, 5, 32, 30, 48}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{18, 9, 19, 38, 35}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=55 AND v2>50) OR (v1<>51 AND v2>=37));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 66 AND 76 AND v2>=84 AND v3>1 AND v4 BETWEEN 71 AND 95) AND (v1>36 AND v2<>41) OR (v1<44 AND v2<=50 AND v3=36 AND v4<=42));`, - Expected: []sql.Row{sql.Row{44, 37, 41, 36, 10}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=21 AND v2=44 AND v3>=68) OR (v1>=38 AND v2>=15));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1<>37 AND v2>67 AND v3>52) AND (v1<48 AND v2<>73 AND v3=25 AND v4=22);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 57 AND 62 AND v2>=99) OR (v1>31));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>22 AND v3<>49) OR (v1>=41 AND v2<=74 AND v3<=46));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=82 AND v4<=67 AND v2=40) OR (v1>63)) OR (v1<=16));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=39 AND v2<>82 AND v3>=33 AND v4>=84) OR (v1=57 AND v2<25 AND v3<>55 AND v4<=82)) OR (v1>10 AND v2>28 AND v3>=65)) OR (v1<=13 AND v2=66));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{82, 82, 29, 66, 71}, sql.Row{17, 9, 7, 74, 92}, sql.Row{15, 8, 54, 46, 87}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{46, 39, 45, 75, 55}, sql.Row{25, 17, 75, 86, 18}, sql.Row{97, 93, 56, 71, 53}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=60 AND v2<=25 AND v3<>9) OR (v1 BETWEEN 19 AND 92 AND v2>=33 AND v3<=40 AND v4=53));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{61, 53, 6, 53, 89}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=21 AND v2<=27 AND v3>=86 AND v4>99) OR (v1<76 AND v2<>97));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 4 AND 8 AND v3>=12) OR (v1>=12 AND v2>=0 AND v3=18));`, - Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>65 AND v2<=52 AND v3>37) OR (v1>11)) OR (v1<=54 AND v2 BETWEEN 30 AND 85 AND v3 BETWEEN 14 AND 27 AND v4>=35)) OR (v1>44 AND v2<>76 AND v3>=52));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=54) OR (v1<17 AND v2=34 AND v3>=59));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>9 AND v4<>61 AND v2=98 AND v3<1) OR (v1<2 AND v2 BETWEEN 3 AND 70));`, - Expected: []sql.Row{sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{1, 0, 55, 14, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=6 AND v2>93) OR (v1 BETWEEN 38 AND 46));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{46, 39, 45, 75, 55}, sql.Row{47, 41, 1, 85, 9}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 16 AND 72) OR (v1=20)) OR (v1>61 AND v2<>48 AND v3<>83 AND v4=46)) OR (v1=5 AND v2=59));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>41 AND v2>74 AND v3>37 AND v4<38) OR (v1=58 AND v2>=1)) OR (v1<=4 AND v2>0 AND v3 BETWEEN 39 AND 72 AND v4>=29));`, - Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{59, 51, 97, 39, 36}, sql.Row{7, 4, 10, 53, 69}, sql.Row{69, 64, 77, 41, 17}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>53 AND v4<99 AND v2<>31) OR (v1<>5 AND v2>70 AND v3>=71));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>1 AND v4=93) OR (v1<10 AND v2 BETWEEN 40 AND 74 AND v3>=27));`, - Expected: []sql.Row{sql.Row{15, 8, 54, 46, 87}, sql.Row{3, 1, 72, 29, 21}, sql.Row{33, 29, 72, 97, 93}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=92 AND v2>=64 AND v3=39 AND v4 BETWEEN 16 AND 53) OR (v1<54 AND v2 BETWEEN 8 AND 17 AND v3=21 AND v4=86));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 16 AND 31 AND v4 BETWEEN 18 AND 96) OR (v1=40 AND v2<=35 AND v3>=51 AND v4>=83));`, - Expected: []sql.Row{sql.Row{28, 22, 21, 28, 78}, sql.Row{31, 24, 26, 69, 25}, sql.Row{29, 22, 98, 22, 21}, sql.Row{25, 17, 75, 86, 18}, sql.Row{33, 29, 72, 97, 93}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 68 AND 78 AND v2>96 AND v3<58 AND v4<14) OR (v1=71)) AND (v1>15 AND v2>=19) OR (v1>36));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 33 AND 71 AND v2<=61 AND v3<=32 AND v4 BETWEEN 18 AND 73) AND (v1<3) AND (v1<=59 AND v2=47 AND v3<49 AND v4>36);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<77 AND v2=43 AND v3<92 AND v4=13) OR (v1=38 AND v2<=46)) OR (v1 BETWEEN 10 AND 79 AND v2>=11 AND v3 BETWEEN 14 AND 14));`, - Expected: []sql.Row{sql.Row{24, 17, 49, 14, 7}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=47 AND v4=13) AND (v1<=27 AND v3<54 AND v4 BETWEEN 27 AND 40) OR (v1>=40 AND v4=98 AND v2=25 AND v3>66));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<98 AND v3 BETWEEN 80 AND 82) OR (v1 BETWEEN 31 AND 38 AND v2=39));`, - Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=75 AND v2 BETWEEN 45 AND 51 AND v3<15) OR (v1>=74 AND v2>=37 AND v3<76));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=40) OR (v1<>32 AND v4<=37));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>63 AND v3 BETWEEN 43 AND 50 AND v4<29 AND v2>=89) OR (v1>80));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=81) OR (v1>=27 AND v2>=21 AND v3 BETWEEN 1 AND 63 AND v4>=92));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>13) OR (v1>72 AND v2=2 AND v3<=40)) OR (v1>77 AND v2<21));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>54 AND v2>23 AND v3 BETWEEN 28 AND 48 AND v4>=37) OR (v1>93 AND v2>=51 AND v3<9 AND v4<>49)) OR (v1>=71 AND v2<>33));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{10, 5, 32, 30, 48}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 15 AND 69 AND v4=83 AND v2<=43) OR (v1<51 AND v2<24 AND v3<>27 AND v4<>50)) OR (v1<>37));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 55 AND 66 AND v2<>81 AND v3=6 AND v4<=19) OR (v1<>91));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=21 AND v2<50 AND v3>=39) OR (v1<=79 AND v4>62 AND v2=31));`, - Expected: []sql.Row{sql.Row{5, 3, 31, 22, 81}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>78) OR (v1>=9 AND v2<>84));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>16 AND v3>=29) OR (v1>=47 AND v2<>63));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=16 AND v2>=9 AND v3<>48) OR (v1>=76 AND v2<>86)) OR (v1<28 AND v2=1 AND v3<=23 AND v4 BETWEEN 13 AND 55));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=35 AND v2>67) OR (v1<>55));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<89 AND v2<5 AND v3 BETWEEN 53 AND 61) OR (v1<>72 AND v3<20));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{24, 17, 49, 14, 7}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=58 AND v2<=89 AND v3=78 AND v4<=58) OR (v1>39)) AND (v1<>25 AND v2>1 AND v3<18);`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>94) OR (v1=33 AND v2 BETWEEN 53 AND 60 AND v3 BETWEEN 37 AND 73));`, - Expected: []sql.Row{sql.Row{36, 33, 53, 56, 88}, sql.Row{100, 96, 73, 38, 38}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=40 AND v2<>8 AND v3<=69) OR (v1<=72)) OR (v1 BETWEEN 87 AND 89 AND v2 BETWEEN 52 AND 58));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<9 AND v2=97 AND v3<>54 AND v4>71) OR (v1>48 AND v2 BETWEEN 7 AND 23 AND v3<>95 AND v4>86)) OR (v1 BETWEEN 36 AND 90));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=38 AND v2<70) OR (v1>79));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<47 AND v2 BETWEEN 22 AND 85) AND (v1=73) OR (v1<42));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<29) AND (v1<41 AND v2>52 AND v3<>55) OR (v1 BETWEEN 16 AND 28 AND v2>=9 AND v3=43 AND v4<6));`, - Expected: []sql.Row{sql.Row{11, 5, 76, 70, 46}, sql.Row{15, 8, 54, 46, 87}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{25, 17, 75, 86, 18}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<56 AND v2<=52) OR (v1>=30 AND v2<73 AND v3>40 AND v4>=13)) AND (v1<30 AND v4<>25 AND v2<>82 AND v3 BETWEEN 80 AND 88);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 9 AND 53 AND v2 BETWEEN 26 AND 56) OR (v1 BETWEEN 29 AND 72 AND v2<18 AND v3=73 AND v4<=12));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{21, 12, 42, 15, 31}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{38, 34, 55, 37, 34}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>96 AND v2<27) OR (v1<82)) AND (v1>=80 AND v2 BETWEEN 14 AND 53);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>86) OR (v1>=48 AND v4>9));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=41 AND v2=79 AND v3<16 AND v4>=2) OR (v1<16 AND v4>59));`, - Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{23, 15, 42, 17, 60}, sql.Row{17, 9, 7, 74, 92}, sql.Row{0, 0, 33, 2, 67}, sql.Row{15, 8, 54, 46, 87}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=69 AND v2 BETWEEN 38 AND 45) AND (v1<>35 AND v2<28 AND v3>14);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=93 AND v2<=10 AND v3 BETWEEN 21 AND 83) AND (v1<>5 AND v2>59 AND v3<>17) OR (v1<69 AND v3<>65 AND v4>=51 AND v2<=48)) OR (v1 BETWEEN 37 AND 57 AND v2 BETWEEN 44 AND 57 AND v3<40 AND v4=98));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{0, 0, 33, 2, 67}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<46) OR (v1<>60));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<97 AND v2<=47 AND v3=91) OR (v1=74 AND v4>72 AND v2<>44 AND v3 BETWEEN 4 AND 51));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 26 AND 60 AND v2>53 AND v3<=9 AND v4<8) OR (v1>0 AND v2<=69));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=33 AND v2<2 AND v3<>63) OR (v1 BETWEEN 20 AND 95 AND v2<>7 AND v3 BETWEEN 95 AND 96 AND v4 BETWEEN 34 AND 41)) OR (v1 BETWEEN 27 AND 44 AND v4<>28 AND v2<=43 AND v3<=64));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{43, 37, 35, 6, 44}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 13 AND 36 AND v2>40) OR (v1<>28 AND v2<29)) OR (v1 BETWEEN 36 AND 89 AND v2>=92 AND v3>39 AND v4<16)) OR (v1<=1));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=68 AND v2=49) OR (v1<=35 AND v2>=59 AND v3>=88 AND v4 BETWEEN 1 AND 62));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>33) OR (v1<23 AND v4<=23 AND v2>=41));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=78 AND v2=26 AND v3 BETWEEN 70 AND 89) OR (v1 BETWEEN 12 AND 78 AND v2>41 AND v3 BETWEEN 2 AND 11 AND v4 BETWEEN 12 AND 97)) OR (v1>16 AND v2=85 AND v3<56 AND v4<19));`, - Expected: []sql.Row{sql.Row{70, 66, 97, 6, 39}, sql.Row{57, 50, 79, 10, 12}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=51 AND v2=3 AND v3>48 AND v4>=49) OR (v1>25 AND v3=37));`, - Expected: []sql.Row{sql.Row{38, 34, 55, 37, 34}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<4 AND v2<>1 AND v3<=34) OR (v1>=63)) OR (v1<58 AND v2=33)) AND (v1<=55) OR (v1 BETWEEN 1 AND 80 AND v2<=51));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 33 AND 82 AND v2<26) OR (v1>=98 AND v4>30 AND v2 BETWEEN 47 AND 67 AND v3 BETWEEN 9 AND 54)) OR (v1>=5)) AND (v1<>85 AND v4<>31);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=82 AND v3<>55 AND v4>26) OR (v1=35)) OR (v1 BETWEEN 18 AND 70 AND v2>=17));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>45 AND v2<=55 AND v3>=2 AND v4<46) OR (v1>=0 AND v2<>6));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=85 AND v2>=46 AND v3=87 AND v4>3) OR (v1=52));`, - Expected: []sql.Row{sql.Row{60, 52, 72, 44, 2}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<90 AND v4=77) OR (v1<>32 AND v2<=17 AND v3=68)) OR (v1<41));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=2) AND (v1>=13 AND v2<=23 AND v3<=23) OR (v1 BETWEEN 18 AND 57));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 32 AND 72 AND v2<>89 AND v3>=39) OR (v1>50 AND v4>80));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{89, 86, 7, 57, 96}, sql.Row{42, 36, 7, 40, 16}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<44) OR (v1<>37 AND v2<=12 AND v3>65 AND v4<47)) OR (v1<>76));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 29 AND 37) OR (v1<>54 AND v2<=65 AND v3<=1 AND v4<>10)) OR (v1<>55 AND v2 BETWEEN 49 AND 56 AND v3>=25 AND v4<=8));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{35, 33, 29, 69, 6}, sql.Row{43, 37, 35, 6, 44}, sql.Row{95, 90, 25, 0, 17}, sql.Row{36, 33, 53, 56, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{33, 29, 72, 97, 93}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=80 AND v2<95 AND v3>6) OR (v1 BETWEEN 7 AND 14 AND v2 BETWEEN 27 AND 49 AND v3>57 AND v4 BETWEEN 28 AND 60));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>10 AND v2<43 AND v3<>15) OR (v1<=71 AND v4<>22));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 18 AND 36 AND v4<>87 AND v2>=13) OR (v1>=63 AND v3<=89)) AND (v1<76 AND v4<49 AND v2<=96);`, - Expected: []sql.Row{sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{74, 70, 56, 21, 22}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<93 AND v2<>16) OR (v1>=23 AND v4>=19)) OR (v1<48 AND v2<=45 AND v3<>46 AND v4>76)) AND (v1=22 AND v3=41) OR (v1<=17 AND v2>=41));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{25, 17, 75, 86, 18}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>17 AND v4>50 AND v2 BETWEEN 11 AND 23 AND v3=23) OR (v1<73));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 5 AND 41 AND v3<78 AND v4<41) OR (v1>84 AND v2<>43));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{35, 33, 29, 69, 6}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{16, 8, 99, 43, 1}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{18, 9, 19, 38, 35}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=24 AND v2 BETWEEN 43 AND 84) OR (v1>=90 AND v2>1 AND v3<>70)) OR (v1>=66 AND v2<95));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=18 AND v2<=70) OR (v1>55 AND v2>52 AND v3<>70)) OR (v1=58)) AND (v1<>22 AND v4>76) OR (v1>14 AND v2<32 AND v3>97));`, - Expected: []sql.Row{sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{15, 8, 54, 46, 87}, sql.Row{5, 3, 31, 22, 81}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=9 AND v2>69) AND (v1 BETWEEN 39 AND 73);`, - Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{57, 50, 79, 10, 12}, sql.Row{60, 52, 72, 44, 2}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<87 AND v2 BETWEEN 2 AND 34 AND v3=87 AND v4>=76) OR (v1<>77 AND v2<=44 AND v3>34));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{35, 33, 29, 69, 6}, sql.Row{68, 64, 41, 74, 85}, sql.Row{82, 82, 29, 66, 71}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{86, 83, 41, 53, 57}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=9 AND v4>=68 AND v2>21) OR (v1=5 AND v2<69 AND v3<=15 AND v4>=61));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=22) OR (v1>55));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 47 AND 57 AND v2>=83) OR (v1=91 AND v2>34));`, - Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{59, 51, 97, 39, 36}, sql.Row{58, 50, 97, 0, 79}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 23 AND 25) AND (v1<98 AND v2>=20 AND v3>37);`, - Expected: []sql.Row{sql.Row{31, 24, 26, 69, 25}, sql.Row{32, 24, 45, 96, 0}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=6) OR (v1>61 AND v2<=34)) OR (v1>10 AND v2<>50 AND v3<>62 AND v4<=84));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>74) OR (v1<>86 AND v2<=91)) AND (v1>=8);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>25 AND v2 BETWEEN 23 AND 54) OR (v1<>40 AND v3>90)) OR (v1<>7 AND v4<=78));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=25) OR (v1>40 AND v2 BETWEEN 26 AND 40 AND v3<76));`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{85, 83, 37, 36, 16}, sql.Row{55, 50, 36, 73, 58}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=13 AND v2<85) OR (v1=23 AND v2<>68 AND v3=33));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<42 AND v2>95 AND v3>17 AND v4<>97) OR (v1>=13 AND v2<>10 AND v3 BETWEEN 73 AND 85 AND v4=48)) OR (v1>55 AND v2=85 AND v3>30));`, - Expected: []sql.Row{sql.Row{16, 8, 99, 43, 1}, sql.Row{29, 22, 98, 22, 21}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 5 AND 32) OR (v1>7)) OR (v1=34));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=34 AND v2<>61 AND v3<>3) AND (v1 BETWEEN 69 AND 93) AND (v1=36 AND v2>14);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>75) OR (v1<>74 AND v3 BETWEEN 29 AND 73));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1<>91 AND v3=27 AND v4=22 AND v2<>68) AND (v1<=88);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>18 AND v2<>90 AND v3>95) OR (v1>=44)) OR (v1<4 AND v3<=26 AND v4<>67 AND v2>=37)) OR (v1<36 AND v2<=15 AND v3 BETWEEN 25 AND 36 AND v4<=14));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 44 AND 87 AND v2<52 AND v3<52 AND v4<1) OR (v1<30 AND v4 BETWEEN 8 AND 97 AND v2<=24));`, - Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{27, 21, 21, 32, 8}, sql.Row{7, 4, 10, 53, 69}, sql.Row{77, 73, 10, 2, 0}, sql.Row{18, 9, 19, 38, 35}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>48 AND v2<=83) OR (v1>28 AND v2 BETWEEN 9 AND 87 AND v3<>73)) OR (v1>=53 AND v2>=91 AND v3 BETWEEN 33 AND 97));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>8 AND v2 BETWEEN 34 AND 48) OR (v1<>54));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=78 AND v2<74 AND v3<42 AND v4>=34) OR (v1<=29 AND v2<=27 AND v3>31 AND v4 BETWEEN 35 AND 41));`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{5, 3, 31, 22, 81}, sql.Row{38, 34, 55, 37, 34}, sql.Row{45, 38, 71, 22, 37}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 9 AND 35 AND v4<=69 AND v2 BETWEEN 34 AND 53 AND v3<>28) AND (v1 BETWEEN 12 AND 48);`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{24, 17, 49, 14, 7}, sql.Row{30, 23, 43, 13, 11}, sql.Row{32, 24, 45, 96, 0}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 13 AND 77 AND v2>75 AND v3<73 AND v4>=6) AND (v1<=58 AND v2=48 AND v3 BETWEEN 33 AND 73);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>47 AND v3>47 AND v4 BETWEEN 51 AND 86 AND v2=26) OR (v1<82 AND v2<=17 AND v3<17 AND v4>=46));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>87) OR (v1>82 AND v4>=22)) OR (v1>=52 AND v2<>47 AND v3=37)) OR (v1<=14 AND v2<57 AND v3<10));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=99 AND v3<=41) AND (v1<>38 AND v2<94 AND v3 BETWEEN 83 AND 95 AND v4>=86);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>78) AND (v1>32 AND v2>11 AND v3>=78);`, - Expected: []sql.Row{sql.Row{87, 84, 56, 78, 18}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1<>3 AND v2=26 AND v3=22 AND v4<=76) AND (v1 BETWEEN 59 AND 92 AND v2 BETWEEN 36 AND 80);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>10) OR (v1=12));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=12 AND v3>=45 AND v4<98) OR (v1<>51 AND v3=79 AND v4<=24)) OR (v1 BETWEEN 4 AND 59 AND v4<82)) OR (v1>=29 AND v2<>21));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>10 AND v2<=75 AND v3>=70) OR (v1<89 AND v2<=32));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=15) OR (v1=15)) OR (v1 BETWEEN 14 AND 25 AND v4>55 AND v2<53 AND v3=95));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>48 AND v2 BETWEEN 4 AND 84 AND v3<=3 AND v4<>31) AND (v1 BETWEEN 2 AND 15 AND v3>75);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<41 AND v4=9 AND v2>77 AND v3=41) OR (v1>62 AND v2>=48 AND v3=13 AND v4>61)) OR (v1 BETWEEN 33 AND 75)) OR (v1 BETWEEN 45 AND 65 AND v4 BETWEEN 4 AND 68));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>20) OR (v1>=71 AND v4 BETWEEN 12 AND 20 AND v2<=30 AND v3 BETWEEN 14 AND 44)) AND (v1>97 AND v2=91 AND v3>=5) OR (v1>7 AND v2<34 AND v3<55 AND v4 BETWEEN 88 AND 97)) AND (v1 BETWEEN 2 AND 16 AND v2<>23 AND v3=75 AND v4>99);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=55 AND v2<13 AND v3<=96 AND v4>=49) OR (v1 BETWEEN 39 AND 98 AND v2=77 AND v3>85));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=74 AND v2<>13 AND v3<67 AND v4 BETWEEN 1 AND 70) OR (v1 BETWEEN 30 AND 50 AND v2<27 AND v3>=35));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{79, 74, 22, 42, 16}, sql.Row{42, 36, 7, 40, 16}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{51, 45, 9, 76, 9}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=76) OR (v1>22 AND v3<49 AND v4=2)) OR (v1=85 AND v4>79)) OR (v1=10 AND v2=47 AND v3 BETWEEN 6 AND 21 AND v4>97));`, - Expected: []sql.Row{sql.Row{81, 76, 74, 97, 18}, sql.Row{88, 85, 2, 3, 88}, sql.Row{60, 52, 72, 44, 2}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>38 AND v2>98) OR (v1<>29 AND v2=75)) OR (v1>58 AND v2<>49 AND v3 BETWEEN 25 AND 58));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{78, 73, 91, 56, 0}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>82 AND v4=74 AND v2=8 AND v3>=43) OR (v1=1 AND v2>=54 AND v3 BETWEEN 41 AND 91 AND v4>=0));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=26 AND v2<=94 AND v3<=76) OR (v1<34 AND v2 BETWEEN 5 AND 20));`, - Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{12, 7, 7, 66, 62}, sql.Row{34, 32, 16, 97, 29}, sql.Row{7, 4, 10, 53, 69}, sql.Row{18, 9, 19, 38, 35}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>74 AND v2<=3 AND v3>51 AND v4<1) OR (v1>=92 AND v2<=2));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=10 AND v2 BETWEEN 29 AND 83 AND v3<30 AND v4=54) OR (v1=68 AND v2=9 AND v3<=31)) AND (v1=87 AND v2>=91) OR (v1<=3 AND v2<>65 AND v3<8 AND v4<54)) OR (v1<7 AND v2>=4 AND v3<=47));`, - Expected: []sql.Row{sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<35) OR (v1>=5 AND v2>=10 AND v3=65));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>31 AND v2<=37 AND v3>56 AND v4 BETWEEN 10 AND 31) OR (v1>8)) AND (v1>=27 AND v2<>44);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>52) OR (v1<21 AND v2<61 AND v3=13)) OR (v1=89 AND v3>33));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<30 AND v4>11 AND v2<=11) OR (v1<>19 AND v2<>47 AND v3 BETWEEN 38 AND 77 AND v4>31)) OR (v1 BETWEEN 0 AND 27 AND v2 BETWEEN 33 AND 34)) OR (v1<32)) AND (v1<9 AND v3=54 AND v4<>31 AND v2<>95);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=48) OR (v1 BETWEEN 2 AND 81));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>36) OR (v1<>70 AND v2 BETWEEN 23 AND 39)) OR (v1>51 AND v2>=57)) OR (v1<50 AND v2<=3 AND v3 BETWEEN 1 AND 74));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>30) OR (v1>98 AND v4>43 AND v2<>80)) OR (v1 BETWEEN 2 AND 23 AND v2>=34)) OR (v1>=42));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<68 AND v2<81 AND v3<34 AND v4<>33) OR (v1<=78 AND v4 BETWEEN 34 AND 99 AND v2>=79 AND v3>=9)) OR (v1=27 AND v4 BETWEEN 20 AND 41 AND v2<98 AND v3>=15));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{21, 12, 42, 15, 31}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<23 AND v2<=45 AND v3<0) OR (v1>=31)) OR (v1>=50));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<16) OR (v1>=19 AND v2<25 AND v3>77));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<29 AND v2 BETWEEN 81 AND 92) OR (v1>20 AND v2>=53 AND v3 BETWEEN 20 AND 68));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{52, 47, 94, 56, 21}, sql.Row{78, 73, 91, 56, 0}, sql.Row{36, 33, 53, 56, 88}, sql.Row{59, 51, 97, 39, 36}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{74, 70, 56, 21, 22}, sql.Row{100, 96, 73, 38, 38}, sql.Row{60, 52, 72, 44, 2}, sql.Row{45, 38, 71, 22, 37}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 25 AND 59 AND v2=1 AND v3<93 AND v4<=16) OR (v1<40 AND v2 BETWEEN 14 AND 37 AND v3>62 AND v4<58)) OR (v1<>17 AND v2<>36)) OR (v1 BETWEEN 7 AND 99 AND v2<>6 AND v3=43 AND v4<89));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1=46) AND (v1>=93 AND v3<>51 AND v4=93 AND v2=8);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=5 AND v2>=14 AND v3<=2) OR (v1<53 AND v4=99 AND v2=72)) OR (v1<>49 AND v2<>39 AND v3>=70 AND v4<>24)) OR (v1<79));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<99 AND v2<=42) OR (v1=47 AND v4 BETWEEN 33 AND 63 AND v2>=10 AND v3<=57)) OR (v1>44)) OR (v1<>87 AND v2>42 AND v3<69));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=29 AND v2 BETWEEN 50 AND 86 AND v3<=6 AND v4 BETWEEN 8 AND 48) OR (v1>86 AND v2 BETWEEN 62 AND 70 AND v3=33));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=15) OR (v1>=59 AND v2<18)) OR (v1 BETWEEN 23 AND 31 AND v3>50 AND v4 BETWEEN 15 AND 54));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=50 AND v2<=84 AND v3 BETWEEN 22 AND 26) OR (v1<=18 AND v2<49 AND v3>19 AND v4 BETWEEN 61 AND 75)) AND (v1>48 AND v2>=56 AND v3=6) OR (v1<=88 AND v2>=76 AND v3<40 AND v4<=18));`, - Expected: []sql.Row{sql.Row{57, 50, 79, 10, 12}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=27) OR (v1>=11 AND v2<97 AND v3<97 AND v4<44));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=89 AND v2<=93) OR (v1<=54));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=74 AND v2<=31) OR (v1<11)) OR (v1 BETWEEN 26 AND 38));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{35, 33, 29, 69, 6}, sql.Row{43, 37, 35, 6, 44}, sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=10 AND v2<12 AND v3=54 AND v4>89) OR (v1=99 AND v4=37));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=50 AND v2<50) OR (v1<19)) OR (v1=51));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=62 AND v2<89) AND (v1<90 AND v2>=19) OR (v1<=1 AND v2>49));`, - Expected: []sql.Row{sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1<=61 AND v2<=64) AND (v1>=0);`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 5 AND 69) OR (v1<52 AND v4<14 AND v2>=25 AND v3=63));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=21 AND v2<>0 AND v3<49) OR (v1<=70 AND v2>16 AND v3<=89 AND v4>=27)) OR (v1>=14));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>14) OR (v1>=82));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=19 AND v3<72 AND v4=23) OR (v1<=36 AND v2>99));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>43) OR (v1>=41 AND v4=32 AND v2<=66)) AND (v1>43 AND v2 BETWEEN 83 AND 97);`, - Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{78, 73, 91, 56, 0}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{58, 50, 97, 0, 79}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=8 AND v4>=44) AND (v1=84 AND v2=41 AND v3 BETWEEN 5 AND 81) OR (v1<>31 AND v2<=96 AND v3<=20 AND v4<=14));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{96, 91, 23, 2, 9}, sql.Row{24, 17, 49, 14, 7}, sql.Row{57, 50, 79, 10, 12}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 52 AND 55) OR (v1>1 AND v2>36 AND v3<=47)) OR (v1 BETWEEN 0 AND 38 AND v2<=49 AND v3>=8));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=11 AND v2>=41 AND v3=9) AND (v1<>41 AND v3<>69 AND v4<24) OR (v1>48 AND v4<79));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1=23 AND v4>=52 AND v2>=61) AND (v1<>85 AND v3>2 AND v4<15);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 32 AND 51 AND v4 BETWEEN 5 AND 14 AND v2=46 AND v3>=31) OR (v1>=32 AND v2<=26 AND v3>52 AND v4>55));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{67, 64, 26, 77, 97}, sql.Row{89, 86, 7, 57, 96}, sql.Row{64, 57, 25, 97, 65}, sql.Row{61, 53, 6, 53, 89}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=16 AND v2<59 AND v3<=43) OR (v1=17 AND v2<=4 AND v3>71));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=42 AND v4=47) OR (v1>=28)) AND (v1<>10) OR (v1 BETWEEN 20 AND 60 AND v2>96 AND v3<>28)) OR (v1=99 AND v2<=62 AND v3=30 AND v4 BETWEEN 92 AND 93));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=50 AND v3=4 AND v4=53 AND v2>=80) OR (v1<54 AND v4<=76 AND v2>48)) OR (v1>=38 AND v4<76 AND v2=56));`, - Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{87, 84, 56, 78, 18}, sql.Row{11, 5, 76, 70, 46}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{50, 43, 66, 85, 66}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=79 AND v2>24) OR (v1<76 AND v3<=59 AND v4<=36 AND v2=39));`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=15 AND v2 BETWEEN 21 AND 76 AND v3=23) OR (v1 BETWEEN 2 AND 55));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=85 AND v2>37 AND v3<=57 AND v4 BETWEEN 12 AND 49) AND (v1>10) OR (v1>56)) OR (v1>=57));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((((v1<>89 AND v2>=75) OR (v1<=5)) OR (v1=5 AND v2<19 AND v3>=1)) OR (v1>=18 AND v2>=17 AND v3 BETWEEN 78 AND 83)) OR (v1>=11 AND v3<=9 AND v4>39));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{78, 73, 91, 56, 0}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{7, 4, 10, 53, 69}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 36 AND 48 AND v4<97 AND v2>=99 AND v3=3) OR (v1<>84 AND v2=46 AND v3=4)) OR (v1>73 AND v2 BETWEEN 34 AND 39 AND v3 BETWEEN 34 AND 71 AND v4>=15)) OR (v1<>82));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1<=50 AND v3>=51 AND v4<>69) AND (v1>1 AND v3<24);`, - Expected: []sql.Row{}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>10 AND v2=72 AND v3<31) OR (v1<67 AND v3 BETWEEN 13 AND 70 AND v4>66 AND v2>39)) OR (v1<82)) AND (v1>=66);`, - Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=84 AND v2<85 AND v3 BETWEEN 75 AND 86 AND v4<=34) OR (v1>=37 AND v2<59 AND v3 BETWEEN 2 AND 26 AND v4>6));`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{92, 88, 57, 12, 88}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>10 AND v2=42) OR (v1>=85 AND v2<>6 AND v3=34 AND v4<=45));`, - Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=24 AND v2<>33 AND v3=77 AND v4<>63) OR (v1<>22 AND v2<=58 AND v3>71 AND v4>=87)) OR (v1<=85 AND v2>18 AND v3<=40));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<72 AND v2>=67) OR (v1<>88 AND v2<>23 AND v3=23));`, - Expected: []sql.Row{sql.Row{40, 34, 89, 27, 90}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{72, 69, 81, 70, 37}, sql.Row{11, 5, 76, 70, 46}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{60, 52, 72, 44, 2}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=11 AND v2>=99) OR (v1<18 AND v2>=34 AND v3<53)) OR (v1>68));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=40 AND v2<0) OR (v1>=35 AND v2<=95 AND v3<>61)) OR (v1>49));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1=85 AND v2<81 AND v3 BETWEEN 14 AND 61 AND v4<>99) OR (v1 BETWEEN 31 AND 86 AND v4<>43)) OR (v1 BETWEEN 15 AND 67)) AND (v1 BETWEEN 37 AND 55);`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=52 AND v4>=86) OR (v1>=86 AND v3=79 AND v4=9 AND v2 BETWEEN 2 AND 6)) OR (v1>98 AND v2<=44 AND v3<>53));`, - Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{89, 86, 7, 57, 96}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>5 AND v4 BETWEEN 14 AND 43 AND v2>=62) OR (v1>=91 AND v2>=28 AND v3>=83 AND v4<>91));`, - Expected: []sql.Row{sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{91, 87, 66, 8, 22}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{45, 38, 71, 22, 37}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>87) OR (v1>91 AND v2>23 AND v3<74));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 1 AND 19 AND v2 BETWEEN 22 AND 48) AND (v1 BETWEEN 6 AND 47 AND v2>=25 AND v3<27);`, - Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=76 AND v2>35 AND v3<=59 AND v4>25) OR (v1 BETWEEN 35 AND 82 AND v2 BETWEEN 8 AND 37 AND v3>18 AND v4<=70)) OR (v1<=95 AND v3=70 AND v4=11)) OR (v1 BETWEEN 15 AND 23 AND v2<>24 AND v3<=50 AND v4<>84));`, - Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{66, 64, 23, 33, 5}, sql.Row{24, 17, 49, 14, 7}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{29, 22, 98, 22, 21}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{26, 20, 30, 34, 71}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>42 AND v2=44 AND v3<>73) OR (v1>24 AND v2>49 AND v3>=7));`, - Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{91, 87, 66, 8, 22}, sql.Row{92, 88, 57, 12, 88}, sql.Row{36, 33, 53, 56, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{69, 64, 77, 41, 17}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=79 AND v3<89 AND v4>=3) OR (v1<63 AND v2<66));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>66) OR (v1=33)) OR (v1<>39 AND v2>53 AND v3<73 AND v4<75));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1=15) OR (v1>36 AND v3=13 AND v4<=98 AND v2 BETWEEN 70 AND 85));`, - Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 23 AND 45 AND v4<30) OR (v1>=36 AND v2<>6 AND v3 BETWEEN 30 AND 53)) OR (v1 BETWEEN 41 AND 95));`, - Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>6 AND v4<>9 AND v2<>77 AND v3>=81) OR (v1<>21 AND v2>=17 AND v3<=3));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{0, 0, 33, 2, 67}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{64, 57, 25, 97, 65}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{4, 2, 27, 1, 75}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 94 AND 99 AND v2>4 AND v3<94 AND v4<=59) OR (v1=19 AND v2 BETWEEN 47 AND 54)) AND (v1>=83) OR (v1 BETWEEN 50 AND 97 AND v2<12 AND v3>23));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{100, 96, 73, 38, 38}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>19 AND v2>46 AND v3=26 AND v4>=47) OR (v1>18 AND v2<=79 AND v3=45 AND v4<=7)) OR (v1 BETWEEN 2 AND 21 AND v2>32));`, - Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{25, 17, 75, 86, 18}, sql.Row{19, 10, 36, 27, 5}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (v1>=5) AND (v1=50 AND v2<=50);`, - Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{55, 50, 36, 73, 58}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=82 AND v2 BETWEEN 34 AND 50 AND v3<26 AND v4 BETWEEN 48 AND 76) OR (v1<=6));`, - Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{8, 4, 27, 77, 5}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{7, 4, 10, 53, 69}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE ((v1>29) OR (v1<>94 AND v2>=56 AND v3=14));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1>8 AND v2<97 AND v3=51 AND v4<=26) OR (v1>87)) OR (v1<10 AND v2<=45 AND v3>=73));`, - Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{93, 89, 1, 27, 50}, sql.Row{8, 4, 27, 77, 5}, sql.Row{94, 89, 91, 7, 45}, sql.Row{13, 7, 21, 75, 70}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, - }, - { - Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>15 AND v2>1) OR (v1<46)) OR (v1>47 AND v2>=9 AND v3 BETWEEN 39 AND 87 AND v4>=10));`, - Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, - }, - }, - }, -} diff --git a/enginetest/memory_engine_test.go b/enginetest/memory_engine_test.go index 301168ea03..91573814bd 100644 --- a/enginetest/memory_engine_test.go +++ b/enginetest/memory_engine_test.go @@ -15,22 +15,18 @@ package enginetest_test import ( - "bufio" "fmt" - "io/ioutil" - "os" - "path/filepath" - "strings" + "log" "testing" - "github.com/stretchr/testify/require" + "github.com/dolthub/go-mysql-server/enginetest/scriptgen/setup" "github.com/dolthub/go-mysql-server/enginetest" + "github.com/dolthub/go-mysql-server/enginetest/queries" "github.com/dolthub/go-mysql-server/memory" "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/analyzer" "github.com/dolthub/go-mysql-server/sql/expression" - "github.com/dolthub/go-mysql-server/sql/parse" "github.com/dolthub/go-mysql-server/sql/plan" ) @@ -85,56 +81,15 @@ func TestQueries(t *testing.T) { } } -func TestSpatialQueries(t *testing.T) { - for _, numPartitions := range numPartitionsVals { - for _, indexBehavior := range indexBehaviors { - for _, parallelism := range parallelVals { - if parallelism == 1 && numPartitions == testNumPartitions && indexBehavior.name == "nativeIndexes" { - // This case is covered by TestQueriesSimple - continue - } - testName := fmt.Sprintf("partitions=%d,indexes=%v,parallelism=%v", numPartitions, indexBehavior.name, parallelism) - harness := enginetest.NewMemoryHarness(testName, parallelism, numPartitions, indexBehavior.nativeIndexes, indexBehavior.driverInitializer) - - t.Run(testName, func(t *testing.T) { - enginetest.TestSpatialQueries(t, harness) - }) - } - } - } -} - // TestQueriesPrepared runs the canonical test queries against the gamut of thread, index and partition options // with prepared statement caching enabled. func TestQueriesPrepared(t *testing.T) { - for _, numPartitions := range numPartitionsVals { - for _, indexBehavior := range indexBehaviors { - for _, parallelism := range parallelVals { - testName := fmt.Sprintf("partitions=%d,indexes=%v,parallelism=%v", numPartitions, indexBehavior.name, parallelism) - harness := enginetest.NewMemoryHarness(testName, parallelism, numPartitions, indexBehavior.nativeIndexes, indexBehavior.driverInitializer) - - t.Run(testName, func(t *testing.T) { - enginetest.TestQueriesPrepared(t, harness) - }) - } - } - } + enginetest.TestQueriesPrepared(t, enginetest.NewMemoryHarness("simple", 1, testNumPartitions, true, nil)) } // TestQueriesSimple runs the canonical test queries against a single threaded index enabled harness. func TestSpatialQueriesPrepared(t *testing.T) { - for _, numPartitions := range numPartitionsVals { - for _, indexBehavior := range indexBehaviors { - for _, parallelism := range parallelVals { - testName := fmt.Sprintf("partitions=%d,indexes=%v,parallelism=%v", numPartitions, indexBehavior.name, parallelism) - harness := enginetest.NewMemoryHarness(testName, parallelism, numPartitions, indexBehavior.nativeIndexes, indexBehavior.driverInitializer) - - t.Run(testName, func(t *testing.T) { - enginetest.TestSpatialQueriesPrepared(t, harness) - }) - } - } - } + enginetest.TestSpatialQueriesPrepared(t, enginetest.NewMemoryHarness("simple", 1, testNumPartitions, true, nil)) } // TestQueriesSimple runs the canonical test queries against a single threaded index enabled harness. @@ -151,7 +106,7 @@ func TestQueriesSimple(t *testing.T) { enginetest.TestQueries(t, enginetest.NewMemoryHarness("simple", 1, testNumPartitions, true, nil)) } -// TestQueriesSimple runs the canonical test queries against a single threaded index enabled harness. +// TestJoinQueries runs the canonical test queries against a single threaded index enabled harness. func TestJoinQueries(t *testing.T) { enginetest.TestJoinQueries(t, enginetest.NewMemoryHarness("simple", 1, testNumPartitions, true, nil)) } @@ -160,8 +115,8 @@ func TestJoinQueries(t *testing.T) { func TestSingleQuery(t *testing.T) { t.Skip() - var test enginetest.QueryTest - test = enginetest.QueryTest{ + var test queries.QueryTest + test = queries.QueryTest{ Query: `show create table two_pk`, Expected: []sql.Row{ {1, 2}, @@ -175,15 +130,15 @@ func TestSingleQuery(t *testing.T) { engine.Analyzer.Debug = true engine.Analyzer.Verbose = true - enginetest.TestQuery(t, harness, engine, test.Query, test.Expected, nil) + enginetest.TestQueryWithEngine(t, harness, engine, test) } // Convenience test for debugging a single query. Unskip and set to the desired query. func TestSingleQueryPrepared(t *testing.T) { t.Skip() - var test enginetest.QueryTest - test = enginetest.QueryTest{ + var test queries.QueryTest + test = queries.QueryTest{ Query: `SELECT ST_SRID(g, 0) from geometry_table order by i`, Expected: []sql.Row{ {sql.Point{X: 1, Y: 2}}, @@ -197,20 +152,18 @@ func TestSingleQueryPrepared(t *testing.T) { fmt.Sprintf("%v", test) harness := enginetest.NewMemoryHarness("", 1, testNumPartitions, true, nil) - //engine := enginetest.NewEngine(t, harness) engine := enginetest.NewSpatialEngine(t, harness) - //enginetest.CreateIndexes(t, harness, engine) engine.Analyzer.Debug = true engine.Analyzer.Verbose = true - enginetest.TestPreparedQuery(t, harness, engine, test.Query, test.Expected, nil) + enginetest.TestPreparedQuery(t, harness, test.Query, test.Expected, nil) } // Convenience test for debugging a single query. Unskip and set to the desired query. func TestSingleScript(t *testing.T) { t.Skip() - var scripts = []enginetest.ScriptTest{ + var scripts = []queries.ScriptTest{ { Name: "non-existent procedure in trigger body", SetUpScript: []string{ @@ -218,7 +171,7 @@ func TestSingleScript(t *testing.T) { "CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, v1 INT, v2 TEXT);", "INSERT INTO t0 VALUES (1, 2, 'abc'), (2, 3, 'def');", }, - Assertions: []enginetest.ScriptTestAssertion{ + Assertions: []queries.ScriptTestAssertion{ { Query: "SELECT * FROM t0;", Expected: []sql.Row{{1, 2, "abc"}, {2, 3, "def"}}, @@ -272,7 +225,7 @@ INSERT INTO t0 (v1, v2) VALUES (i, s); END;`, } func TestUnbuildableIndex(t *testing.T) { - var scripts = []enginetest.ScriptTest{ + var scripts = []queries.ScriptTest{ { Name: "Failing index builder still returning correct results", SetUpScript: []string{ @@ -281,7 +234,7 @@ func TestUnbuildableIndex(t *testing.T) { fmt.Sprintf("CREATE INDEX mytable2_i_s ON mytable2 (i, s) COMMENT '%s'", memory.CommentPreventingIndexBuilding), "INSERT INTO mytable2 VALUES (1, 'first row'), (2, 'second row'), (3, 'third row')", }, - Assertions: []enginetest.ScriptTestAssertion{ + Assertions: []queries.ScriptTestAssertion{ { Query: "SELECT i FROM mytable2 WHERE i IN (SELECT i FROM mytable2) ORDER BY i", Expected: []sql.Row{ @@ -296,22 +249,24 @@ func TestUnbuildableIndex(t *testing.T) { for _, test := range scripts { harness := enginetest.NewMemoryHarness("", 1, testNumPartitions, true, nil) - engine := enginetest.NewEngine(t, harness) - - enginetest.TestScriptWithEngine(t, engine, harness, test) + enginetest.TestScript(t, harness, test) } } func TestBrokenQueries(t *testing.T) { - enginetest.RunQueryTests(t, enginetest.NewSkippingMemoryHarness(), enginetest.BrokenQueries) + enginetest.TestBrokenQueries(t, enginetest.NewSkippingMemoryHarness()) } func TestTestQueryPlanTODOs(t *testing.T) { harness := enginetest.NewSkippingMemoryHarness() - engine := enginetest.NewEngine(t, harness) - for _, tt := range enginetest.QueryPlanTODOs { + harness.Setup(setup.MydbData, setup.Pk_tablesData, setup.NiltableData) + e, err := harness.NewEngine(t) + if err != nil { + log.Fatal(err) + } + for _, tt := range queries.QueryPlanTODOs { t.Run(tt.Query, func(t *testing.T) { - enginetest.TestQueryPlan(t, enginetest.NewContextWithEngine(harness, engine), engine, harness, tt.Query, tt.ExpectedPlan) + enginetest.TestQueryPlan(t, harness, e, tt.Query, tt.ExpectedPlan) }) } } @@ -378,171 +333,6 @@ func TestIndexQueryPlans(t *testing.T) { } } -// This test will write a new set of query plan expected results to a file that you can copy and paste over the existing -// query plan results. Handy when you've made a large change to the analyzer or node formatting, and you want to examine -// how query plans have changed without a lot of manual copying and pasting. -func TestWriteQueryPlans(t *testing.T) { - //t.Skip() - - harness := enginetest.NewDefaultMemoryHarness() - engine := enginetest.NewEngine(t, harness) - enginetest.CreateIndexes(t, harness, engine) - - tmp, err := ioutil.TempDir("", "*") - if err != nil { - return - } - - outputPath := filepath.Join(tmp, "queryPlans.txt") - f, err := os.Create(outputPath) - require.NoError(t, err) - - w := bufio.NewWriter(f) - _, _ = w.WriteString("var PlanTests = []QueryPlanTest{\n") - for _, tt := range enginetest.PlanTests { - _, _ = w.WriteString("\t{\n") - ctx := enginetest.NewContextWithEngine(harness, engine) - parsed, err := parse.Parse(ctx, tt.Query) - require.NoError(t, err) - - node, err := engine.Analyzer.Analyze(ctx, parsed, nil) - require.NoError(t, err) - planString := extractQueryNode(node).String() - - if strings.Contains(tt.Query, "`") { - _, _ = w.WriteString(fmt.Sprintf(`Query: "%s",`, tt.Query)) - } else { - _, _ = w.WriteString(fmt.Sprintf("Query: `%s`,", tt.Query)) - } - _, _ = w.WriteString("\n") - - _, _ = w.WriteString(`ExpectedPlan: `) - for i, line := range strings.Split(planString, "\n") { - if i > 0 { - _, _ = w.WriteString(" + \n") - } - if len(line) > 0 { - _, _ = w.WriteString(fmt.Sprintf(`"%s\n"`, strings.ReplaceAll(line, `"`, `\"`))) - } else { - // final line with comma - _, _ = w.WriteString("\"\",\n") - } - } - _, _ = w.WriteString("\t},\n") - } - _, _ = w.WriteString("}") - - _ = w.Flush() - - t.Logf("Query plans in %s", outputPath) -} - -func TestWriteIndexQueryPlans(t *testing.T) { - t.Skip() - - harness := enginetest.NewDefaultMemoryHarness() - engine := enginetest.NewEngine(t, harness) - - enginetest.CreateIndexes(t, harness, engine) - for i, script := range enginetest.ComplexIndexQueries { - for _, statement := range script.SetUpScript { - statement = strings.Replace(statement, "test", fmt.Sprintf("t%d", i), -1) - enginetest.RunQuery(t, engine, harness, statement) - } - } - - tmp, err := ioutil.TempDir("", "*") - if err != nil { - return - } - - outputPath := filepath.Join(tmp, "indexQueryPlans.txt") - f, err := os.Create(outputPath) - require.NoError(t, err) - - w := bufio.NewWriter(f) - _, _ = w.WriteString("var IndexPlanTests = []QueryPlanTest{\n") - for _, tt := range enginetest.IndexPlanTests { - _, _ = w.WriteString("\t{\n") - ctx := enginetest.NewContextWithEngine(harness, engine) - parsed, err := parse.Parse(ctx, tt.Query) - require.NoError(t, err) - - node, err := engine.Analyzer.Analyze(ctx, parsed, nil) - require.NoError(t, err) - planString := extractQueryNode(node).String() - - if strings.Contains(tt.Query, "`") { - _, _ = w.WriteString(fmt.Sprintf(`Query: "%s",`, tt.Query)) - } else { - _, _ = w.WriteString(fmt.Sprintf("Query: `%s`,", tt.Query)) - } - _, _ = w.WriteString("\n") - - _, _ = w.WriteString(`ExpectedPlan: `) - for i, line := range strings.Split(planString, "\n") { - if i > 0 { - _, _ = w.WriteString(" + \n") - } - if len(line) > 0 { - _, _ = w.WriteString(fmt.Sprintf(`"%s\n"`, strings.ReplaceAll(line, `"`, `\"`))) - } else { - // final line with comma - _, _ = w.WriteString("\"\",\n") - } - } - _, _ = w.WriteString("\t},\n") - } - _, _ = w.WriteString("}") - - _ = w.Flush() - - t.Logf("Query plans in %s", outputPath) -} - -func TestWriteComplexIndexQueries(t *testing.T) { - t.Skip() - tmp, err := ioutil.TempDir("", "*") - if err != nil { - return - } - - outputPath := filepath.Join(tmp, "complex_index_queries.txt") - f, err := os.Create(outputPath) - require.NoError(t, err) - - w := bufio.NewWriter(f) - _, _ = w.WriteString("var ComplexIndexQueries = []ScriptTest{\n") - for i, tt := range enginetest.ComplexIndexQueries { - w.WriteString(" {\n") - w.WriteString(fmt.Sprintf(" Name: \"%s\",\n", tt.Name)) - if len(tt.SetUpScript) > 0 { - w.WriteString(" SetUpScript: []string{\n") - for _, s := range tt.SetUpScript { - newS := strings.Replace(s, "test", fmt.Sprintf("comp_index_t%d", i), -1) - w.WriteString(fmt.Sprintf(" `%s`,\n", newS)) - } - w.WriteString(" },\n") - } - if len(tt.Assertions) > 0 { - w.WriteString(" Assertions: []ScriptTestAssertion{\n") - for _, s := range tt.Assertions { - q := strings.Replace(s.Query, "test", fmt.Sprintf("comp_index_t%d", i), -1) - w.WriteString(" {\n") - w.WriteString(fmt.Sprintf(" Query: `%s`,\n", q)) - w.WriteString(fmt.Sprintf(" Expected: %#v,\n", s.Expected)) - w.WriteString(" },\n") - } - w.WriteString(" },\n") - } - w.WriteString(" },\n") - } - w.WriteString("}\n") - w.Flush() - t.Logf("Query tests in:\n %s", outputPath) - -} - func extractQueryNode(node sql.Node) sql.Node { switch node := node.(type) { case *plan.QueryProcess: @@ -680,9 +470,9 @@ func TestLoadDataPrepared(t *testing.T) { func TestScriptsPrepared(t *testing.T) { //TODO: when foreign keys are implemented in the memory table, we can do the following test - for i := len(enginetest.ScriptTests) - 1; i >= 0; i-- { - if enginetest.ScriptTests[i].Name == "failed statements data validation for DELETE, REPLACE" { - enginetest.ScriptTests = append(enginetest.ScriptTests[:i], enginetest.ScriptTests[i+1:]...) + for i := len(queries.ScriptTests) - 1; i >= 0; i-- { + if queries.ScriptTests[i].Name == "failed statements data validation for DELETE, REPLACE" { + queries.ScriptTests = append(queries.ScriptTests[:i], queries.ScriptTests[i+1:]...) } } enginetest.TestScriptsPrepared(t, enginetest.NewMemoryHarness("default", 1, testNumPartitions, true, mergableIndexDriver)) @@ -712,10 +502,6 @@ func TestInsertErrorScriptsPrepared(t *testing.T) { enginetest.TestInsertErrorScriptsPrepared(t, enginetest.NewMemoryHarness("default", 1, testNumPartitions, true, mergableIndexDriver)) } -func TestScriptQueryPlan(t *testing.T) { - enginetest.TestScriptQueryPlan(t, enginetest.NewMemoryHarness("default", 1, testNumPartitions, true, mergableIndexDriver)) -} - func TestUserPrivileges(t *testing.T) { enginetest.TestUserPrivileges(t, enginetest.NewMemoryHarness("default", 1, testNumPartitions, true, mergableIndexDriver)) } @@ -743,7 +529,7 @@ func TestShowTriggers(t *testing.T) { func TestBrokenTriggers(t *testing.T) { h := enginetest.NewSkippingMemoryHarness() - for _, script := range enginetest.BrokenTriggerQueries { + for _, script := range queries.BrokenTriggerQueries { enginetest.TestScript(t, h, script) } } @@ -754,8 +540,12 @@ func TestStoredProcedures(t *testing.T) { func TestExternalProcedures(t *testing.T) { harness := enginetest.NewExternalStoredProcedureMemoryHarness() - for _, script := range enginetest.ExternalProcedureTests { - enginetest.TestScript(t, harness, script) + for _, script := range queries.ExternalProcedureTests { + myDb := harness.NewDatabase("mydb") + databases := []sql.Database{myDb} + e := enginetest.NewEngineWithDbs(t, harness, databases) + defer e.Close() + enginetest.TestScriptWithEngine(t, e, harness, script) } } @@ -847,14 +637,6 @@ func TestDropConstraints(t *testing.T) { enginetest.TestDropConstraints(t, enginetest.NewDefaultMemoryHarness()) } -func TestExplode(t *testing.T) { - enginetest.TestExplode(t, enginetest.NewDefaultMemoryHarness()) -} - -func TestExplodePrepared(t *testing.T) { - enginetest.TestExplodePrepared(t, enginetest.NewDefaultMemoryHarness()) -} - func TestReadOnly(t *testing.T) { enginetest.TestReadOnly(t, enginetest.NewDefaultMemoryHarness()) } diff --git a/enginetest/memory_harness.go b/enginetest/memory_harness.go index c460a2af28..ad0320bc6e 100644 --- a/enginetest/memory_harness.go +++ b/enginetest/memory_harness.go @@ -17,7 +17,11 @@ package enginetest import ( "context" "strings" + "testing" + "github.com/dolthub/go-mysql-server/enginetest/scriptgen/setup" + + sqle "github.com/dolthub/go-mysql-server" "github.com/dolthub/go-mysql-server/memory" "github.com/dolthub/go-mysql-server/sql" ) @@ -33,6 +37,10 @@ type MemoryHarness struct { nativeIndexSupport bool skippedQueries map[string]struct{} session sql.Session + checkpointTables []*memory.Table + dbOff []int + dbNames []string + setupData []setup.SetupScript } func (m *MemoryHarness) InitializeIndexDriver(dbs []sql.Database) { @@ -83,9 +91,9 @@ var _ Harness = (*MemoryHarness)(nil) var _ IndexDriverHarness = (*MemoryHarness)(nil) var _ IndexHarness = (*MemoryHarness)(nil) var _ VersionedDBHarness = (*MemoryHarness)(nil) +var _ ReadOnlyDatabaseHarness = (*MemoryHarness)(nil) var _ ForeignKeyHarness = (*MemoryHarness)(nil) var _ KeylessTableHarness = (*MemoryHarness)(nil) -var _ ReadOnlyDatabaseHarness = (*MemoryHarness)(nil) var _ ClientHarness = (*MemoryHarness)(nil) var _ SkippingHarness = (*SkippingMemoryHarness)(nil) @@ -97,6 +105,42 @@ func (s SkippingMemoryHarness) SkipQueryTest(query string) bool { return true } +func (m *MemoryHarness) Setup(setupData ...[]setup.SetupScript) { + m.setupData = nil + for i := range setupData { + m.setupData = append(m.setupData, setupData[i]...) + } + return +} + +func (m *MemoryHarness) NewEngine(t *testing.T) (*sqle.Engine, error) { + return NewEngineWithSetup(t, m, m.setupData) +} + +func (m *MemoryHarness) NewTableAsOf(db sql.VersionedDatabase, name string, schema sql.PrimaryKeySchema, asOf interface{}) sql.Table { + var fkColl *memory.ForeignKeyCollection + if memDb, ok := db.(*memory.HistoryDatabase); ok { + fkColl = memDb.GetForeignKeyCollection() + } else if memDb, ok := db.(*memory.ReadOnlyDatabase); ok { + fkColl = memDb.GetForeignKeyCollection() + } + table := memory.NewPartitionedTable(name, schema, fkColl, m.numTablePartitions) + if m.nativeIndexSupport { + table.EnablePrimaryKeyIndexes() + } + if ro, ok := db.(memory.ReadOnlyDatabase); ok { + ro.HistoryDatabase.AddTableAsOf(name, table, asOf) + } else { + db.(*memory.HistoryDatabase).AddTableAsOf(name, table, asOf) + } + return table +} + +func (m *MemoryHarness) SnapshotTable(db sql.VersionedDatabase, name string, asOf interface{}) error { + // Nothing to do for this implementation: the NewTableAsOf method does all the work of creating the snapshot. + return nil +} + func (m *MemoryHarness) SupportsNativeIndexCreation() bool { return m.nativeIndexSupport } @@ -136,30 +180,6 @@ func (m *MemoryHarness) NewContextWithClient(client sql.Client) *sql.Context { ) } -func (m *MemoryHarness) NewTableAsOf(db sql.VersionedDatabase, name string, schema sql.PrimaryKeySchema, asOf interface{}) sql.Table { - var fkColl *memory.ForeignKeyCollection - if memDb, ok := db.(*memory.HistoryDatabase); ok { - fkColl = memDb.GetForeignKeyCollection() - } else if memDb, ok := db.(*memory.ReadOnlyDatabase); ok { - fkColl = memDb.GetForeignKeyCollection() - } - table := memory.NewPartitionedTable(name, schema, fkColl, m.numTablePartitions) - if m.nativeIndexSupport { - table.EnablePrimaryKeyIndexes() - } - if ro, ok := db.(memory.ReadOnlyDatabase); ok { - ro.HistoryDatabase.AddTableAsOf(name, table, asOf) - } else { - db.(*memory.HistoryDatabase).AddTableAsOf(name, table, asOf) - } - return table -} - -func (m *MemoryHarness) SnapshotTable(db sql.VersionedDatabase, name string, asOf interface{}) error { - // Nothing to do for this implementation: the NewTableAsOf method does all the work of creating the snapshot. - return nil -} - func (m *MemoryHarness) IndexDriver(dbs []sql.Database) sql.IndexDriver { if m.indexDriverInitializer != nil { return m.indexDriverInitializer(dbs) @@ -187,6 +207,14 @@ func (m *MemoryHarness) NewDatabases(names ...string) []sql.Database { return dbs } +func (m *MemoryHarness) NewReadOnlyDatabases(names ...string) []sql.ReadOnlyDatabase { + dbs := make([]sql.ReadOnlyDatabase, len(names)) + for i, name := range names { + dbs[i] = memory.NewReadOnlyDatabase(name) + } + return dbs +} + func (m *MemoryHarness) NewTable(db sql.Database, name string, schema sql.PrimaryKeySchema) (sql.Table, error) { var fkColl *memory.ForeignKeyCollection if memDb, ok := db.(*memory.BaseDatabase); ok { @@ -211,14 +239,6 @@ func (m *MemoryHarness) NewTable(db sql.Database, name string, schema sql.Primar return table, nil } -func (m *MemoryHarness) NewReadOnlyDatabases(names ...string) []sql.ReadOnlyDatabase { - dbs := make([]sql.ReadOnlyDatabase, len(names)) - for i, name := range names { - dbs[i] = memory.NewReadOnlyDatabase(name) - } - return dbs -} - type ExternalStoredProcedureMemoryHarness struct { *MemoryHarness } diff --git a/enginetest/mysql_harness.go b/enginetest/mysql_harness.go index a5b3ad9bf6..757d7beaf9 100644 --- a/enginetest/mysql_harness.go +++ b/enginetest/mysql_harness.go @@ -17,7 +17,11 @@ package enginetest import ( "fmt" "strings" + "testing" + "github.com/dolthub/go-mysql-server/enginetest/scriptgen/setup" + + sqle "github.com/dolthub/go-mysql-server" "github.com/dolthub/go-mysql-server/enginetest/mysqlshim" "github.com/dolthub/go-mysql-server/sql" ) @@ -29,6 +33,20 @@ type MySQLHarness struct { skippedQueries map[string]struct{} } +func (m *MySQLHarness) Setup(source ...[]setup.SetupScript) { + //TODO implement me + panic("implement me") +} + +func (m *MySQLHarness) NewEngine(t *testing.T) (*sqle.Engine, error) { + //TODO implement me + panic("implement me") +} + +func (m *MySQLHarness) Cleanup() error { + return nil +} + // MySQLDatabase represents a database for a local MySQL server. type MySQLDatabase struct { harness *MySQLHarness diff --git a/enginetest/queries/column_alias_queries.go b/enginetest/queries/column_alias_queries.go new file mode 100644 index 0000000000..c47f63664e --- /dev/null +++ b/enginetest/queries/column_alias_queries.go @@ -0,0 +1,146 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package queries + +import ( + "github.com/dolthub/vitess/go/sqltypes" + + "github.com/dolthub/go-mysql-server/sql" +) + +var ColumnAliasQueries = []QueryTest{ + { + Query: `SELECT i AS cOl FROM mytable`, + ExpectedColumns: sql.Schema{ + { + Name: "cOl", + Type: sql.Int64, + }, + }, + Expected: []sql.Row{ + {int64(1)}, + {int64(2)}, + {int64(3)}, + }, + }, + { + Query: `SELECT i AS cOl, s as COL FROM mytable`, + ExpectedColumns: sql.Schema{ + { + Name: "cOl", + Type: sql.Int64, + }, + { + Name: "COL", + Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), + }, + }, + Expected: []sql.Row{ + {int64(1), "first row"}, + {int64(2), "second row"}, + {int64(3), "third row"}, + }, + }, + { + // TODO: this is actually inconsistent with MySQL, which doesn't allow column aliases in the where clause + Query: `SELECT i AS cOl, s as COL FROM mytable where cOl = 1`, + ExpectedColumns: sql.Schema{ + { + Name: "cOl", + Type: sql.Int64, + }, + { + Name: "COL", + Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), + }, + }, + Expected: []sql.Row{ + {int64(1), "first row"}, + }, + }, + { + Query: `SELECT s as COL1, SUM(i) COL2 FROM mytable group by s order by cOL2`, + ExpectedColumns: sql.Schema{ + { + Name: "COL1", + Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), + }, + { + Name: "COL2", + Type: sql.Float64, + }, + }, + // TODO: SUM should be integer typed for integers + Expected: []sql.Row{ + {"first row", float64(1)}, + {"second row", float64(2)}, + {"third row", float64(3)}, + }, + }, + { + Query: `SELECT s as COL1, SUM(i) COL2 FROM mytable group by col1 order by col2`, + ExpectedColumns: sql.Schema{ + { + Name: "COL1", + Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), + }, + { + Name: "COL2", + Type: sql.Float64, + }, + }, + Expected: []sql.Row{ + {"first row", float64(1)}, + {"second row", float64(2)}, + {"third row", float64(3)}, + }, + }, + { + Query: `SELECT s as coL1, SUM(i) coL2 FROM mytable group by 1 order by 2`, + ExpectedColumns: sql.Schema{ + { + Name: "coL1", + Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), + }, + { + Name: "coL2", + Type: sql.Float64, + }, + }, + Expected: []sql.Row{ + {"first row", float64(1)}, + {"second row", float64(2)}, + {"third row", float64(3)}, + }, + }, + { + Query: `SELECT s as Date, SUM(i) TimeStamp FROM mytable group by 1 order by 2`, + ExpectedColumns: sql.Schema{ + { + Name: "Date", + Type: sql.MustCreateStringWithDefaults(sqltypes.VarChar, 20), + }, + { + Name: "TimeStamp", + Type: sql.Float64, + }, + }, + Expected: []sql.Row{ + {"first row", float64(1)}, + {"second row", float64(2)}, + {"third row", float64(3)}, + }, + }, +} diff --git a/enginetest/queries/create_table_queries.go b/enginetest/queries/create_table_queries.go new file mode 100644 index 0000000000..ff7faa5ded --- /dev/null +++ b/enginetest/queries/create_table_queries.go @@ -0,0 +1,138 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package queries + +import "github.com/dolthub/go-mysql-server/sql" + +var CreateTableQueries = []WriteQueryTest{ + { + WriteQuery: `CREATE TABLE t1 (a INTEGER, b TEXT, c DATE, d TIMESTAMP, e VARCHAR(20), f BLOB NOT NULL, b1 BOOL, b2 BOOLEAN NOT NULL, g DATETIME, h CHAR(40))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int,\n `b` text,\n `c` date,\n `d` timestamp,\n `e` varchar(20),\n `f` blob NOT NULL,\n `b1` tinyint,\n `b2` tinyint NOT NULL,\n `g` datetime,\n `h` char(40)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (a INTEGER NOT NULL PRIMARY KEY, b VARCHAR(10) NOT NULL)`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `b` varchar(10) NOT NULL,\n PRIMARY KEY (`a`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (a INTEGER NOT NULL, b TEXT NOT NULL, c bool, primary key (a,b))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `b` text NOT NULL,\n `c` tinyint,\n PRIMARY KEY (`a`,`b`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1(a INTEGER NOT NULL, b TEXT NOT NULL, c bool, primary key (a,b))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `b` text NOT NULL,\n `c` tinyint,\n PRIMARY KEY (`a`,`b`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (a INTEGER, b TEXT NOT NULL COMMENT 'comment', c bool, primary key (a))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `b` text NOT NULL COMMENT 'comment',\n `c` tinyint,\n PRIMARY KEY (`a`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (a INTEGER, create_time timestamp(6) NOT NULL DEFAULT NOW(6), primary key (a))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `create_time` timestamp NOT NULL DEFAULT (NOW(6)),\n PRIMARY KEY (`a`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 LIKE mytable`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `i` bigint NOT NULL,\n `s` varchar(20) NOT NULL COMMENT 'column s',\n PRIMARY KEY (`i`),\n KEY `idx_si` (`s`,`i`),\n KEY `mytable_i_s` (`i`,`s`),\n UNIQUE KEY `mytable_s` (`s`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 ( + pk bigint primary key, + v1 bigint default (2) comment 'hi there', + index idx_v1 (v1) comment 'index here' + )`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `pk` bigint NOT NULL,\n `v1` bigint DEFAULT (2) COMMENT 'hi there',\n PRIMARY KEY (`pk`),\n KEY `idx_v1` (`v1`) COMMENT 'index here'\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `create table t1 like foo.other_table`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `text` text NOT NULL,\n `number` mediumint,\n PRIMARY KEY (`text`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (a INTEGER NOT NULL PRIMARY KEY, b VARCHAR(10) UNIQUE)`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `b` varchar(10),\n PRIMARY KEY (`a`),\n UNIQUE KEY `b` (`b`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (a INTEGER NOT NULL PRIMARY KEY, b VARCHAR(10) UNIQUE KEY)`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `b` varchar(10),\n PRIMARY KEY (`a`),\n UNIQUE KEY `b` (`b`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 SELECT * from mytable`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(3)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `i` bigint NOT NULL,\n `s` varchar(20) NOT NULL COMMENT 'column s',\n PRIMARY KEY (`i`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE mydb.t1 (a INTEGER NOT NULL PRIMARY KEY, b VARCHAR(10) NOT NULL)`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE mydb.t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `a` int NOT NULL,\n `b` varchar(10) NOT NULL,\n PRIMARY KEY (`a`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (i int primary key, j int auto_increment unique)`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `i` int NOT NULL,\n `j` int AUTO_INCREMENT,\n PRIMARY KEY (`i`),\n UNIQUE KEY `j` (`j`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (i int primary key, j int auto_increment, index (j))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `i` int NOT NULL,\n `j` int AUTO_INCREMENT,\n PRIMARY KEY (`i`),\n KEY `j` (`j`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (i int primary key, j int auto_increment, k int, unique(j,k))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `i` int NOT NULL,\n `j` int AUTO_INCREMENT,\n `k` int,\n PRIMARY KEY (`i`),\n UNIQUE KEY `jk` (`j`,`k`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 (i int primary key, j int auto_increment, k int, index (j,k))`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `i` int NOT NULL,\n `j` int AUTO_INCREMENT,\n `k` int,\n PRIMARY KEY (`i`),\n KEY `jk` (`j`,`k`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, + { + WriteQuery: `CREATE TABLE t1 ( + pk int NOT NULL, + col1 blob DEFAULT (_utf8mb4'abc'), + col2 json DEFAULT (json_object(_utf8mb4'a',1)), + col3 text DEFAULT (_utf8mb4'abc'), + PRIMARY KEY (pk) + )`, + ExpectedWriteResult: []sql.Row{{sql.NewOkResult(0)}}, + SelectQuery: "SHOW CREATE TABLE t1", + ExpectedSelect: []sql.Row{sql.Row{"t1", "CREATE TABLE `t1` (\n `pk` int NOT NULL,\n `col1` blob DEFAULT (\"abc\"),\n `col2` json DEFAULT (JSON_OBJECT(\"a\", 1)),\n `col3` text DEFAULT (\"abc\"),\n PRIMARY KEY (`pk`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}}, + }, +} diff --git a/enginetest/delete_queries.go b/enginetest/queries/delete_queries.go similarity index 99% rename from enginetest/delete_queries.go rename to enginetest/queries/delete_queries.go index 166b1fac00..221d1f8f72 100644 --- a/enginetest/delete_queries.go +++ b/enginetest/queries/delete_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "github.com/dolthub/go-mysql-server/sql" diff --git a/enginetest/external_procedure_queries.go b/enginetest/queries/external_procedure_queries.go similarity index 99% rename from enginetest/external_procedure_queries.go rename to enginetest/queries/external_procedure_queries.go index f75c83fc58..edcb114a4c 100644 --- a/enginetest/external_procedure_queries.go +++ b/enginetest/queries/external_procedure_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import "github.com/dolthub/go-mysql-server/sql" diff --git a/enginetest/foreign_key_queries.go b/enginetest/queries/foreign_key_queries.go similarity index 99% rename from enginetest/foreign_key_queries.go rename to enginetest/queries/foreign_key_queries.go index 7deeadd09f..9cbea398d5 100644 --- a/enginetest/foreign_key_queries.go +++ b/enginetest/queries/foreign_key_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "github.com/dolthub/go-mysql-server/sql" diff --git a/enginetest/queries/index_queries.go b/enginetest/queries/index_queries.go new file mode 100644 index 0000000000..5304f645de --- /dev/null +++ b/enginetest/queries/index_queries.go @@ -0,0 +1,2826 @@ +// Copyright 2021 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package queries + +import ( + "github.com/dolthub/go-mysql-server/sql" +) + +var ComplexIndexQueries = []QueryTest{ + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<25) OR (v1>24));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=99 AND v2<>83) OR (v1>=1));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=38 AND v2<41) OR (v1>60)) OR (v1<22));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{33, 34, 22}, sql.Row{83, 80, 61}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{36, 38, 20}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>92 AND v2>25) OR (v1 BETWEEN 6 AND 24 AND v2=80));`, + Expected: []sql.Row{sql.Row{100, 98, 61}, sql.Row{99, 98, 51}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=29) OR (v1=49 AND v2<48));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{18, 16, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>75) OR (v1<=11));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=86) OR (v1<>9)) AND (v1=87 AND v2<=45);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=5) OR (v1=71)) OR (v1<>96));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=97) OR (v1 BETWEEN 36 AND 98));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1=86 AND v2>41) OR (v1<>6 AND v2>16));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{96, 93, 21}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>22 AND v2>18) OR (v1<>12)) OR (v1<=34));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<11) OR (v1>=66 AND v2=22));`, + Expected: []sql.Row{sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{1, 0, 52}, sql.Row{8, 6, 51}, sql.Row{6, 5, 60}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>45 AND v2>37) OR (v1<98 AND v2<=35));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=16 AND v2>96) OR (v1<80));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=98) OR (v1<85 AND v2>60)) OR (v1<>53 AND v2 BETWEEN 82 AND 89));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((((v1<71 AND v2<7) OR (v1<=21 AND v2<=48)) OR (v1=44 AND v2 BETWEEN 21 AND 83)) OR (v1<=72 AND v2<>27)) OR (v1=35 AND v2 BETWEEN 78 AND 89));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=16) OR (v1>=77 AND v2>77)) OR (v1>19 AND v2>27));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=46) AND (v1>=28 AND v2<>68) OR (v1>=33 AND v2<>39));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<39 AND v2<10) OR (v1>64 AND v2<=15)) AND (v1>=41);`, + Expected: []sql.Row{sql.Row{85, 81, 4}, sql.Row{89, 84, 9}, sql.Row{80, 78, 0}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=91) OR (v1<70 AND v2>=23)) OR (v1>23 AND v2<38));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<>45 AND v2=70) OR (v1 BETWEEN 40 AND 96 AND v2 BETWEEN 48 AND 96)) OR (v1<>87 AND v2<31)) OR (v1<>62 AND v2=51)) AND (v1>=47 AND v2<29);`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{62, 58, 12}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{68, 61, 3}, sql.Row{52, 48, 22}, sql.Row{53, 49, 0}, sql.Row{95, 93, 19}, sql.Row{89, 84, 9}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{70, 63, 19}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<71) OR (v1 BETWEEN 46 AND 79));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>52) OR (v1<=14));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>74) OR (v1<>40 AND v2>=54));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=69 AND v2<24) OR (v1<77 AND v2<=53));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{77, 72, 52}, sql.Row{33, 34, 22}, sql.Row{63, 58, 32}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{18, 16, 53}, sql.Row{36, 38, 20}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1=78 AND v2=87) OR (v1 BETWEEN 37 AND 58 AND v2>=30)) AND (v1=86 AND v2 BETWEEN 0 AND 70);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>94) OR (v1<=52));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>23 AND v2>64) OR (v1>73 AND v2<=66)) OR (v1 BETWEEN 39 AND 69 AND v2>84));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{92, 86, 88}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{79, 76, 39}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{67, 60, 66}, sql.Row{89, 84, 9}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>54 AND v2<16) OR (v1<74 AND v2>29)) AND (v1 BETWEEN 34 AND 48);`, + Expected: []sql.Row{sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{47, 45, 31}, sql.Row{45, 44, 67}, sql.Row{43, 43, 63}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{44, 44, 48}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>44 AND v2>12) OR (v1<=5 AND v2>27));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=54 AND v2<>13) OR (v1>84));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>1 AND v2<>51) OR (v1=28));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1>35) OR (v1 BETWEEN 11 AND 21)) OR (v1<>98));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1=16 AND v2=57) OR (v1<46 AND v2 BETWEEN 78 AND 89));`, + Expected: []sql.Row{sql.Row{49, 45, 86}, sql.Row{30, 28, 83}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<53 AND v2<10) AND (v1<>37) OR (v1>23));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((((v1<>30) OR (v1>=6 AND v2 BETWEEN 62 AND 65)) OR (v1<>89)) OR (v1<=40 AND v2>=73)) OR (v1<99));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 34 AND 34 AND v2 BETWEEN 0 AND 91) OR (v1 BETWEEN 54 AND 77 AND v2>92));`, + Expected: []sql.Row{sql.Row{73, 65, 97}, sql.Row{33, 34, 22}, sql.Row{74, 67, 95}, sql.Row{34, 34, 91}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((((v1<=55) OR (v1>=46 AND v2<=26)) OR (v1 BETWEEN 8 AND 54)) OR (v1>26 AND v2 BETWEEN 62 AND 89)) OR (v1<31 AND v2=11)) OR (v1>9 AND v2=60));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{78, 74, 81}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 17 AND 54 AND v2>=37) AND (v1<42 AND v2=96) OR (v1<>50));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>39 AND v2>66) OR (v1=99));`, + Expected: []sql.Row{sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{92, 86, 88}, sql.Row{45, 44, 67}, sql.Row{73, 65, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{84, 80, 88}, sql.Row{71, 63, 69}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 24 AND 66) OR (v1<=81 AND v2<>29));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>18 AND v2<>8) OR (v1>=10 AND v2>3)) OR (v1=53));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=42 AND v2>34) OR (v1<=40 AND v2<=49));`, + Expected: []sql.Row{sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{33, 34, 22}, sql.Row{83, 80, 61}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{48, 45, 63}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 8 AND 38) OR (v1>=23 AND v2 BETWEEN 36 AND 49));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{50, 46, 46}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{65, 59, 45}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>57 AND v2 BETWEEN 2 AND 93) OR (v1=52));`, + Expected: []sql.Row{sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<24) OR (v1<41)) OR (v1<12 AND v2=2)) OR (v1=3 AND v2<>66));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=52 AND v2<40) AND (v1<30) OR (v1<=75 AND v2 BETWEEN 54 AND 54)) OR (v1<>31 AND v2<>56));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>52 AND v2<90) OR (v1 BETWEEN 27 AND 77 AND v2 BETWEEN 49 AND 83));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{78, 74, 81}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>2) OR (v1<72 AND v2>=21)) AND (v1=69 AND v2 BETWEEN 44 AND 48);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((v1>77) OR (v1=57)) OR (v1>9 AND v2>80)) OR (v1=22));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{92, 86, 88}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{93, 87, 51}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{89, 84, 9}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{60, 57, 29}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((v1>28) OR (v1<=30 AND v2=30)) OR (v1<29)) OR (v1 BETWEEN 54 AND 74));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>30 AND v2 BETWEEN 20 AND 41) OR (v1>=69 AND v2=51));`, + Expected: []sql.Row{sql.Row{5, 5, 36}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{52, 48, 22}, sql.Row{69, 61, 34}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{56, 51, 35}, sql.Row{33, 34, 22}, sql.Row{63, 58, 32}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{64, 59, 29}, sql.Row{96, 93, 21}, sql.Row{32, 33, 39}, sql.Row{99, 98, 51}, sql.Row{60, 57, 29}, sql.Row{36, 38, 20}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>39) OR (v1=55)) AND (v1=67);`, + Expected: []sql.Row{sql.Row{74, 67, 95}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<20 AND v2<=46) OR (v1<>4 AND v2=26)) OR (v1>36 AND v2<>13));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{17, 16, 19}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=5 AND v2>66) OR (v1<=0)) OR (v1 BETWEEN 10 AND 87));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((((v1<>99 AND v2 BETWEEN 12 AND 31) OR (v1<56 AND v2<>69)) OR (v1>=37 AND v2<47)) OR (v1<=98 AND v2=50)) AND (v1 BETWEEN 15 AND 47) OR (v1>55 AND v2>85)) OR (v1>86));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<37) OR (v1<=48 AND v2<=54)) OR (v1=88));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{51, 47, 5}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>31) OR (v1<>43)) OR (v1>37 AND v2>5));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=91) OR (v1<>79)) OR (v1<64));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>48) OR (v1>11));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>40) OR (v1>=49 AND v2>=92));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<40) OR (v1<=59)) OR (v1<99)) AND (v1>=83) OR (v1>9));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=53 AND v2<=79) OR (v1>50 AND v2>26)) AND (v1>26) AND (v1>43 AND v2<7);`, + Expected: []sql.Row{sql.Row{54, 50, 0}, sql.Row{53, 49, 0}, sql.Row{51, 47, 5}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 27 AND 84) OR (v1<98 AND v2>38)) OR (v1<>30));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1=45) OR (v1=28));`, + Expected: []sql.Row{sql.Row{49, 45, 86}, sql.Row{47, 45, 31}, sql.Row{46, 45, 22}, sql.Row{30, 28, 83}, sql.Row{29, 28, 24}, sql.Row{48, 45, 63}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (v1 BETWEEN 11 AND 18) AND (v1>31 AND v2 BETWEEN 38 AND 88);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>95 AND v2>5) OR (v1>16 AND v2>=38));`, + Expected: []sql.Row{sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=23) OR (v1=47 AND v2>23));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1=30) OR (v1<>67));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=30 AND v2>=67) OR (v1<=52));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 48 AND 86 AND v2>=29) OR (v1<>82 AND v2<=93)) OR (v1 BETWEEN 79 AND 87 AND v2 BETWEEN 13 AND 69));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 3 AND 95 AND v2>=36) OR (v1>=40 AND v2<13)) OR (v1 BETWEEN 4 AND 8 AND v2=50));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{54, 50, 0}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{23, 19, 97}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{98, 98, 0}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<11 AND v2<>32) OR (v1 BETWEEN 35 AND 41)) OR (v1>=76));`, + Expected: []sql.Row{sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{92, 86, 88}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{79, 76, 39}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{89, 84, 9}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{36, 38, 20}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1=15 AND v2=8) AND (v1>2) OR (v1 BETWEEN 50 AND 97));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{65, 59, 45}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<67 AND v2<>39) OR (v1>36));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>66) OR (v1<50));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 5 AND 19) OR (v1<>50 AND v2>=51)) OR (v1>55));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 16 AND 65) OR (v1<>18 AND v2>=81)) OR (v1 BETWEEN 6 AND 48));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1>=31 AND v2>=55) OR (v1 BETWEEN 1 AND 28)) OR (v1 BETWEEN 26 AND 41 AND v2<=15));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<=77 AND v2 BETWEEN 4 AND 26) OR (v1<=1 AND v2<>20)) OR (v1>8 AND v2>40));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{55, 50, 14}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((((v1=37 AND v2>32) OR (v1>13 AND v2>51)) AND (v1 BETWEEN 8 AND 19) OR (v1<>4)) OR (v1<=58 AND v2<>70)) OR (v1<87 AND v2>=24));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1<>50) OR (v1<=88)) OR (v1>=28 AND v2 BETWEEN 30 AND 85));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=94) OR (v1<=87));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<>56 AND v2<93) OR (v1<73 AND v2<=70));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((v1>=85) OR (v1=91)) OR (v1<88 AND v2<42)) OR (v1<>42 AND v2<=10));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{56, 51, 35}, sql.Row{89, 84, 9}, sql.Row{33, 34, 22}, sql.Row{63, 58, 32}, sql.Row{17, 16, 19}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{28, 27, 24}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{99, 98, 51}, sql.Row{31, 31, 14}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{36, 38, 20}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>42 AND v2<=13) OR (v1=7));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{62, 58, 12}, sql.Row{54, 50, 0}, sql.Row{68, 61, 3}, sql.Row{53, 49, 0}, sql.Row{89, 84, 9}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{98, 98, 0}, sql.Row{75, 68, 11}, sql.Row{94, 89, 3}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1=63) OR (v1 BETWEEN 55 AND 82 AND v2 BETWEEN 0 AND 6)) OR (v1=46));`, + Expected: []sql.Row{sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{50, 46, 46}, sql.Row{68, 61, 3}, sql.Row{80, 78, 0}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 20 AND 77 AND v2>=49) OR (v1<13));`, + Expected: []sql.Row{sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{66, 59, 54}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{43, 43, 63}, sql.Row{1, 0, 52}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{6, 5, 60}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1>=72) OR (v1<49 AND v2<>36)) OR (v1>=10 AND v2<1));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE (((v1 BETWEEN 18 AND 87) OR (v1>=42 AND v2>44)) OR (v1<26 AND v2<=55)) AND (v1<=21);`, + Expected: []sql.Row{sql.Row{3, 2, 10}, sql.Row{5, 5, 36}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{2, 2, 4}, sql.Row{0, 0, 48}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{22, 19, 75}, sql.Row{18, 16, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>98 AND v2<75) OR (v1=47));`, + Expected: []sql.Row{sql.Row{51, 47, 5}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=57 AND v2>=43) OR (v1<27 AND v2<>3));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{15, 14, 57}, sql.Row{16, 14, 98}, sql.Row{21, 19, 48}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{59, 56, 60}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{25, 25, 14}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 16 AND 45 AND v2=22) OR (v1>=87 AND v2=48));`, + Expected: []sql.Row{sql.Row{46, 45, 22}, sql.Row{33, 34, 22}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 45 AND 74 AND v2<=74) OR (v1<>48 AND v2>58));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{10, 6, 73}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{23, 19, 97}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((((v1<32 AND v2>=79) OR (v1<=28)) OR (v1 BETWEEN 46 AND 72)) OR (v1>16));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<10) OR (v1<89));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1>=64 AND v2>=69) OR (v1>=2));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{85, 81, 4}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{93, 87, 51}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{95, 93, 19}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{89, 84, 9}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{80, 78, 0}, sql.Row{86, 82, 16}, sql.Row{96, 93, 21}, sql.Row{98, 98, 0}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{75, 68, 11}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}, sql.Row{94, 89, 3}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1<=65) OR (v1<64));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{58, 56, 0}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{3, 2, 10}, sql.Row{49, 45, 86}, sql.Row{5, 5, 36}, sql.Row{9, 6, 60}, sql.Row{50, 46, 46}, sql.Row{62, 58, 12}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{54, 50, 0}, sql.Row{55, 50, 14}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{68, 61, 3}, sql.Row{4, 3, 35}, sql.Row{7, 6, 1}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{2, 2, 4}, sql.Row{12, 9, 97}, sql.Row{30, 28, 83}, sql.Row{53, 49, 0}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{0, 0, 48}, sql.Row{10, 6, 73}, sql.Row{11, 9, 44}, sql.Row{20, 18, 31}, sql.Row{41, 42, 0}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{1, 0, 52}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{39, 39, 86}, sql.Row{8, 6, 51}, sql.Row{14, 14, 53}, sql.Row{17, 16, 19}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{51, 47, 5}, sql.Row{64, 59, 29}, sql.Row{25, 25, 14}, sql.Row{27, 27, 9}, sql.Row{32, 33, 39}, sql.Row{6, 5, 60}, sql.Row{22, 19, 75}, sql.Row{31, 31, 14}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{70, 63, 19}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{36, 38, 20}, sql.Row{42, 42, 82}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1=46) OR (v1>9 AND v2>=22));`, + Expected: []sql.Row{sql.Row{19, 16, 95}, sql.Row{61, 57, 49}, sql.Row{72, 65, 80}, sql.Row{49, 45, 86}, sql.Row{50, 46, 46}, sql.Row{92, 86, 88}, sql.Row{15, 14, 57}, sql.Row{47, 45, 31}, sql.Row{87, 83, 30}, sql.Row{91, 86, 56}, sql.Row{16, 14, 98}, sql.Row{66, 59, 54}, sql.Row{76, 69, 34}, sql.Row{79, 76, 39}, sql.Row{21, 19, 48}, sql.Row{46, 45, 22}, sql.Row{57, 54, 38}, sql.Row{93, 87, 51}, sql.Row{45, 44, 67}, sql.Row{52, 48, 22}, sql.Row{30, 28, 83}, sql.Row{69, 61, 34}, sql.Row{73, 65, 97}, sql.Row{90, 84, 45}, sql.Row{82, 79, 36}, sql.Row{20, 18, 31}, sql.Row{43, 43, 63}, sql.Row{65, 59, 45}, sql.Row{100, 98, 61}, sql.Row{13, 13, 44}, sql.Row{56, 51, 35}, sql.Row{59, 56, 60}, sql.Row{67, 60, 66}, sql.Row{77, 72, 52}, sql.Row{24, 24, 60}, sql.Row{33, 34, 22}, sql.Row{35, 35, 89}, sql.Row{63, 58, 32}, sql.Row{83, 80, 61}, sql.Row{39, 39, 86}, sql.Row{14, 14, 53}, sql.Row{23, 19, 97}, sql.Row{26, 25, 31}, sql.Row{29, 28, 24}, sql.Row{38, 39, 55}, sql.Row{40, 40, 97}, sql.Row{74, 67, 95}, sql.Row{78, 74, 81}, sql.Row{81, 78, 90}, sql.Row{88, 83, 74}, sql.Row{28, 27, 24}, sql.Row{37, 38, 66}, sql.Row{48, 45, 63}, sql.Row{64, 59, 29}, sql.Row{32, 33, 39}, sql.Row{84, 80, 88}, sql.Row{99, 98, 51}, sql.Row{22, 19, 75}, sql.Row{44, 44, 48}, sql.Row{60, 57, 29}, sql.Row{71, 63, 69}, sql.Row{18, 16, 53}, sql.Row{34, 34, 91}, sql.Row{42, 42, 82}, sql.Row{97, 93, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t0 WHERE ((v1 BETWEEN 21 AND 33 AND v2>25) OR (v1<0));`, + Expected: []sql.Row{sql.Row{30, 28, 83}, sql.Row{24, 24, 60}, sql.Row{26, 25, 31}, sql.Row{32, 33, 39}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>87 AND v2 BETWEEN 8 AND 33) OR (v1 BETWEEN 39 AND 69 AND v3<4));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{99, 98, 31, 21}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=55 AND v2>=72 AND v3=63) AND (v1<>54 AND v2 BETWEEN 3 AND 80) OR (v1=15)) AND (v1<>50);`, + Expected: []sql.Row{sql.Row{22, 15, 2, 69}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<93 AND v2<39 AND v3 BETWEEN 30 AND 97) OR (v1>54)) OR (v1<66));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>59 AND v2<=15) OR (v1 BETWEEN 2 AND 51)) OR (v1>15 AND v2 BETWEEN 31 AND 81));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<3 AND v2<>23 AND v3<>11) OR (v1<>49)) AND (v1<=41 AND v2>40);`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 28 AND 38 AND v3<33) OR (v1 BETWEEN 75 AND 85)) AND (v1>=60) OR (v1>=53 AND v2 BETWEEN 36 AND 53 AND v3>48));`, + Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{84, 82, 11, 6}, sql.Row{80, 75, 91, 35}, sql.Row{81, 76, 40, 52}, sql.Row{82, 76, 44, 87}, sql.Row{85, 82, 46, 32}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<6 AND v2<>44) OR (v1 BETWEEN 27 AND 96)) OR (v1>22 AND v2<>30 AND v3<49));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>29 AND v2=40) OR (v1<=74)) OR (v1<13 AND v2 BETWEEN 27 AND 82 AND v3<82));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>6 AND v2 BETWEEN 0 AND 97) OR (v1<>40 AND v3<10 AND v2<>10));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>=35) OR (v1=86)) OR (v1>41 AND v2>=92)) OR (v1<>28));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<16 AND v3=63 AND v2>=20) OR (v1<>41)) OR (v1<=74 AND v3 BETWEEN 14 AND 74 AND v2<>13));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1 BETWEEN 1 AND 11) OR (v1>2 AND v3<=93 AND v2 BETWEEN 28 AND 84)) OR (v1 BETWEEN 34 AND 52 AND v2=73)) OR (v1<>80 AND v2<=32 AND v3 BETWEEN 3 AND 7));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<45) OR (v1<>72)) OR (v1 BETWEEN 10 AND 86 AND v2=92)) OR (v1 BETWEEN 32 AND 81 AND v2>59));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=11 AND v2>50 AND v3 BETWEEN 5 AND 67) AND (v1>74 AND v2 BETWEEN 6 AND 63 AND v3<=1) OR (v1>=53 AND v2>69 AND v3>54));`, + Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{61, 55, 81, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>9) OR (v1>14 AND v2>10));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=39 AND v2 BETWEEN 17 AND 34) OR (v1=89 AND v3>49 AND v2>58)) OR (v1>97));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{99, 98, 31, 21}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<7 AND v2<>43) OR (v1<>5 AND v3<0 AND v2<1));`, + Expected: []sql.Row{sql.Row{2, 3, 38, 37}, sql.Row{3, 3, 99, 99}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{4, 5, 17, 42}, sql.Row{5, 6, 6, 76}, sql.Row{0, 0, 3, 16}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>30 AND v2 BETWEEN 23 AND 60 AND v3=58) OR (v1<=3 AND v2 BETWEEN 68 AND 72)) OR (v1<=17)) OR (v1>6 AND v2>=24)) AND (v1<89 AND v2=73);`, + Expected: []sql.Row{sql.Row{73, 66, 73, 4}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>27) OR (v1>=22 AND v2>99 AND v3>=43));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>25 AND v2 BETWEEN 1 AND 82) OR (v1>31 AND v2=86));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>12 AND v2<60 AND v3=91) OR (v1>63 AND v2>=8 AND v3<>32)) OR (v1>35 AND v3>=98));`, + Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>27 AND v3=10) OR (v1>=25 AND v2<26)) AND (v1>=62 AND v2<=96 AND v3>28);`, + Expected: []sql.Row{sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>30 AND v2=40 AND v3 BETWEEN 35 AND 35) OR (v1 BETWEEN 20 AND 77 AND v2>=56 AND v3>62));`, + Expected: []sql.Row{sql.Row{47, 36, 84, 75}, sql.Row{78, 72, 65, 64}, sql.Row{49, 38, 88, 68}, sql.Row{52, 42, 80, 85}, sql.Row{59, 54, 57, 83}, sql.Row{61, 55, 81, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((((v1<=92 AND v3=0 AND v2>=9) OR (v1 BETWEEN 48 AND 79)) OR (v1>70 AND v2<=26 AND v3 BETWEEN 14 AND 82)) OR (v1>=29 AND v2<>21 AND v3 BETWEEN 37 AND 55)) OR (v1>=6 AND v3<=47));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=15 AND v2>28) OR (v1<=84 AND v2<>91));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=49 AND v2<=52 AND v3 BETWEEN 23 AND 38) OR (v1 BETWEEN 30 AND 84 AND v2=94));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 8 AND 18) OR (v1=27 AND v2<=4 AND v3<14));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{22, 15, 2, 69}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{15, 10, 47, 36}, sql.Row{9, 8, 9, 21}, sql.Row{10, 8, 37, 90}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{20, 14, 38, 24}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=4) OR (v1=0 AND v2<=63));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1<=99 AND v2<>86) AND (v1>=21 AND v2>36);`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>43) OR (v1=14));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1 BETWEEN 21 AND 44 AND v2 BETWEEN 18 AND 88 AND v3=42) AND (v1>=52 AND v2>37 AND v3 BETWEEN 26 AND 91);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>29 AND v2>93 AND v3<64) OR (v1<>54 AND v2>35));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<88) OR (v1<>45 AND v2<89)) AND (v1=98 AND v2<=81 AND v3 BETWEEN 34 AND 77);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>65 AND v2<>86 AND v3<=2) OR (v1<>37 AND v2<=96));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>79) OR (v1>66)) AND (v1<>81 AND v2<34 AND v3>=25) AND (v1<42) OR (v1<>12 AND v2<>17 AND v3<=23));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{50, 41, 17, 68}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{70, 63, 85, 23}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<81 AND v2>=28) OR (v1=19 AND v2 BETWEEN 9 AND 57));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<32) OR (v1>=52)) OR (v1>=98));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>47) OR (v1<>25));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1>27 AND v2<=80 AND v3 BETWEEN 11 AND 37) AND (v1=87 AND v2<54) AND (v1>29);`, + Expected: []sql.Row{sql.Row{90, 87, 22, 34}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>65 AND v2>=52) OR (v1<=85)) OR (v1<=64 AND v3=9 AND v2>=36));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=12 AND v2>=65) OR (v1=11 AND v2<1));`, + Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{49, 38, 88, 68}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{43, 33, 70, 50}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{61, 55, 81, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=92 AND v2<=42) OR (v1>=58));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>0) OR (v1<81 AND v2>=70)) OR (v1>=52));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>5 AND v3<=32) OR (v1 BETWEEN 77 AND 85 AND v3 BETWEEN 16 AND 21 AND v2 BETWEEN 10 AND 42));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>43 AND v2<53 AND v3<=20) OR (v1<7 AND v2<>79));`, + Expected: []sql.Row{sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{71, 65, 17, 9}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{4, 5, 17, 42}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{5, 6, 6, 76}, sql.Row{0, 0, 3, 16}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1>=17 AND v2 BETWEEN 17 AND 78 AND v3=10) AND (v1<=67) AND (v1>=81 AND v2<=88 AND v3>=70);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<77 AND v2<35 AND v3=73) OR (v1=85 AND v2>0 AND v3<65)) AND (v1>=20 AND v3<23 AND v2<=81) OR (v1<34 AND v2<=21 AND v3<=45));`, + Expected: []sql.Row{sql.Row{13, 10, 16, 21}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{31, 24, 20, 8}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{0, 0, 3, 16}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((((v1<=69) AND (v1>=60 AND v2<18 AND v3=15) OR (v1<=75)) OR (v1>=52 AND v2<10)) OR (v1<37 AND v2<=64)) OR (v1>38 AND v2=27));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1<=76) AND (v1<=94);`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<>40 AND v2>1) OR (v1>3 AND v2<=42)) OR (v1=99 AND v2>62)) OR (v1<17 AND v2<>75 AND v3=6));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=39) OR (v1=40 AND v2<>49)) OR (v1<>35 AND v2>4 AND v3>26)) OR (v1=32 AND v2<>55));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{12, 9, 71, 82}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=16 AND v2<>25 AND v3<>3) OR (v1>=4 AND v2 BETWEEN 4 AND 93 AND v3>39));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{12, 9, 71, 82}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{81, 76, 40, 52}, sql.Row{67, 59, 77, 53}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{29, 23, 28, 90}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>=51 AND v2<83) OR (v1>=15 AND v2>=3)) OR (v1<=49)) OR (v1<69));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1<>43 AND v2>10) AND (v1>30 AND v2 BETWEEN 18 AND 78 AND v3 BETWEEN 75 AND 81);`, + Expected: []sql.Row{sql.Row{89, 86, 63, 79}, sql.Row{42, 32, 40, 76}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>1) OR (v1<34 AND v2>=57 AND v3 BETWEEN 15 AND 67));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>3 AND v2>32) OR (v1<=26 AND v3>=27 AND v2>=5));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>25 AND v2<>70 AND v3<=51) OR (v1<=71 AND v2>59));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 0 AND 61 AND v2<0) OR (v1 BETWEEN 0 AND 38 AND v2>34)) OR (v1>=13 AND v2>=41));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>68 AND v2<=57) AND (v1<>84 AND v3 BETWEEN 24 AND 98 AND v2 BETWEEN 28 AND 45) OR (v1>0 AND v2<>47 AND v3>=69)) OR (v1>=44));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{12, 9, 71, 82}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=48 AND v2 BETWEEN 33 AND 66) OR (v1>=91));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{7, 7, 33, 51}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 17 AND 52 AND v2<96) OR (v1<=12 AND v2<>4 AND v3>53)) OR (v1<98 AND v3<94 AND v2=5));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>26 AND v2 BETWEEN 66 AND 79 AND v3<=94) OR (v1 BETWEEN 16 AND 55));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1 BETWEEN 36 AND 67 AND v3<74 AND v2=26) AND (v1 BETWEEN 9 AND 10 AND v2=96) AND (v1<=11 AND v2<>63 AND v3>=62);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 28 AND 49 AND v2<47) OR (v1>37 AND v2 BETWEEN 45 AND 61 AND v3<73));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{38, 29, 27, 48}, sql.Row{54, 46, 58, 8}, sql.Row{74, 67, 55, 27}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{35, 28, 39, 84}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<37 AND v2>=26 AND v3<=14) OR (v1<64)) OR (v1 BETWEEN 31 AND 53 AND v2>55 AND v3<=55));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=77) OR (v1<50)) AND (v1<=53 AND v2>35 AND v3<>98);`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=2 AND v2=40 AND v3 BETWEEN 18 AND 67) OR (v1=14 AND v2<=24 AND v3<=87)) OR (v1 BETWEEN 8 AND 31 AND v2>86)) OR (v1>30));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>46 AND v2<>49 AND v3<=44) OR (v1 BETWEEN 64 AND 80 AND v2=41 AND v3<=68));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=95 AND v3<47 AND v2>=97) OR (v1 BETWEEN 11 AND 36 AND v2<=83));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{38, 29, 27, 48}, sql.Row{22, 15, 2, 69}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=65 AND v2=39 AND v3 BETWEEN 49 AND 67) OR (v1<57 AND v2>35));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{65, 56, 66, 33}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>71 AND v2=33) OR (v1<>85 AND v2<>50 AND v3 BETWEEN 34 AND 67)) OR (v1 BETWEEN 5 AND 47 AND v3 BETWEEN 13 AND 76 AND v2=4)) OR (v1=16 AND v2>=29 AND v3<>80));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{27, 23, 13, 53}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{67, 59, 77, 53}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{30, 23, 30, 44}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=17 AND v2>38) AND (v1>=79) OR (v1<>38));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=4 AND v2=26) OR (v1>21 AND v2 BETWEEN 14 AND 64));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>50) OR (v1<=58 AND v2<=95)) OR (v1=10));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=21 AND v2<>95) OR (v1<>23 AND v2 BETWEEN 15 AND 22)) OR (v1<=53 AND v2>=6)) OR (v1<=13 AND v2<>93 AND v3<15));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1<64 AND v2>=90 AND v3>41) AND (v1>=14 AND v2 BETWEEN 30 AND 70 AND v3>=25);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<27 AND v2<=43) OR (v1<62 AND v2<=99)) OR (v1<>48 AND v2<29 AND v3<>69));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<11 AND v2<70 AND v3>27) OR (v1>=80 AND v2<31 AND v3<65)) OR (v1>=98 AND v2 BETWEEN 30 AND 85 AND v3>=30));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{2, 3, 38, 37}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{7, 7, 33, 51}, sql.Row{4, 5, 17, 42}, sql.Row{15, 10, 47, 36}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{90, 87, 22, 34}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1<>44 AND v2>=10) AND (v1=47 AND v2=14 AND v3<30);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>6 AND v2=50) OR (v1>=16));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=31) OR (v1>53 AND v2<>11 AND v3<>94)) OR (v1>48 AND v2 BETWEEN 11 AND 29 AND v3 BETWEEN 68 AND 72));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 55 AND 59) OR (v1<=10 AND v2>=24)) AND (v1>93 AND v3<70 AND v2 BETWEEN 44 AND 79) AND (v1>=22 AND v2=27);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=43 AND v2<28 AND v3<>24) OR (v1<36 AND v2=14 AND v3 BETWEEN 16 AND 55));`, + Expected: []sql.Row{sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{62, 56, 0, 97}, sql.Row{53, 45, 1, 57}, sql.Row{55, 49, 26, 11}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{69, 61, 11, 25}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>48 AND v2<=80) OR (v1=72 AND v3 BETWEEN 45 AND 52 AND v2=98));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{78, 72, 65, 64}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1>=98 AND v2=51) AND (v1>34);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>2) OR (v1<=30)) OR (v1<>35 AND v2 BETWEEN 6 AND 61 AND v3>=16));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>19) OR (v1<>48));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 12 AND 42 AND v2<=12) OR (v1<34 AND v2 BETWEEN 30 AND 47 AND v3<>50));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{7, 7, 33, 51}, sql.Row{22, 15, 2, 69}, sql.Row{34, 27, 35, 12}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{41, 31, 47, 91}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((((v1>=6) OR (v1>7)) OR (v1<88 AND v2<=34 AND v3<=47)) OR (v1>=10)) OR (v1=10));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=74) OR (v1>=1)) OR (v1=54 AND v2>=38 AND v3>2)) AND (v1>5);`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=45 AND v2>18) OR (v1<64 AND v2=25 AND v3>97));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<37 AND v3>77) OR (v1>38 AND v3<>57 AND v2=87));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{12, 9, 71, 82}, sql.Row{3, 3, 99, 99}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{29, 23, 28, 90}, sql.Row{41, 31, 47, 91}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{35, 28, 39, 84}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<96 AND v2>11 AND v3<76) OR (v1<=14 AND v2=23)) OR (v1<=15 AND v2<21 AND v3<91)) OR (v1=45 AND v2<11 AND v3=1));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{33, 26, 15, 28}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{5, 6, 6, 76}, sql.Row{30, 23, 30, 44}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>23 AND v3<=52) OR (v1<>19 AND v2=25));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1<=12 AND v2>=65) AND (v1<6 AND v2>=92);`, + Expected: []sql.Row{sql.Row{3, 3, 99, 99}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=62 AND v2<>32) OR (v1>=55 AND v2=41 AND v3>73));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>34 AND v2<=62) OR (v1>5 AND v2 BETWEEN 59 AND 98 AND v3<69)) OR (v1>34));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1=61 AND v2 BETWEEN 10 AND 22 AND v3<34) OR (v1=68)) OR (v1<=97 AND v3 BETWEEN 7 AND 63 AND v2<67));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=42) OR (v1 BETWEEN 13 AND 30 AND v2<50));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 16 AND 49) OR (v1<=69 AND v2>9 AND v3<=8));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>71 AND v2>44) OR (v1<76 AND v2>=10)) OR (v1>=44 AND v2=66));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((((v1>=26) OR (v1>=13 AND v2 BETWEEN 35 AND 95 AND v3>=29)) OR (v1<>54 AND v2 BETWEEN 0 AND 54)) OR (v1 BETWEEN 17 AND 17 AND v2<=71)) OR (v1>50 AND v3>=42)) OR (v1<>0));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=99 AND v2<66) OR (v1 BETWEEN 1 AND 47)) OR (v1<>2 AND v2<30));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>9 AND v2<74) AND (v1<=63 AND v2=18) OR (v1<46));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=20 AND v2<=62) OR (v1>45 AND v2=33 AND v3<=4)) OR (v1>29));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=55 AND v2 BETWEEN 82 AND 96 AND v3>=13) OR (v1>=89 AND v2<18 AND v3<19)) OR (v1=98 AND v3>=40)) OR (v1 BETWEEN 7 AND 74 AND v2<=73));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=26 AND v2 BETWEEN 6 AND 80) AND (v1=47 AND v2<67 AND v3<7) OR (v1>63));`, + Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<11) OR (v1<>33));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=35) AND (v1=44 AND v2<78 AND v3>=40) OR (v1<>88 AND v2=8)) AND (v1>=99 AND v2=62) OR (v1<=94)) OR (v1 BETWEEN 22 AND 23 AND v2 BETWEEN 14 AND 46));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<9 AND v2=94 AND v3>8) OR (v1>=63));`, + Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<43) OR (v1 BETWEEN 40 AND 49 AND v2>26 AND v3 BETWEEN 22 AND 80));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 4 AND 85 AND v2<>45 AND v3<=41) OR (v1>67 AND v2<25));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{46, 36, 4, 36}, sql.Row{18, 13, 47, 30}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>77) OR (v1<=54 AND v2<=71 AND v3>=49)) OR (v1>54 AND v2<30 AND v3=6));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1 BETWEEN 21 AND 53 AND v2=0 AND v3>32) OR (v1=93 AND v2>=94 AND v3<1)) OR (v1<26)) OR (v1<>11 AND v2<>32 AND v3=6)) AND (v1>=45);`, + Expected: []sql.Row{sql.Row{84, 82, 11, 6}, sql.Row{57, 50, 86, 6}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>50) OR (v1<=71));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=41) OR (v1>29 AND v2<>31));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<88 AND v2<91 AND v3>9) AND (v1>=5 AND v2 BETWEEN 21 AND 29 AND v3>18) OR (v1>=40));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>2 AND v2<76 AND v3<=35) OR (v1<=12 AND v3 BETWEEN 25 AND 30));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{71, 65, 17, 9}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{18, 13, 47, 30}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{55, 49, 26, 11}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1 BETWEEN 25 AND 84 AND v2<=94) OR (v1>66 AND v2>4 AND v3>=57)) OR (v1=78 AND v2>66 AND v3=19)) OR (v1<>48));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=24) OR (v1>=47 AND v2<=75 AND v3<=52));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=21 AND v2<>70) OR (v1<=77 AND v2>4)) OR (v1<28 AND v2<=3 AND v3<>21));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=60 AND v2>91) OR (v1<=10));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{3, 3, 99, 99}, sql.Row{7, 7, 33, 51}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{13, 10, 16, 21}, sql.Row{4, 5, 17, 42}, sql.Row{15, 10, 47, 36}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{0, 0, 3, 16}, sql.Row{87, 84, 93, 37}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>98 AND v2<52) OR (v1 BETWEEN 65 AND 67)) OR (v1 BETWEEN 18 AND 54)) AND (v1>=14 AND v2=27);`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{38, 29, 27, 48}, sql.Row{48, 37, 27, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=43 AND v2<>39) AND (v1<=32 AND v2<=15 AND v3>=54) OR (v1<>68 AND v2 BETWEEN 42 AND 46));`, + Expected: []sql.Row{sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{60, 55, 45, 46}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{26, 21, 42, 76}, sql.Row{85, 82, 46, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1>=19 AND v2<2) AND (v1<4 AND v3>23 AND v2<>53);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 34 AND 40) OR (v1<=80 AND v2<>53)) AND (v1=81 AND v2=17 AND v3<>12);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>34 AND v2 BETWEEN 18 AND 67 AND v3<67) OR (v1>21));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>45) OR (v1>=91 AND v2>=8 AND v3<=38)) OR (v1<>58 AND v3<=32 AND v2<>45));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=48) OR (v1<38 AND v2>=26)) AND (v1<=45 AND v2>21) AND (v1=83 AND v2=20);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>25) OR (v1<53));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<95 AND v2>=12) OR (v1 BETWEEN 41 AND 55 AND v2<=81 AND v3<46));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>39 AND v2 BETWEEN 53 AND 73 AND v3<=11) OR (v1<=31 AND v2=68 AND v3>=71)) OR (v1<>18 AND v2<=51));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1>4) AND (v1=3 AND v2 BETWEEN 4 AND 34 AND v3<=40);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>36 AND v2>82) OR (v1 BETWEEN 22 AND 59));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=0) OR (v1 BETWEEN 17 AND 45));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{34, 27, 35, 12}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<1 AND v3<=34) OR (v1 BETWEEN 2 AND 57 AND v2<>70));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1>4) AND (v1 BETWEEN 8 AND 35 AND v2>=94 AND v3=32) AND (v1>=12);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=93 AND v3<>47) OR (v1>=93 AND v2 BETWEEN 15 AND 42 AND v3<=6)) OR (v1>15)) OR (v1 BETWEEN 0 AND 1 AND v2>33));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>12) OR (v1>=26 AND v2 BETWEEN 77 AND 87 AND v3<19)) OR (v1<=89));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1=27 AND v2=16 AND v3>=8) OR (v1<20 AND v2>=1 AND v3 BETWEEN 28 AND 47)) OR (v1 BETWEEN 15 AND 43 AND v2>30));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{2, 3, 38, 37}, sql.Row{40, 31, 47, 21}, sql.Row{47, 36, 84, 75}, sql.Row{51, 41, 77, 26}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{8, 7, 37, 42}, sql.Row{35, 28, 39, 84}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=67 AND v2<>69) OR (v1<28 AND v2<62 AND v3>=99));`, + Expected: []sql.Row{sql.Row{74, 67, 55, 27}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<45 AND v2>5 AND v3>20) OR (v1<17));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=40 AND v2<>18) OR (v1<>97 AND v2<>17 AND v3<>48));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>63) AND (v1<=44 AND v2<>43 AND v3=29) OR (v1=38 AND v2>45));`, + Expected: []sql.Row{sql.Row{49, 38, 88, 68}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=6) OR (v1>0 AND v2 BETWEEN 3 AND 50));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{50, 41, 17, 68}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{23, 16, 40, 36}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 5 AND 35 AND v2<=3 AND v3<>14) OR (v1>11));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<50) AND (v1<19 AND v2>=10) OR (v1<36 AND v2>10 AND v3<>65));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=56 AND v3<=4 AND v2=46) OR (v1 BETWEEN 21 AND 53 AND v2<>63)) OR (v1 BETWEEN 10 AND 62 AND v2>=62)) OR (v1>31));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<20 AND v2>=1 AND v3=26) OR (v1=12));`, + Expected: []sql.Row{sql.Row{16, 12, 44, 84}, sql.Row{17, 12, 66, 40}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>51) AND (v1<>4 AND v2<47 AND v3>=77) OR (v1>41 AND v3>62));`, + Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{78, 72, 65, 64}, sql.Row{62, 56, 0, 97}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{93, 90, 30, 67}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{35, 28, 39, 84}, sql.Row{59, 54, 57, 83}, sql.Row{61, 55, 81, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<35) OR (v1>=58 AND v2>=0));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>28 AND v2<95) OR (v1<91));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (v1=99 AND v2<=41 AND v3>=61) AND (v1=34 AND v2>68 AND v3<=42);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=74 AND v2<=18) OR (v1>=72)) AND (v1=95 AND v2=31 AND v3 BETWEEN 5 AND 19);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1=64) OR (v1>=49 AND v2<9 AND v3<=49));`, + Expected: []sql.Row{sql.Row{95, 93, 7, 26}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=46) AND (v1<22 AND v2<>42 AND v3<>54) OR (v1>=55 AND v2 BETWEEN 11 AND 84));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{78, 72, 65, 64}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{86, 84, 40, 8}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=7) OR (v1<54));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<=95 AND v2=55 AND v3>34) OR (v1=19));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1=51 AND v2<=9) OR (v1<>50)) OR (v1<>4 AND v2>56)) OR (v1 BETWEEN 3 AND 18 AND v2>10 AND v3=12));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1<=90 AND v2<=17) OR (v1=2)) OR (v1<>70 AND v2>=84 AND v3<>42)) OR (v1<11 AND v2<>47 AND v3<55));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{62, 56, 0, 97}, sql.Row{13, 10, 16, 21}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{5, 6, 6, 76}, sql.Row{69, 61, 11, 25}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 50 AND 59) OR (v1>=23 AND v3>=87 AND v2<>46));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{63, 56, 8, 78}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{41, 31, 47, 91}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{59, 54, 57, 83}, sql.Row{57, 50, 86, 6}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<53) OR (v1<=3));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=16 AND v2 BETWEEN 66 AND 94) OR (v1>70 AND v2<=3)) AND (v1<>91) OR (v1=17 AND v2>=7));`, + Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{49, 38, 88, 68}, sql.Row{79, 74, 78, 26}, sql.Row{43, 33, 70, 50}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{61, 55, 81, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<29 AND v3>=33 AND v2=43) OR (v1<59));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>19 AND v2>84 AND v3>94) OR (v1>=42 AND v3=41));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=8 AND v2<=97 AND v3>=77) OR (v1<>4)) OR (v1<=41));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>33) OR (v1<=28)) OR (v1<>68));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<>15 AND v2>=22 AND v3<=51) OR (v1<>40 AND v2>26 AND v3<95));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>6) OR (v1<=67 AND v2<>67 AND v3>=88));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=0) OR (v1<=53)) OR (v1<=38));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1=60 AND v3 BETWEEN 2 AND 13 AND v2 BETWEEN 10 AND 69) OR (v1 BETWEEN 1 AND 49)) OR (v1=8 AND v2<26));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 14 AND 20 AND v2<>70) OR (v1>78 AND v2 BETWEEN 31 AND 52 AND v3>16)) OR (v1 BETWEEN 77 AND 78));`, + Expected: []sql.Row{sql.Row{22, 15, 2, 69}, sql.Row{100, 98, 42, 22}, sql.Row{99, 98, 31, 21}, sql.Row{24, 20, 29, 93}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<80 AND v2 BETWEEN 41 AND 74) OR (v1>=36 AND v2=32));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{54, 46, 58, 8}, sql.Row{65, 56, 66, 33}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{16, 12, 44, 84}, sql.Row{60, 55, 45, 46}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{72, 66, 46, 46}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=24 AND v2=62) OR (v1<=24 AND v3<>22 AND v2 BETWEEN 12 AND 25)) OR (v1 BETWEEN 48 AND 49 AND v3>=90)) AND (v1<15 AND v2<>55 AND v3=51);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<66 AND v2>=11 AND v3<90) OR (v1<>90)) OR (v1<=7 AND v2=52));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 6 AND 74 AND v2=52) OR (v1>44 AND v3>=15 AND v2 BETWEEN 17 AND 94)) OR (v1>84));`, + Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=38) OR (v1=13)) OR (v1=25 AND v2<=32 AND v3 BETWEEN 12 AND 92));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{18, 13, 47, 30}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=84) OR (v1=41)) OR (v1<83 AND v2=13 AND v3=58));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<36 AND v2<=79 AND v3>47) OR (v1 BETWEEN 24 AND 89 AND v2<29));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{12, 9, 71, 82}, sql.Row{84, 82, 11, 6}, sql.Row{27, 23, 13, 53}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{22, 15, 2, 69}, sql.Row{62, 56, 0, 97}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{42, 32, 40, 76}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 3 AND 19 AND v2<=57 AND v3>61) OR (v1<=58 AND v2>=36 AND v3=31)) AND (v1>94);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1<78 AND v2 BETWEEN 55 AND 64 AND v3>=0) OR (v1<74));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<>1 AND v2=88 AND v3<33) OR (v1<=38)) OR (v1>74 AND v3<>55 AND v2>=9));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1 BETWEEN 15 AND 96 AND v2<>73) OR (v1>=16));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=72 AND v2<>19 AND v3 BETWEEN 9 AND 12) OR (v1<=77 AND v2=30 AND v3<=10));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>28 AND v2>=73 AND v3=79) AND (v1<=70 AND v2 BETWEEN 5 AND 36) OR (v1<=31)) OR (v1<36)) OR (v1=47 AND v2 BETWEEN 0 AND 92 AND v3<=43));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{15, 10, 47, 36}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{20, 14, 38, 24}, sql.Row{28, 23, 28, 68}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>24) AND (v1>68 AND v2 BETWEEN 1 AND 79 AND v3 BETWEEN 23 AND 44) OR (v1>78));`, + Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{96, 94, 92, 38}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{86, 84, 40, 8}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1=47 AND v2=7) OR (v1>=7 AND v2<>87)) OR (v1<>6 AND v2<=84));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>=49 AND v2>53 AND v3<>12) OR (v1=95 AND v2<1 AND v3<>89)) OR (v1=62 AND v3>=37 AND v2<=22)) OR (v1>30 AND v2>=66));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{97, 95, 89, 66}, sql.Row{47, 36, 84, 75}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{49, 38, 88, 68}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{43, 33, 70, 50}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1=24 AND v2<81) OR (v1<=22 AND v2>34 AND v3<55)) OR (v1=45 AND v2>=94 AND v3>17));`, + Expected: []sql.Row{sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{1, 2, 65, 9}, sql.Row{6, 6, 81, 33}, sql.Row{18, 13, 47, 30}, sql.Row{17, 12, 66, 40}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{15, 10, 47, 36}, sql.Row{8, 7, 37, 42}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{20, 14, 38, 24}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>38) OR (v1<51 AND v2>=28 AND v3=44)) OR (v1 BETWEEN 23 AND 61 AND v2 BETWEEN 54 AND 75 AND v3<>44)) OR (v1>72));`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((((v1>40 AND v2 BETWEEN 26 AND 30) OR (v1<3 AND v2>=62 AND v3<=8)) OR (v1<>57)) OR (v1=16 AND v2>92 AND v3<=74));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<=34 AND v2 BETWEEN 29 AND 35 AND v3>=64) OR (v1<>47)) AND (v1>=11) OR (v1<>46 AND v2 BETWEEN 4 AND 26));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1 BETWEEN 41 AND 98 AND v2>54) OR (v1<29)) OR (v1<32));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{64, 56, 58, 4}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{76, 70, 58, 33}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{15, 10, 47, 36}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{92, 88, 88, 42}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{20, 14, 38, 24}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{28, 23, 28, 68}, sql.Row{61, 55, 81, 80}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=79 AND v3 BETWEEN 9 AND 95) OR (v1 BETWEEN 50 AND 50 AND v2 BETWEEN 16 AND 38 AND v3<>94));`, + Expected: []sql.Row{sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{96, 94, 92, 38}, sql.Row{89, 86, 63, 79}, sql.Row{100, 98, 42, 22}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((((v1<>79) OR (v1 BETWEEN 9 AND 11 AND v2<48 AND v3<=73)) OR (v1<=46)) OR (v1 BETWEEN 66 AND 67)) OR (v1<=86 AND v2<4));`, + Expected: []sql.Row{sql.Row{14, 10, 32, 46}, sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{2, 3, 38, 37}, sql.Row{11, 9, 39, 20}, sql.Row{12, 9, 71, 82}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{3, 3, 99, 99}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{7, 7, 33, 51}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{1, 2, 65, 9}, sql.Row{22, 15, 2, 69}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{6, 6, 81, 33}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{13, 10, 16, 21}, sql.Row{16, 12, 44, 84}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{4, 5, 17, 42}, sql.Row{18, 13, 47, 30}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{17, 12, 66, 40}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{19, 13, 56, 41}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{15, 10, 47, 36}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{9, 8, 9, 21}, sql.Row{8, 7, 37, 42}, sql.Row{10, 8, 37, 90}, sql.Row{5, 6, 6, 76}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{0, 0, 3, 16}, sql.Row{21, 14, 91, 1}, sql.Row{23, 16, 40, 36}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{20, 14, 38, 24}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1>=2 AND v2 BETWEEN 32 AND 59 AND v3 BETWEEN 50 AND 52) OR (v1<26)) OR (v1<>2 AND v2>11)) AND (v1>32 AND v2<=92) AND (v1>45 AND v2<>5 AND v3<>49);`, + Expected: []sql.Row{sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{94, 91, 15, 15}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{58, 54, 13, 78}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{73, 66, 73, 4}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{57, 50, 86, 6}, sql.Row{86, 84, 40, 8}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=19) AND (v1<=73) OR (v1=9 AND v2=5 AND v3<=5));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{40, 31, 47, 21}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{54, 46, 58, 8}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{25, 21, 9, 89}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{26, 21, 42, 76}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{24, 20, 29, 93}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE (((v1<62) AND (v1<=57 AND v2>51 AND v3 BETWEEN 29 AND 30) OR (v1>=28 AND v2<=62 AND v3<>76)) OR (v1>=94));`, + Expected: []sql.Row{sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{38, 29, 27, 48}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{62, 56, 0, 97}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{60, 55, 45, 46}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{93, 90, 30, 67}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{59, 54, 57, 83}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>21) OR (v1>=86 AND v2>2 AND v3>=67));`, + Expected: []sql.Row{sql.Row{32, 25, 49, 88}, sql.Row{44, 34, 27, 58}, sql.Row{64, 56, 58, 4}, sql.Row{88, 85, 53, 50}, sql.Row{97, 95, 89, 66}, sql.Row{40, 31, 47, 21}, sql.Row{84, 82, 11, 6}, sql.Row{94, 91, 15, 15}, sql.Row{95, 93, 7, 26}, sql.Row{27, 23, 13, 53}, sql.Row{47, 36, 84, 75}, sql.Row{63, 56, 8, 78}, sql.Row{68, 60, 8, 70}, sql.Row{71, 65, 17, 9}, sql.Row{80, 75, 91, 35}, sql.Row{38, 29, 27, 48}, sql.Row{51, 41, 77, 26}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{54, 46, 58, 8}, sql.Row{81, 76, 40, 52}, sql.Row{34, 27, 35, 12}, sql.Row{62, 56, 0, 97}, sql.Row{65, 56, 66, 33}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{46, 36, 4, 36}, sql.Row{49, 38, 88, 68}, sql.Row{60, 55, 45, 46}, sql.Row{89, 86, 63, 79}, sql.Row{29, 23, 28, 90}, sql.Row{36, 29, 7, 38}, sql.Row{53, 45, 1, 57}, sql.Row{79, 74, 78, 26}, sql.Row{50, 41, 17, 68}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{31, 24, 20, 8}, sql.Row{37, 29, 21, 74}, sql.Row{41, 31, 47, 91}, sql.Row{43, 33, 70, 50}, sql.Row{55, 49, 26, 11}, sql.Row{72, 66, 46, 46}, sql.Row{77, 71, 39, 15}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{33, 26, 15, 28}, sql.Row{52, 42, 80, 85}, sql.Row{58, 54, 13, 78}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{30, 23, 30, 44}, sql.Row{35, 28, 39, 84}, sql.Row{69, 61, 11, 25}, sql.Row{73, 66, 73, 4}, sql.Row{39, 29, 77, 46}, sql.Row{42, 32, 40, 76}, sql.Row{59, 54, 57, 83}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{57, 50, 86, 6}, sql.Row{75, 70, 8, 54}, sql.Row{86, 84, 40, 8}, sql.Row{28, 23, 28, 68}, sql.Row{48, 37, 27, 32}, sql.Row{56, 50, 49, 20}, sql.Row{61, 55, 81, 80}, sql.Row{83, 81, 32, 4}, sql.Row{91, 87, 57, 62}, sql.Row{45, 35, 32, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t1 WHERE ((v1>=94) OR (v1>=57 AND v2<>53 AND v3>22));`, + Expected: []sql.Row{sql.Row{97, 95, 89, 66}, sql.Row{95, 93, 7, 26}, sql.Row{68, 60, 8, 70}, sql.Row{80, 75, 91, 35}, sql.Row{78, 72, 65, 64}, sql.Row{96, 94, 92, 38}, sql.Row{81, 76, 40, 52}, sql.Row{67, 59, 77, 53}, sql.Row{74, 67, 55, 27}, sql.Row{82, 76, 44, 87}, sql.Row{89, 86, 63, 79}, sql.Row{79, 74, 78, 26}, sql.Row{76, 70, 58, 33}, sql.Row{100, 98, 42, 22}, sql.Row{72, 66, 46, 46}, sql.Row{99, 98, 31, 21}, sql.Row{98, 97, 63, 19}, sql.Row{66, 57, 7, 52}, sql.Row{92, 88, 88, 42}, sql.Row{93, 90, 30, 67}, sql.Row{69, 61, 11, 25}, sql.Row{70, 63, 85, 23}, sql.Row{85, 82, 46, 32}, sql.Row{90, 87, 22, 34}, sql.Row{87, 84, 93, 37}, sql.Row{75, 70, 8, 54}, sql.Row{91, 87, 57, 62}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<40 AND v2=9) OR (v1<11 AND v2=15 AND v3<>55 AND v4<>95));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=82 AND v2=74 AND v3=98) OR (v1=27 AND v2 BETWEEN 16 AND 46 AND v3<>27)) OR (v1>=80 AND v2<>42 AND v3>=47));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{82, 82, 29, 66, 71}, sql.Row{86, 83, 41, 53, 57}, sql.Row{89, 86, 7, 57, 96}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=47 AND v2<=37 AND v3<90 AND v4=25) OR (v1<42 AND v2>=96 AND v3=38)) OR (v1>26)) OR (v1>=80));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>33 AND v2>=16) OR (v1>=24));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=51 AND v4 BETWEEN 36 AND 55 AND v2>62 AND v3<43) OR (v1 BETWEEN 5 AND 60 AND v2<1)) OR (v1=51 AND v2>=98 AND v3>=94));`, + Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{59, 51, 97, 39, 36}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=6 AND v4<95 AND v2<41 AND v3<=4) AND (v1>=81 AND v4>44 AND v2 BETWEEN 6 AND 11) OR (v1<=98));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=12 AND v2<=78 AND v3 BETWEEN 28 AND 63 AND v4 BETWEEN 46 AND 95) OR (v1=87 AND v2<=44)) OR (v1<14 AND v2<>37 AND v3 BETWEEN 6 AND 32));`, + Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{21, 12, 42, 15, 31}, sql.Row{10, 5, 32, 30, 48}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{19, 10, 36, 27, 5}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=80 AND v2=72 AND v3>19) OR (v1<>38 AND v2>=86 AND v3=7)) OR (v1<=52 AND v2=25 AND v3 BETWEEN 7 AND 32 AND v4<=31));`, + Expected: []sql.Row{sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{60, 52, 72, 44, 2}, sql.Row{33, 29, 72, 97, 93}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=70) OR (v1>=38 AND v3 BETWEEN 25 AND 30));`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{93, 89, 1, 27, 50}, sql.Row{74, 70, 56, 21, 22}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=33) OR (v1<=31 AND v4<>35 AND v2=38));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>14 AND v2<51 AND v3 BETWEEN 67 AND 78 AND v4=8) OR (v1>=44 AND v2<>35 AND v3<35 AND v4>=12)) OR (v1>=63 AND v2<=3));`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{58, 50, 97, 0, 79}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=6 AND v2<=25 AND v3>39) OR (v1 BETWEEN 17 AND 94 AND v2>96));`, + Expected: []sql.Row{sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{58, 50, 97, 0, 79}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((((v1>=91 AND v4<=47 AND v2>=43) OR (v1=75)) OR (v1<41 AND v4>=64 AND v2>83)) OR (v1 BETWEEN 72 AND 88 AND v2=48 AND v3<=10)) OR (v1<=44));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=31) OR (v1<84 AND v2<=73 AND v3<>2 AND v4<=51));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{85, 83, 37, 36, 16}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{2, 1, 43, 13, 36}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=20 AND v2<=29 AND v3<52 AND v4<>34) OR (v1<>46 AND v2<>98));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<52 AND v3 BETWEEN 39 AND 57 AND v4 BETWEEN 13 AND 13 AND v2 BETWEEN 76 AND 99) OR (v1>44)) OR (v1<71 AND v4>7 AND v2<98)) OR (v1<>5 AND v2 BETWEEN 35 AND 40 AND v3<=10));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=40) OR (v1=27)) OR (v1>90 AND v2>50 AND v3=66 AND v4<83));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1<=92 AND v4 BETWEEN 8 AND 90) AND (v1 BETWEEN 39 AND 42);`, + Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}, sql.Row{46, 39, 45, 75, 55}, sql.Row{47, 41, 1, 85, 9}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 23 AND 85 AND v2<=51 AND v3<>68) OR (v1 BETWEEN 30 AND 58 AND v2<>75));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=67 AND v2<=17 AND v3<>91 AND v4<82) OR (v1>28 AND v2 BETWEEN 17 AND 71 AND v3<12));`, + Expected: []sql.Row{sql.Row{43, 37, 35, 6, 44}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{93, 89, 1, 27, 50}, sql.Row{84, 82, 70, 5, 47}, sql.Row{77, 73, 10, 2, 0}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>77 AND v4>82 AND v2>=96) OR (v1 BETWEEN 41 AND 80 AND v2<>21 AND v3>60));`, + Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{67, 64, 26, 77, 97}, sql.Row{55, 50, 36, 73, 58}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1=28 AND v4 BETWEEN 44 AND 50) AND (v1>=49);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 81 AND 87 AND v3<>81 AND v4<30) AND (v1=17) OR (v1<27 AND v2<>8 AND v3>35)) OR (v1>28 AND v2<62));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>65 AND v2=64) OR (v1=82 AND v3<>99)) OR (v1>=68 AND v2=3 AND v3 BETWEEN 1 AND 51 AND v4<=73));`, + Expected: []sql.Row{sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{84, 82, 70, 5, 47}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=27 AND v3>23) OR (v1<70 AND v2<>43));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>34 AND v2>=89 AND v3>=14) OR (v1<=42 AND v3<1)) OR (v1<59 AND v2>=23 AND v3 BETWEEN 17 AND 37 AND v4 BETWEEN 21 AND 38));`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{52, 47, 94, 56, 21}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{45, 38, 71, 22, 37}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=52 AND v2>=55) OR (v1<73 AND v2<=1 AND v3>75 AND v4<=36)) OR (v1>=45 AND v2>=49 AND v3<=26 AND v4 BETWEEN 40 AND 83));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{91, 87, 66, 8, 22}, sql.Row{92, 88, 57, 12, 88}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>0 AND v2=94 AND v3<>0) OR (v1>=83 AND v2<69 AND v3<84));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{52, 47, 94, 56, 21}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<83 AND v4>51) OR (v1<>30));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<92) OR (v1 BETWEEN 6 AND 39 AND v2=47 AND v3>=63));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=98) OR (v1<=2 AND v2<5));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>29 AND v4=40 AND v2>=63) OR (v1<70 AND v2<70 AND v3<=20)) OR (v1 BETWEEN 7 AND 61 AND v2>=33 AND v3>78)) OR (v1>=4 AND v2<=22));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{17, 9, 7, 74, 92}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=12) OR (v1=28));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=94 AND v2>=13 AND v3<=46 AND v4<>36) AND (v1=84) OR (v1 BETWEEN 52 AND 98 AND v2<71 AND v3<>45));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>64) OR (v1<>55 AND v2=85 AND v3<=88));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 54 AND 87 AND v2<78 AND v3<33) OR (v1<>52)) OR (v1 BETWEEN 3 AND 61 AND v4<=49)) OR (v1>3 AND v2<73 AND v3>59));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 2 AND 23) OR (v1 BETWEEN 7 AND 14 AND v2<=27 AND v3<=82)) OR (v1>61));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=31 AND v2>44) OR (v1<44 AND v4<>6 AND v2<>10 AND v3<>14)) AND (v1=96 AND v3>25 AND v4<>32);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=85 AND v2<12) AND (v1>=25);`, + Expected: []sql.Row{sql.Row{88, 85, 2, 3, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=0) OR (v1=31)) OR (v1<>73 AND v4>9 AND v2 BETWEEN 27 AND 69 AND v3=14));`, + Expected: []sql.Row{sql.Row{0, 0, 33, 2, 67}, sql.Row{1, 0, 55, 14, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=42 AND v2=41 AND v3 BETWEEN 29 AND 94 AND v4<71) OR (v1>=71 AND v2 BETWEEN 67 AND 87 AND v3>=9)) OR (v1<2 AND v2<=1 AND v3<36 AND v4>41));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{86, 83, 41, 53, 57}, sql.Row{100, 96, 73, 38, 38}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=3 AND v2<57 AND v3<>74 AND v4>=69) OR (v1<>66 AND v2=16)) OR (v1=44 AND v3=58));`, + Expected: []sql.Row{sql.Row{5, 3, 31, 22, 81}, sql.Row{34, 32, 16, 97, 29}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=22 AND v2<=41) OR (v1=61 AND v2>21)) OR (v1<>10)) OR (v1 BETWEEN 43 AND 44 AND v2>=35 AND v3<>87));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=13 AND v3>20) OR (v1 BETWEEN 18 AND 26 AND v2>11 AND v3>22)) OR (v1<18 AND v2>=47 AND v3<11)) OR (v1>19));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 42 AND 54 AND v2>20) OR (v1<>68 AND v3>32));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 20 AND 93) AND (v1=66 AND v2<>21 AND v3 BETWEEN 43 AND 94);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>83 AND v2<>16 AND v3=22) AND (v1=34) AND (v1=79 AND v2<=45 AND v3=49);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=44 AND v2<=98) AND (v1>15) OR (v1<=45 AND v2=1 AND v3<>54));`, + Expected: []sql.Row{sql.Row{47, 41, 1, 85, 9}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<38 AND v2>24) OR (v1<20 AND v3>=3 AND v4 BETWEEN 59 AND 81)) OR (v1<31 AND v4 BETWEEN 2 AND 16 AND v2=6 AND v3<=69));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((((v1<43 AND v4<=22) OR (v1<=72 AND v2>=35 AND v3>=96)) OR (v1=63 AND v2=55 AND v3<>46)) OR (v1>=9 AND v2=52 AND v3=86 AND v4<=27)) OR (v1 BETWEEN 37 AND 62));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=52) OR (v1>=59 AND v2<=30 AND v3=98 AND v4 BETWEEN 43 AND 74));`, + Expected: []sql.Row{sql.Row{60, 52, 72, 44, 2}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=37 AND v3>=74 AND v4=54) OR (v1>=36 AND v3<=42 AND v4<=94)) AND (v1=59 AND v2<=56) OR (v1>=83 AND v2<=11));`, + Expected: []sql.Row{sql.Row{88, 85, 2, 3, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>39 AND v3<44 AND v4 BETWEEN 3 AND 31 AND v2>16) OR (v1>72 AND v2=73 AND v3<37 AND v4<=43)) OR (v1=9 AND v2<50));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<31 AND v2<>14 AND v3 BETWEEN 0 AND 10 AND v4>=95) OR (v1<>91)) OR (v1<>35));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>13) OR (v1<>3 AND v4<=42 AND v2 BETWEEN 89 AND 94));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<29 AND v2<=19) AND (v1>=26) OR (v1>=87 AND v2<=12 AND v3=36 AND v4<20)) AND (v1<=24 AND v4>85 AND v2 BETWEEN 1 AND 64) OR (v1>27 AND v2>=8 AND v3<24));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<77 AND v2 BETWEEN 5 AND 22 AND v3<>91 AND v4<34) OR (v1=68 AND v2=50)) OR (v1<44 AND v2>84 AND v3<37 AND v4>=67));`, + Expected: []sql.Row{sql.Row{40, 34, 89, 27, 90}, sql.Row{9, 5, 17, 52, 13}, sql.Row{79, 74, 22, 42, 16}, sql.Row{42, 36, 7, 40, 16}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<4 AND v2>=71) OR (v1<18 AND v2=57));`, + Expected: []sql.Row{sql.Row{3, 1, 72, 29, 21}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>61 AND v2 BETWEEN 46 AND 51) OR (v1 BETWEEN 32 AND 75 AND v4<=32)) AND (v1>97) OR (v1<97));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 4 AND 71 AND v2<=70) AND (v1<>47 AND v2 BETWEEN 19 AND 65) OR (v1=59 AND v2 BETWEEN 25 AND 58));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{38, 34, 55, 37, 34}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<70 AND v2<=90) OR (v1<5 AND v2<>13 AND v3 BETWEEN 20 AND 96 AND v4>92)) OR (v1<>76)) OR (v1 BETWEEN 12 AND 88 AND v2 BETWEEN 53 AND 67 AND v3>=39));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 8 AND 38 AND v2<=31 AND v3 BETWEEN 30 AND 46 AND v4>=28) OR (v1<=22 AND v4<>40 AND v2>76 AND v3 BETWEEN 38 AND 42)) OR (v1<=52 AND v2<93 AND v3>=83)) OR (v1>=33 AND v3>13 AND v4>34));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{67, 64, 26, 77, 97}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{89, 86, 7, 57, 96}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 13 AND 40 AND v2>=0) OR (v1<>3 AND v2>47 AND v3<44 AND v4>49)) OR (v1=23));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{92, 88, 57, 12, 88}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{58, 50, 97, 0, 79}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>35 AND v2<>26) OR (v1<=30 AND v2 BETWEEN 6 AND 61 AND v3<=95 AND v4>5)) AND (v1<>97) OR (v1>31));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=43 AND v2>=64) OR (v1>6 AND v3=92 AND v4>=15)) OR (v1<=55 AND v3=6 AND v4<=77 AND v2<=3)) OR (v1=96 AND v3<=80 AND v4<=13));`, + Expected: []sql.Row{sql.Row{50, 43, 66, 85, 66}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>8 AND v3 BETWEEN 14 AND 75 AND v4=28) AND (v1>=95 AND v2<>72 AND v3=22) OR (v1=5));`, + Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=95 AND v2<1 AND v3 BETWEEN 49 AND 61 AND v4=51) OR (v1>29 AND v2>=9 AND v3>=63 AND v4<=88));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{82, 82, 29, 66, 71}, sql.Row{55, 50, 36, 73, 58}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>30 AND v2 BETWEEN 20 AND 64) AND (v1<=29) AND (v1>=25 AND v2<>0);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=89 AND v2<=1 AND v3<=7 AND v4>=4) AND (v1<=87) OR (v1 BETWEEN 10 AND 46 AND v2 BETWEEN 18 AND 76));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{38, 34, 55, 37, 34}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=44 AND v2>=45 AND v3>=34 AND v4>1) OR (v1=33));`, + Expected: []sql.Row{sql.Row{35, 33, 29, 69, 6}, sql.Row{36, 33, 53, 56, 88}, sql.Row{37, 33, 86, 12, 22}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>12 AND v2<=6) OR (v1>99 AND v2<>51 AND v3=38)) OR (v1>60)) OR (v1 BETWEEN 69 AND 77 AND v2>=49 AND v3>=43));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 49 AND 53 AND v4 BETWEEN 22 AND 96) OR (v1 BETWEEN 7 AND 79)) AND (v1<=45 AND v2<=11) OR (v1 BETWEEN 16 AND 65 AND v2<53 AND v3<>15 AND v4>22));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{31, 24, 26, 69, 25}, sql.Row{55, 50, 36, 73, 58}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<11) OR (v1<=38 AND v2>=93 AND v3<=34 AND v4>7));`, + Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=97 AND v3<>2) OR (v1=49 AND v2 BETWEEN 29 AND 30 AND v3<>97));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=64) OR (v1>21 AND v2 BETWEEN 0 AND 58)) OR (v1<15 AND v4 BETWEEN 63 AND 76 AND v2>84));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 24 AND 98 AND v2>0 AND v3>=87) OR (v1 BETWEEN 2 AND 3 AND v2 BETWEEN 15 AND 78));`, + Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{5, 3, 31, 22, 81}, sql.Row{34, 32, 16, 97, 29}, sql.Row{64, 57, 25, 97, 65}, sql.Row{33, 29, 72, 97, 93}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>37) OR (v1<=94 AND v2 BETWEEN 53 AND 65 AND v3>=9)) OR (v1<10 AND v3<>26 AND v4<91)) OR (v1<>21 AND v2<>24 AND v3<46));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>21 AND v2>27 AND v3>=97 AND v4 BETWEEN 25 AND 67) OR (v1>=66 AND v2<=56)) OR (v1=37));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=43 AND v2<48 AND v3<16 AND v4<=75) OR (v1<71));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>91 AND v2=91 AND v3>=15) OR (v1 BETWEEN 16 AND 30)) OR (v1<>27 AND v4=62));`, + Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{78, 73, 91, 56, 0}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=54 AND v3>26 AND v4>30 AND v2 BETWEEN 3 AND 8) OR (v1>8 AND v2<=43 AND v3<>97));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=38 AND v2<>11 AND v3>=26) OR (v1 BETWEEN 37 AND 90 AND v4<85 AND v2<0)) OR (v1<>23));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<20 AND v2<>84 AND v3<25 AND v4>=93) OR (v1<13));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=81 AND v2 BETWEEN 55 AND 77 AND v3=64) OR (v1=20 AND v2=21));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>30 AND v2 BETWEEN 58 AND 72 AND v3<=35) OR (v1 BETWEEN 28 AND 28 AND v2>=76)) OR (v1=74 AND v2<26));`, + Expected: []sql.Row{sql.Row{91, 87, 66, 8, 22}, sql.Row{79, 74, 22, 42, 16}, sql.Row{84, 82, 70, 5, 47}, sql.Row{45, 38, 71, 22, 37}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>5 AND v2>8) OR (v1>78 AND v2<=39 AND v3>=41 AND v4<=35)) AND (v1<=11 AND v2<35 AND v3<=10 AND v4<76) OR (v1>=22)) OR (v1=1 AND v4<>29 AND v2 BETWEEN 64 AND 81 AND v3>46));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=49) OR (v1<43 AND v2>=34));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=72) OR (v1<>17)) OR (v1=47 AND v2<>1 AND v3 BETWEEN 75 AND 78 AND v4 BETWEEN 10 AND 44)) OR (v1>=64 AND v2>=74 AND v3=10 AND v4 BETWEEN 11 AND 93));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<2 AND v2<>94) OR (v1<>76 AND v2=27 AND v3<=31 AND v4<38));`, + Expected: []sql.Row{sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>11 AND v2>47 AND v3>=67 AND v4=29) OR (v1>=59 AND v3 BETWEEN 4 AND 29 AND v4>=65 AND v2<>96)) OR (v1<=62)) OR (v1<61 AND v2<>28 AND v3<>8 AND v4<>30));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 36 AND 72) OR (v1<>48 AND v4>91 AND v2<5 AND v3>=38)) OR (v1<>17 AND v3=50));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<86) OR (v1<=5 AND v2<25 AND v3<>24)) OR (v1<32 AND v3 BETWEEN 51 AND 54 AND v4<=70));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=6) OR (v1 BETWEEN 24 AND 89)) OR (v1<87 AND v2=35 AND v3=19)) AND (v1>94 AND v2=33 AND v3>28) OR (v1 BETWEEN 36 AND 40));`, + Expected: []sql.Row{sql.Row{43, 37, 35, 6, 44}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{45, 38, 71, 22, 37}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=24 AND v2=61 AND v3<49 AND v4<82) OR (v1<4 AND v2>51 AND v3=9));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 0 AND 87 AND v2>=44 AND v3<>68 AND v4=50) OR (v1<1 AND v4<66 AND v2<11 AND v3<>44));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1<17 AND v2<54) AND (v1>=70 AND v2 BETWEEN 53 AND 53 AND v3>10 AND v4=17);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=21 AND v2>25 AND v3>=7) OR (v1 BETWEEN 23 AND 88 AND v2<=26 AND v3>=87 AND v4 BETWEEN 42 AND 95)) OR (v1<4 AND v2>=66 AND v3<=24 AND v4=10)) OR (v1>69));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 0 AND 39) OR (v1<18 AND v4>=90));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<99 AND v2>1 AND v3<=56) OR (v1>36 AND v2=53 AND v3>17)) OR (v1<>71)) AND (v1 BETWEEN 2 AND 86 AND v2<>78 AND v3<>29 AND v4<>63);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=5) OR (v1=53));`, + Expected: []sql.Row{sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{8, 4, 27, 77, 5}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{7, 4, 10, 53, 69}, sql.Row{61, 53, 6, 53, 89}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>12 AND v2 BETWEEN 27 AND 46 AND v3 BETWEEN 19 AND 27 AND v4>=50) OR (v1 BETWEEN 17 AND 88)) OR (v1<=36 AND v2<=37 AND v3<64)) OR (v1<>82 AND v2>84 AND v3>=90)) AND (v1>34 AND v3>4);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=82) OR (v1<=95 AND v2<>23 AND v3<18 AND v4<>50));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=51) AND (v1=55 AND v2>=59 AND v3>=49) OR (v1>5 AND v2<34));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>4 AND v2<=21 AND v3>=15) OR (v1=93 AND v2>=1 AND v3<>63)) OR (v1 BETWEEN 24 AND 86 AND v3<=5));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<63 AND v2<>32 AND v3>=14) OR (v1=18 AND v3 BETWEEN 4 AND 42 AND v4>10)) OR (v1<23 AND v2>=21));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>34 AND v3 BETWEEN 27 AND 48 AND v4<=11 AND v2>42) AND (v1<>47 AND v2<48 AND v3<=47 AND v4<>12) OR (v1<=36 AND v2<>17));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=34 AND v2<=80 AND v3<=27) AND (v1 BETWEEN 0 AND 33) OR (v1<=56 AND v2=50 AND v3 BETWEEN 0 AND 5 AND v4<>31));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=93 AND v2<>5) OR (v1>=81 AND v4=9 AND v2>33 AND v3<99));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=37 AND v2=4 AND v3=3) AND (v1=12 AND v2>9 AND v3<89 AND v4<>12) OR (v1=1 AND v2=43 AND v3<=2));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=82) OR (v1<=4 AND v2>=51)) OR (v1=58 AND v4<86));`, + Expected: []sql.Row{sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=42 AND v4<85 AND v2<8 AND v3<3) OR (v1>=78 AND v2<>28 AND v3<52)) OR (v1<8 AND v2<>76 AND v3 BETWEEN 36 AND 70)) OR (v1=70));`, + Expected: []sql.Row{sql.Row{90, 87, 23, 16, 63}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{7, 4, 10, 53, 69}, sql.Row{73, 70, 40, 19, 5}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>69) OR (v1>=43));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 39 AND 76 AND v4>16 AND v2<>15 AND v3<>35) AND (v1<>50 AND v2>21 AND v3 BETWEEN 27 AND 90 AND v4>18) OR (v1<25 AND v4=58));`, + Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{67, 64, 26, 77, 97}, sql.Row{59, 51, 97, 39, 36}, sql.Row{46, 39, 45, 75, 55}, sql.Row{50, 43, 66, 85, 66}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=62) OR (v1 BETWEEN 24 AND 36 AND v2>=94 AND v3 BETWEEN 10 AND 55 AND v4>=89));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=31) OR (v1<=95 AND v2<=26 AND v3 BETWEEN 40 AND 72)) OR (v1<51 AND v2=23));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{31, 24, 26, 69, 25}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{7, 4, 10, 53, 69}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=3) OR (v1>40)) AND (v1>66 AND v2>33);`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=69 AND v2=61 AND v3=87 AND v4 BETWEEN 63 AND 87) OR (v1 BETWEEN 48 AND 62)) OR (v1<>81 AND v2<=67 AND v3<>43));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=19) AND (v1<=20 AND v2>=2) OR (v1 BETWEEN 12 AND 53 AND v4>=1 AND v2<43 AND v3<59));`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=42 AND v2<=65) AND (v1<=21) OR (v1<=14 AND v2<>1 AND v3<62));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>5) OR (v1<96 AND v2>=14)) OR (v1<>96)) AND (v1<>51 AND v3>41);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>97 AND v3<>77 AND v4=30 AND v2<>45) OR (v1=36 AND v2<77 AND v3>94)) OR (v1=26));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 34 AND 37 AND v3>23 AND v4>31) OR (v1 BETWEEN 43 AND 81 AND v3>=54 AND v4>=72));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{76, 71, 48, 89, 99}, sql.Row{68, 64, 41, 74, 85}, sql.Row{67, 64, 26, 77, 97}, sql.Row{38, 34, 55, 37, 34}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=17 AND v2<>19) OR (v1>45));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=57) OR (v1>=1 AND v2<=5 AND v3>=10 AND v4<5)) OR (v1>55));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=23 AND v2<=48) OR (v1>41 AND v2>=46 AND v3 BETWEEN 11 AND 29)) AND (v1<>11) OR (v1=70 AND v3<54 AND v4<=47 AND v2<>62));`, + Expected: []sql.Row{sql.Row{65, 63, 50, 20, 43}, sql.Row{62, 53, 48, 19, 36}, sql.Row{92, 88, 57, 12, 88}, sql.Row{74, 70, 56, 21, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{73, 70, 40, 19, 5}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>73) OR (v1>5 AND v2>=7 AND v3>=43 AND v4<=53)) OR (v1<34 AND v2<95 AND v3 BETWEEN 9 AND 81 AND v4<>8)) AND (v1<=68 AND v4>48 AND v2>11 AND v3 BETWEEN 17 AND 89) OR (v1=41 AND v2 BETWEEN 56 AND 93));`, + Expected: []sql.Row{sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{15, 8, 54, 46, 87}, sql.Row{36, 33, 53, 56, 88}, sql.Row{5, 3, 31, 22, 81}, sql.Row{13, 7, 21, 75, 70}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>3 AND v3>=34) OR (v1<>31 AND v2<16 AND v3<8));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{86, 83, 41, 53, 57}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 88 AND 97) OR (v1>67 AND v4<=27 AND v2<5 AND v3>40)) OR (v1 BETWEEN 5 AND 83 AND v2>=34 AND v3=59));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{94, 89, 91, 7, 45}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>96 AND v2<=2 AND v3=17 AND v4<79) OR (v1=67 AND v2=30 AND v3=38 AND v4=53));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>45 AND v2>76) OR (v1=30 AND v2=53));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{37, 33, 86, 12, 22}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 3 AND 34 AND v2>39) OR (v1>1 AND v2>=92 AND v3=99)) OR (v1>=36 AND v2<>65 AND v3=69));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{33, 29, 72, 97, 93}, sql.Row{32, 24, 45, 96, 0}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=54 AND v2=38 AND v3>=64 AND v4>36) OR (v1<=48)) OR (v1<37 AND v2=13 AND v3<20));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>70) OR (v1<>2 AND v2>79 AND v3<>6 AND v4<>42));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>46 AND v2>93 AND v3>19) AND (v1<51 AND v2=39) OR (v1<61)) AND (v1<>22);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=53 AND v2>0 AND v3=95 AND v4<=2) OR (v1<41 AND v4<10 AND v2 BETWEEN 11 AND 35)) OR (v1=11 AND v2<20 AND v3=51 AND v4<>30));`, + Expected: []sql.Row{sql.Row{35, 33, 29, 69, 6}, sql.Row{8, 4, 27, 77, 5}, sql.Row{27, 21, 21, 32, 8}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=32 AND v2>6 AND v3=55) OR (v1=87 AND v2<=80)) OR (v1=88 AND v2<=87 AND v3>=45));`, + Expected: []sql.Row{sql.Row{90, 87, 23, 16, 63}, sql.Row{91, 87, 66, 8, 22}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>8) OR (v1 BETWEEN 16 AND 25 AND v2<>79 AND v3>=55 AND v4<=5));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=45 AND v2>55 AND v3<90) OR (v1>26 AND v2>=2 AND v3<>85 AND v4<=74));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=59) OR (v1<>85 AND v4<6 AND v2 BETWEEN 14 AND 82));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{66, 64, 23, 33, 5}, sql.Row{8, 4, 27, 77, 5}, sql.Row{60, 52, 72, 44, 2}, sql.Row{19, 10, 36, 27, 5}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=94 AND v2>32 AND v3>61) OR (v1>51 AND v4>84 AND v2>=46)) OR (v1=39));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{92, 88, 57, 12, 88}, sql.Row{46, 39, 45, 75, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=89) OR (v1<=28 AND v2=13));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{93, 89, 1, 27, 50}, sql.Row{94, 89, 91, 7, 45}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=5 AND v2<65 AND v3<64 AND v4=81) OR (v1<=75)) AND (v1=87);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=31 AND v4>30 AND v2<>38) OR (v1<>35)) OR (v1<=8 AND v2<43 AND v3<=50 AND v4<=33));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((((v1>65 AND v2=89 AND v3>12) OR (v1 BETWEEN 37 AND 75 AND v2=42 AND v3<=14)) OR (v1>=87 AND v2=85)) OR (v1<>48 AND v4 BETWEEN 32 AND 33 AND v2>21 AND v3<=25)) OR (v1 BETWEEN 51 AND 88 AND v2<>67));`, + Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>82) OR (v1<1 AND v3>=22)) AND (v1=4) OR (v1>27 AND v2 BETWEEN 7 AND 79 AND v3 BETWEEN 9 AND 29 AND v4<85));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{45, 38, 71, 22, 37}, sql.Row{73, 70, 40, 19, 5}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=41 AND v2<13 AND v3 BETWEEN 62 AND 87) AND (v1<=67 AND v2>68 AND v3=56 AND v4>28);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 23 AND 34 AND v2 BETWEEN 4 AND 75 AND v3<91) OR (v1>=31));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<59) OR (v1 BETWEEN 6 AND 86 AND v4<97)) OR (v1<>90 AND v2=43 AND v3=29));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=1 AND v2<34) OR (v1<78));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=10 AND v2<>64 AND v3>25 AND v4<29) OR (v1>39));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>35 AND v2>=14 AND v3<65 AND v4<>9) OR (v1<>14 AND v3<51 AND v4<32)) OR (v1>=21 AND v3<>25 AND v4<>16));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>12 AND v2<0) OR (v1=36 AND v3<37));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1=83 AND v3>=72 AND v4<=74) AND (v1>61 AND v2 BETWEEN 32 AND 44);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1=78 AND v2>28 AND v3<=47) AND (v1<35 AND v2=69 AND v3>16);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 31 AND 49 AND v2=20 AND v3 BETWEEN 8 AND 46) AND (v1<>57 AND v2<5);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=39 AND v2<>3) OR (v1=97 AND v2<>37));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=19 AND v4<>62 AND v2<>19 AND v3<>29) OR (v1 BETWEEN 37 AND 75 AND v4<23 AND v2 BETWEEN 6 AND 43));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<8 AND v2<=33 AND v3 BETWEEN 54 AND 85) OR (v1=46));`, + Expected: []sql.Row{sql.Row{8, 4, 27, 77, 5}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=69 AND v2<8) AND (v1>=34 AND v2>=99 AND v3>96 AND v4 BETWEEN 36 AND 99) OR (v1=0 AND v2>=71));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 20 AND 54 AND v2<>31 AND v3 BETWEEN 15 AND 21) OR (v1<=46 AND v3>76)) OR (v1 BETWEEN 31 AND 71));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>37 AND v2<>5 AND v3=8 AND v4 BETWEEN 26 AND 50) OR (v1>=53)) AND (v1 BETWEEN 5 AND 80);`, + Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=25) OR (v1<=87));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=99 AND v2>=85) AND (v1<=83 AND v2=99) OR (v1<=6 AND v2 BETWEEN 36 AND 68 AND v3>62 AND v4=79));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 30 AND 32 AND v2<68 AND v3<24) AND (v1>=32);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>62 AND v2>0) OR (v1<>80 AND v2>55 AND v3=10 AND v4=91));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=7 AND v2 BETWEEN 55 AND 81) OR (v1<>56 AND v2<=76 AND v3<>36)) AND (v1<56 AND v2<>69 AND v3=25);`, + Expected: []sql.Row{}, + }, + { + Query: ``, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>18) OR (v1>=42 AND v2<=65 AND v3=87 AND v4=80));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=27) OR (v1<23 AND v2>=41));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>71 AND v4>0) OR (v1<48 AND v2=89 AND v3>=46 AND v4<=32)) OR (v1<62 AND v2>=33 AND v3>58)) OR (v1>=31 AND v3<>71));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 9 AND 40 AND v3<=43 AND v4=62 AND v2>=43) OR (v1=61 AND v2>12 AND v3 BETWEEN 0 AND 13 AND v4>=8));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<58) OR (v1 BETWEEN 17 AND 20 AND v2<>99 AND v3<=76)) OR (v1 BETWEEN 48 AND 87)) OR (v1<39 AND v2 BETWEEN 48 AND 94 AND v3<>0));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=33) OR (v1 BETWEEN 7 AND 41 AND v2<82 AND v3<53 AND v4<>3));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=9 AND v4=22 AND v2>=95) OR (v1>96));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=56) OR (v1>=31 AND v4<38 AND v2>20)) OR (v1=91 AND v2<48));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=75 AND v4<=30) OR (v1>=41 AND v2 BETWEEN 16 AND 25 AND v3>=99));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 2 AND 64) OR (v1>=23));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=26 AND v2<1 AND v3=82 AND v4<=42) OR (v1 BETWEEN 42 AND 73));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=23 AND v2<=10) AND (v1>=75 AND v4 BETWEEN 24 AND 68) AND (v1>44 AND v2>8 AND v3<=16);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((((v1>6 AND v2>61 AND v3=0 AND v4>=76) OR (v1<23)) OR (v1<>46 AND v2=29 AND v3>4)) OR (v1>=59)) OR (v1=87 AND v2<=98 AND v3>=47));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=59 AND v2 BETWEEN 15 AND 53 AND v3<>17 AND v4>=10) OR (v1 BETWEEN 37 AND 95 AND v2<=32 AND v3>=81));`, + Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 6 AND 92 AND v2=75 AND v3>79) OR (v1>=10)) OR (v1<=35 AND v2<=42)) AND (v1<>65);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>84 AND v4<=53 AND v2=77 AND v3>=40) OR (v1>78 AND v2<>1 AND v3=98 AND v4>=76));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>79 AND v2<=85) OR (v1<>13)) OR (v1 BETWEEN 4 AND 67));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>34) OR (v1<35 AND v2>=93)) OR (v1>8));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((((v1<65) OR (v1<>44)) OR (v1<=39 AND v3>=14)) OR (v1<=33 AND v2<>11)) OR (v1=75 AND v2=0 AND v3<28));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>50 AND v2>=46) AND (v1<>17 AND v2=45 AND v3<=79) OR (v1=10 AND v2>=35)) AND (v1=44 AND v2=38);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<34) OR (v1<=62 AND v4<>18 AND v2 BETWEEN 1 AND 41)) OR (v1>=65 AND v2>=93 AND v3 BETWEEN 34 AND 41));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>8) OR (v1>20 AND v4>=99));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>57) OR (v1<87 AND v2<>91 AND v3 BETWEEN 47 AND 98));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=57) OR (v1=88 AND v2 BETWEEN 72 AND 93));`, + Expected: []sql.Row{sql.Row{64, 57, 25, 97, 65}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>10 AND v2=20 AND v3<=21 AND v4<>88) OR (v1<28 AND v2 BETWEEN 38 AND 59 AND v3<>98 AND v4>=26));`, + Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{1, 0, 55, 14, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>5 AND v3<>53 AND v4>=49) OR (v1<18 AND v2<94));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{25, 17, 75, 86, 18}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<52 AND v2 BETWEEN 33 AND 75 AND v3=32) OR (v1<=98 AND v2<=41 AND v3<>87 AND v4<>83));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>28 AND v4>57 AND v2<62 AND v3 BETWEEN 14 AND 41) AND (v1<>72 AND v2>=13 AND v3>29 AND v4>38) OR (v1<=22 AND v2>58));`, + Expected: []sql.Row{sql.Row{11, 5, 76, 70, 46}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{25, 17, 75, 86, 18}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=13 AND v2<=52 AND v3=28 AND v4>88) OR (v1<>5 AND v2<=42));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>35 AND v4<>20 AND v2<81 AND v3=27) OR (v1>13 AND v3=27));`, + Expected: []sql.Row{sql.Row{40, 34, 89, 27, 90}, sql.Row{93, 89, 1, 27, 50}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=26) OR (v1<59 AND v2 BETWEEN 2 AND 30 AND v3>=69));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<11) OR (v1<>9 AND v2 BETWEEN 51 AND 62 AND v3=98));`, + Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=92 AND v2>25) OR (v1=91 AND v2=21 AND v3<=18 AND v4<>15)) OR (v1=79 AND v2>67 AND v3<>48 AND v4<42));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=86 AND v2<5 AND v3<36 AND v4<81) OR (v1>=52 AND v2>24 AND v3<5)) OR (v1 BETWEEN 5 AND 80 AND v3<>80));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>67) OR (v1>69 AND v2>11 AND v3=13 AND v4=20));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>31) OR (v1 BETWEEN 27 AND 87 AND v2=71 AND v3=38 AND v4=1));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>2 AND v4=0 AND v2 BETWEEN 6 AND 23 AND v3 BETWEEN 46 AND 52) OR (v1<=63 AND v2>=71 AND v3=28)) AND (v1<=52);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 10 AND 90) AND (v1=86 AND v4>=4) AND (v1 BETWEEN 6 AND 58 AND v2=85);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=46 AND v4>41 AND v2<>12) OR (v1>17 AND v2>=34 AND v3<>68 AND v4<=13)) OR (v1>=98 AND v4 BETWEEN 3 AND 62 AND v2=39));`, + Expected: []sql.Row{sql.Row{78, 73, 91, 56, 0}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=12 AND v2<>4 AND v3 BETWEEN 18 AND 42) OR (v1>=73)) OR (v1<60 AND v2=93 AND v3>=79));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{10, 5, 32, 30, 48}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{18, 9, 19, 38, 35}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=55 AND v2>50) OR (v1<>51 AND v2>=37));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 66 AND 76 AND v2>=84 AND v3>1 AND v4 BETWEEN 71 AND 95) AND (v1>36 AND v2<>41) OR (v1<44 AND v2<=50 AND v3=36 AND v4<=42));`, + Expected: []sql.Row{sql.Row{44, 37, 41, 36, 10}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=21 AND v2=44 AND v3>=68) OR (v1>=38 AND v2>=15));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1<>37 AND v2>67 AND v3>52) AND (v1<48 AND v2<>73 AND v3=25 AND v4=22);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 57 AND 62 AND v2>=99) OR (v1>31));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>22 AND v3<>49) OR (v1>=41 AND v2<=74 AND v3<=46));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=82 AND v4<=67 AND v2=40) OR (v1>63)) OR (v1<=16));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=39 AND v2<>82 AND v3>=33 AND v4>=84) OR (v1=57 AND v2<25 AND v3<>55 AND v4<=82)) OR (v1>10 AND v2>28 AND v3>=65)) OR (v1<=13 AND v2=66));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{82, 82, 29, 66, 71}, sql.Row{17, 9, 7, 74, 92}, sql.Row{15, 8, 54, 46, 87}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{46, 39, 45, 75, 55}, sql.Row{25, 17, 75, 86, 18}, sql.Row{97, 93, 56, 71, 53}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=60 AND v2<=25 AND v3<>9) OR (v1 BETWEEN 19 AND 92 AND v2>=33 AND v3<=40 AND v4=53));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{61, 53, 6, 53, 89}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=21 AND v2<=27 AND v3>=86 AND v4>99) OR (v1<76 AND v2<>97));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 4 AND 8 AND v3>=12) OR (v1>=12 AND v2>=0 AND v3=18));`, + Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>65 AND v2<=52 AND v3>37) OR (v1>11)) OR (v1<=54 AND v2 BETWEEN 30 AND 85 AND v3 BETWEEN 14 AND 27 AND v4>=35)) OR (v1>44 AND v2<>76 AND v3>=52));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=54) OR (v1<17 AND v2=34 AND v3>=59));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>9 AND v4<>61 AND v2=98 AND v3<1) OR (v1<2 AND v2 BETWEEN 3 AND 70));`, + Expected: []sql.Row{sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{1, 0, 55, 14, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=6 AND v2>93) OR (v1 BETWEEN 38 AND 46));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{46, 39, 45, 75, 55}, sql.Row{47, 41, 1, 85, 9}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 16 AND 72) OR (v1=20)) OR (v1>61 AND v2<>48 AND v3<>83 AND v4=46)) OR (v1=5 AND v2=59));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>41 AND v2>74 AND v3>37 AND v4<38) OR (v1=58 AND v2>=1)) OR (v1<=4 AND v2>0 AND v3 BETWEEN 39 AND 72 AND v4>=29));`, + Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{59, 51, 97, 39, 36}, sql.Row{7, 4, 10, 53, 69}, sql.Row{69, 64, 77, 41, 17}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>53 AND v4<99 AND v2<>31) OR (v1<>5 AND v2>70 AND v3>=71));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>1 AND v4=93) OR (v1<10 AND v2 BETWEEN 40 AND 74 AND v3>=27));`, + Expected: []sql.Row{sql.Row{15, 8, 54, 46, 87}, sql.Row{3, 1, 72, 29, 21}, sql.Row{33, 29, 72, 97, 93}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=92 AND v2>=64 AND v3=39 AND v4 BETWEEN 16 AND 53) OR (v1<54 AND v2 BETWEEN 8 AND 17 AND v3=21 AND v4=86));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 16 AND 31 AND v4 BETWEEN 18 AND 96) OR (v1=40 AND v2<=35 AND v3>=51 AND v4>=83));`, + Expected: []sql.Row{sql.Row{28, 22, 21, 28, 78}, sql.Row{31, 24, 26, 69, 25}, sql.Row{29, 22, 98, 22, 21}, sql.Row{25, 17, 75, 86, 18}, sql.Row{33, 29, 72, 97, 93}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 68 AND 78 AND v2>96 AND v3<58 AND v4<14) OR (v1=71)) AND (v1>15 AND v2>=19) OR (v1>36));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 33 AND 71 AND v2<=61 AND v3<=32 AND v4 BETWEEN 18 AND 73) AND (v1<3) AND (v1<=59 AND v2=47 AND v3<49 AND v4>36);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<77 AND v2=43 AND v3<92 AND v4=13) OR (v1=38 AND v2<=46)) OR (v1 BETWEEN 10 AND 79 AND v2>=11 AND v3 BETWEEN 14 AND 14));`, + Expected: []sql.Row{sql.Row{24, 17, 49, 14, 7}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=47 AND v4=13) AND (v1<=27 AND v3<54 AND v4 BETWEEN 27 AND 40) OR (v1>=40 AND v4=98 AND v2=25 AND v3>66));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<98 AND v3 BETWEEN 80 AND 82) OR (v1 BETWEEN 31 AND 38 AND v2=39));`, + Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=75 AND v2 BETWEEN 45 AND 51 AND v3<15) OR (v1>=74 AND v2>=37 AND v3<76));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=40) OR (v1<>32 AND v4<=37));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>63 AND v3 BETWEEN 43 AND 50 AND v4<29 AND v2>=89) OR (v1>80));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=81) OR (v1>=27 AND v2>=21 AND v3 BETWEEN 1 AND 63 AND v4>=92));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>13) OR (v1>72 AND v2=2 AND v3<=40)) OR (v1>77 AND v2<21));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>54 AND v2>23 AND v3 BETWEEN 28 AND 48 AND v4>=37) OR (v1>93 AND v2>=51 AND v3<9 AND v4<>49)) OR (v1>=71 AND v2<>33));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{10, 5, 32, 30, 48}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 15 AND 69 AND v4=83 AND v2<=43) OR (v1<51 AND v2<24 AND v3<>27 AND v4<>50)) OR (v1<>37));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 55 AND 66 AND v2<>81 AND v3=6 AND v4<=19) OR (v1<>91));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=21 AND v2<50 AND v3>=39) OR (v1<=79 AND v4>62 AND v2=31));`, + Expected: []sql.Row{sql.Row{5, 3, 31, 22, 81}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>78) OR (v1>=9 AND v2<>84));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>16 AND v3>=29) OR (v1>=47 AND v2<>63));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=16 AND v2>=9 AND v3<>48) OR (v1>=76 AND v2<>86)) OR (v1<28 AND v2=1 AND v3<=23 AND v4 BETWEEN 13 AND 55));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{81, 76, 74, 97, 18}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=35 AND v2>67) OR (v1<>55));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<89 AND v2<5 AND v3 BETWEEN 53 AND 61) OR (v1<>72 AND v3<20));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{24, 17, 49, 14, 7}, sql.Row{39, 34, 87, 13, 51}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=58 AND v2<=89 AND v3=78 AND v4<=58) OR (v1>39)) AND (v1<>25 AND v2>1 AND v3<18);`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{77, 73, 10, 2, 0}, sql.Row{58, 50, 97, 0, 79}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>94) OR (v1=33 AND v2 BETWEEN 53 AND 60 AND v3 BETWEEN 37 AND 73));`, + Expected: []sql.Row{sql.Row{36, 33, 53, 56, 88}, sql.Row{100, 96, 73, 38, 38}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=40 AND v2<>8 AND v3<=69) OR (v1<=72)) OR (v1 BETWEEN 87 AND 89 AND v2 BETWEEN 52 AND 58));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<9 AND v2=97 AND v3<>54 AND v4>71) OR (v1>48 AND v2 BETWEEN 7 AND 23 AND v3<>95 AND v4>86)) OR (v1 BETWEEN 36 AND 90));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=38 AND v2<70) OR (v1>79));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<47 AND v2 BETWEEN 22 AND 85) AND (v1=73) OR (v1<42));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<29) AND (v1<41 AND v2>52 AND v3<>55) OR (v1 BETWEEN 16 AND 28 AND v2>=9 AND v3=43 AND v4<6));`, + Expected: []sql.Row{sql.Row{11, 5, 76, 70, 46}, sql.Row{15, 8, 54, 46, 87}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{25, 17, 75, 86, 18}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<56 AND v2<=52) OR (v1>=30 AND v2<73 AND v3>40 AND v4>=13)) AND (v1<30 AND v4<>25 AND v2<>82 AND v3 BETWEEN 80 AND 88);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 9 AND 53 AND v2 BETWEEN 26 AND 56) OR (v1 BETWEEN 29 AND 72 AND v2<18 AND v3=73 AND v4<=12));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{21, 12, 42, 15, 31}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{38, 34, 55, 37, 34}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>96 AND v2<27) OR (v1<82)) AND (v1>=80 AND v2 BETWEEN 14 AND 53);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>86) OR (v1>=48 AND v4>9));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=41 AND v2=79 AND v3<16 AND v4>=2) OR (v1<16 AND v4>59));`, + Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{23, 15, 42, 17, 60}, sql.Row{17, 9, 7, 74, 92}, sql.Row{0, 0, 33, 2, 67}, sql.Row{15, 8, 54, 46, 87}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{7, 4, 10, 53, 69}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=69 AND v2 BETWEEN 38 AND 45) AND (v1<>35 AND v2<28 AND v3>14);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=93 AND v2<=10 AND v3 BETWEEN 21 AND 83) AND (v1<>5 AND v2>59 AND v3<>17) OR (v1<69 AND v3<>65 AND v4>=51 AND v2<=48)) OR (v1 BETWEEN 37 AND 57 AND v2 BETWEEN 44 AND 57 AND v3<40 AND v4=98));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{0, 0, 33, 2, 67}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<46) OR (v1<>60));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<97 AND v2<=47 AND v3=91) OR (v1=74 AND v4>72 AND v2<>44 AND v3 BETWEEN 4 AND 51));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 26 AND 60 AND v2>53 AND v3<=9 AND v4<8) OR (v1>0 AND v2<=69));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=33 AND v2<2 AND v3<>63) OR (v1 BETWEEN 20 AND 95 AND v2<>7 AND v3 BETWEEN 95 AND 96 AND v4 BETWEEN 34 AND 41)) OR (v1 BETWEEN 27 AND 44 AND v4<>28 AND v2<=43 AND v3<=64));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{43, 37, 35, 6, 44}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 13 AND 36 AND v2>40) OR (v1<>28 AND v2<29)) OR (v1 BETWEEN 36 AND 89 AND v2>=92 AND v3>39 AND v4<16)) OR (v1<=1));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=68 AND v2=49) OR (v1<=35 AND v2>=59 AND v3>=88 AND v4 BETWEEN 1 AND 62));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>33) OR (v1<23 AND v4<=23 AND v2>=41));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=78 AND v2=26 AND v3 BETWEEN 70 AND 89) OR (v1 BETWEEN 12 AND 78 AND v2>41 AND v3 BETWEEN 2 AND 11 AND v4 BETWEEN 12 AND 97)) OR (v1>16 AND v2=85 AND v3<56 AND v4<19));`, + Expected: []sql.Row{sql.Row{70, 66, 97, 6, 39}, sql.Row{57, 50, 79, 10, 12}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=51 AND v2=3 AND v3>48 AND v4>=49) OR (v1>25 AND v3=37));`, + Expected: []sql.Row{sql.Row{38, 34, 55, 37, 34}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<4 AND v2<>1 AND v3<=34) OR (v1>=63)) OR (v1<58 AND v2=33)) AND (v1<=55) OR (v1 BETWEEN 1 AND 80 AND v2<=51));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 33 AND 82 AND v2<26) OR (v1>=98 AND v4>30 AND v2 BETWEEN 47 AND 67 AND v3 BETWEEN 9 AND 54)) OR (v1>=5)) AND (v1<>85 AND v4<>31);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{9, 5, 17, 52, 13}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=82 AND v3<>55 AND v4>26) OR (v1=35)) OR (v1 BETWEEN 18 AND 70 AND v2>=17));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>45 AND v2<=55 AND v3>=2 AND v4<46) OR (v1>=0 AND v2<>6));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=85 AND v2>=46 AND v3=87 AND v4>3) OR (v1=52));`, + Expected: []sql.Row{sql.Row{60, 52, 72, 44, 2}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<90 AND v4=77) OR (v1<>32 AND v2<=17 AND v3=68)) OR (v1<41));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=2) AND (v1>=13 AND v2<=23 AND v3<=23) OR (v1 BETWEEN 18 AND 57));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 32 AND 72 AND v2<>89 AND v3>=39) OR (v1>50 AND v4>80));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{89, 86, 7, 57, 96}, sql.Row{42, 36, 7, 40, 16}, sql.Row{46, 39, 45, 75, 55}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<44) OR (v1<>37 AND v2<=12 AND v3>65 AND v4<47)) OR (v1<>76));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 29 AND 37) OR (v1<>54 AND v2<=65 AND v3<=1 AND v4<>10)) OR (v1<>55 AND v2 BETWEEN 49 AND 56 AND v3>=25 AND v4<=8));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{35, 33, 29, 69, 6}, sql.Row{43, 37, 35, 6, 44}, sql.Row{95, 90, 25, 0, 17}, sql.Row{36, 33, 53, 56, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{33, 29, 72, 97, 93}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=80 AND v2<95 AND v3>6) OR (v1 BETWEEN 7 AND 14 AND v2 BETWEEN 27 AND 49 AND v3>57 AND v4 BETWEEN 28 AND 60));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>10 AND v2<43 AND v3<>15) OR (v1<=71 AND v4<>22));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 18 AND 36 AND v4<>87 AND v2>=13) OR (v1>=63 AND v3<=89)) AND (v1<76 AND v4<49 AND v2<=96);`, + Expected: []sql.Row{sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{74, 70, 56, 21, 22}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<93 AND v2<>16) OR (v1>=23 AND v4>=19)) OR (v1<48 AND v2<=45 AND v3<>46 AND v4>76)) AND (v1=22 AND v3=41) OR (v1<=17 AND v2>=41));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{25, 17, 75, 86, 18}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>17 AND v4>50 AND v2 BETWEEN 11 AND 23 AND v3=23) OR (v1<73));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 5 AND 41 AND v3<78 AND v4<41) OR (v1>84 AND v2<>43));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{35, 33, 29, 69, 6}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{16, 8, 99, 43, 1}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{44, 37, 41, 36, 10}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{18, 9, 19, 38, 35}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=24 AND v2 BETWEEN 43 AND 84) OR (v1>=90 AND v2>1 AND v3<>70)) OR (v1>=66 AND v2<95));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=18 AND v2<=70) OR (v1>55 AND v2>52 AND v3<>70)) OR (v1=58)) AND (v1<>22 AND v4>76) OR (v1>14 AND v2<32 AND v3>97));`, + Expected: []sql.Row{sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{15, 8, 54, 46, 87}, sql.Row{5, 3, 31, 22, 81}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=9 AND v2>69) AND (v1 BETWEEN 39 AND 73);`, + Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{57, 50, 79, 10, 12}, sql.Row{60, 52, 72, 44, 2}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<87 AND v2 BETWEEN 2 AND 34 AND v3=87 AND v4>=76) OR (v1<>77 AND v2<=44 AND v3>34));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{35, 33, 29, 69, 6}, sql.Row{68, 64, 41, 74, 85}, sql.Row{82, 82, 29, 66, 71}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{86, 83, 41, 53, 57}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=9 AND v4>=68 AND v2>21) OR (v1=5 AND v2<69 AND v3<=15 AND v4>=61));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=22) OR (v1>55));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 47 AND 57 AND v2>=83) OR (v1=91 AND v2>34));`, + Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{59, 51, 97, 39, 36}, sql.Row{58, 50, 97, 0, 79}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 23 AND 25) AND (v1<98 AND v2>=20 AND v3>37);`, + Expected: []sql.Row{sql.Row{31, 24, 26, 69, 25}, sql.Row{32, 24, 45, 96, 0}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=6) OR (v1>61 AND v2<=34)) OR (v1>10 AND v2<>50 AND v3<>62 AND v4<=84));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>74) OR (v1<>86 AND v2<=91)) AND (v1>=8);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>25 AND v2 BETWEEN 23 AND 54) OR (v1<>40 AND v3>90)) OR (v1<>7 AND v4<=78));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=25) OR (v1>40 AND v2 BETWEEN 26 AND 40 AND v3<76));`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{85, 83, 37, 36, 16}, sql.Row{55, 50, 36, 73, 58}, sql.Row{73, 70, 40, 19, 5}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=13 AND v2<85) OR (v1=23 AND v2<>68 AND v3=33));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<42 AND v2>95 AND v3>17 AND v4<>97) OR (v1>=13 AND v2<>10 AND v3 BETWEEN 73 AND 85 AND v4=48)) OR (v1>55 AND v2=85 AND v3>30));`, + Expected: []sql.Row{sql.Row{16, 8, 99, 43, 1}, sql.Row{29, 22, 98, 22, 21}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 5 AND 32) OR (v1>7)) OR (v1=34));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=34 AND v2<>61 AND v3<>3) AND (v1 BETWEEN 69 AND 93) AND (v1=36 AND v2>14);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>75) OR (v1<>74 AND v3 BETWEEN 29 AND 73));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1<>91 AND v3=27 AND v4=22 AND v2<>68) AND (v1<=88);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>18 AND v2<>90 AND v3>95) OR (v1>=44)) OR (v1<4 AND v3<=26 AND v4<>67 AND v2>=37)) OR (v1<36 AND v2<=15 AND v3 BETWEEN 25 AND 36 AND v4<=14));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 44 AND 87 AND v2<52 AND v3<52 AND v4<1) OR (v1<30 AND v4 BETWEEN 8 AND 97 AND v2<=24));`, + Expected: []sql.Row{sql.Row{20, 12, 0, 33, 62}, sql.Row{28, 22, 21, 28, 78}, sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{12, 7, 7, 66, 62}, sql.Row{13, 7, 21, 75, 70}, sql.Row{27, 21, 21, 32, 8}, sql.Row{7, 4, 10, 53, 69}, sql.Row{77, 73, 10, 2, 0}, sql.Row{18, 9, 19, 38, 35}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>48 AND v2<=83) OR (v1>28 AND v2 BETWEEN 9 AND 87 AND v3<>73)) OR (v1>=53 AND v2>=91 AND v3 BETWEEN 33 AND 97));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>8 AND v2 BETWEEN 34 AND 48) OR (v1<>54));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=78 AND v2<74 AND v3<42 AND v4>=34) OR (v1<=29 AND v2<=27 AND v3>31 AND v4 BETWEEN 35 AND 41));`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{5, 3, 31, 22, 81}, sql.Row{38, 34, 55, 37, 34}, sql.Row{45, 38, 71, 22, 37}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 9 AND 35 AND v4<=69 AND v2 BETWEEN 34 AND 53 AND v3<>28) AND (v1 BETWEEN 12 AND 48);`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{24, 17, 49, 14, 7}, sql.Row{30, 23, 43, 13, 11}, sql.Row{32, 24, 45, 96, 0}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 13 AND 77 AND v2>75 AND v3<73 AND v4>=6) AND (v1<=58 AND v2=48 AND v3 BETWEEN 33 AND 73);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>47 AND v3>47 AND v4 BETWEEN 51 AND 86 AND v2=26) OR (v1<82 AND v2<=17 AND v3<17 AND v4>=46));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>87) OR (v1>82 AND v4>=22)) OR (v1>=52 AND v2<>47 AND v3=37)) OR (v1<=14 AND v2<57 AND v3<10));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{90, 87, 23, 16, 63}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=99 AND v3<=41) AND (v1<>38 AND v2<94 AND v3 BETWEEN 83 AND 95 AND v4>=86);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>78) AND (v1>32 AND v2>11 AND v3>=78);`, + Expected: []sql.Row{sql.Row{87, 84, 56, 78, 18}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1<>3 AND v2=26 AND v3=22 AND v4<=76) AND (v1 BETWEEN 59 AND 92 AND v2 BETWEEN 36 AND 80);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>10) OR (v1=12));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>=12 AND v3>=45 AND v4<98) OR (v1<>51 AND v3=79 AND v4<=24)) OR (v1 BETWEEN 4 AND 59 AND v4<82)) OR (v1>=29 AND v2<>21));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>10 AND v2<=75 AND v3>=70) OR (v1<89 AND v2<=32));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{68, 64, 41, 74, 85}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{90, 87, 23, 16, 63}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{67, 64, 26, 77, 97}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{13, 7, 21, 75, 70}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=15) OR (v1=15)) OR (v1 BETWEEN 14 AND 25 AND v4>55 AND v2<53 AND v3=95));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>48 AND v2 BETWEEN 4 AND 84 AND v3<=3 AND v4<>31) AND (v1 BETWEEN 2 AND 15 AND v3>75);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<41 AND v4=9 AND v2>77 AND v3=41) OR (v1>62 AND v2>=48 AND v3=13 AND v4>61)) OR (v1 BETWEEN 33 AND 75)) OR (v1 BETWEEN 45 AND 65 AND v4 BETWEEN 4 AND 68));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{67, 64, 26, 77, 97}, sql.Row{66, 64, 23, 33, 5}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>20) OR (v1>=71 AND v4 BETWEEN 12 AND 20 AND v2<=30 AND v3 BETWEEN 14 AND 44)) AND (v1>97 AND v2=91 AND v3>=5) OR (v1>7 AND v2<34 AND v3<55 AND v4 BETWEEN 88 AND 97)) AND (v1 BETWEEN 2 AND 16 AND v2<>23 AND v3=75 AND v4>99);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=55 AND v2<13 AND v3<=96 AND v4>=49) OR (v1 BETWEEN 39 AND 98 AND v2=77 AND v3>85));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=74 AND v2<>13 AND v3<67 AND v4 BETWEEN 1 AND 70) OR (v1 BETWEEN 30 AND 50 AND v2<27 AND v3>=35));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{79, 74, 22, 42, 16}, sql.Row{42, 36, 7, 40, 16}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{51, 45, 9, 76, 9}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=76) OR (v1>22 AND v3<49 AND v4=2)) OR (v1=85 AND v4>79)) OR (v1=10 AND v2=47 AND v3 BETWEEN 6 AND 21 AND v4>97));`, + Expected: []sql.Row{sql.Row{81, 76, 74, 97, 18}, sql.Row{88, 85, 2, 3, 88}, sql.Row{60, 52, 72, 44, 2}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>38 AND v2>98) OR (v1<>29 AND v2=75)) OR (v1>58 AND v2<>49 AND v3 BETWEEN 25 AND 58));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{78, 73, 91, 56, 0}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{100, 96, 73, 38, 38}, sql.Row{25, 17, 75, 86, 18}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>82 AND v4=74 AND v2=8 AND v3>=43) OR (v1=1 AND v2>=54 AND v3 BETWEEN 41 AND 91 AND v4>=0));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=26 AND v2<=94 AND v3<=76) OR (v1<34 AND v2 BETWEEN 5 AND 20));`, + Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{17, 9, 7, 74, 92}, sql.Row{12, 7, 7, 66, 62}, sql.Row{34, 32, 16, 97, 29}, sql.Row{7, 4, 10, 53, 69}, sql.Row{18, 9, 19, 38, 35}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>74 AND v2<=3 AND v3>51 AND v4<1) OR (v1>=92 AND v2<=2));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=10 AND v2 BETWEEN 29 AND 83 AND v3<30 AND v4=54) OR (v1=68 AND v2=9 AND v3<=31)) AND (v1=87 AND v2>=91) OR (v1<=3 AND v2<>65 AND v3<8 AND v4<54)) OR (v1<7 AND v2>=4 AND v3<=47));`, + Expected: []sql.Row{sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<35) OR (v1>=5 AND v2>=10 AND v3=65));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>31 AND v2<=37 AND v3>56 AND v4 BETWEEN 10 AND 31) OR (v1>8)) AND (v1>=27 AND v2<>44);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>52) OR (v1<21 AND v2<61 AND v3=13)) OR (v1=89 AND v3>33));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<30 AND v4>11 AND v2<=11) OR (v1<>19 AND v2<>47 AND v3 BETWEEN 38 AND 77 AND v4>31)) OR (v1 BETWEEN 0 AND 27 AND v2 BETWEEN 33 AND 34)) OR (v1<32)) AND (v1<9 AND v3=54 AND v4<>31 AND v2<>95);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=48) OR (v1 BETWEEN 2 AND 81));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<>36) OR (v1<>70 AND v2 BETWEEN 23 AND 39)) OR (v1>51 AND v2>=57)) OR (v1<50 AND v2<=3 AND v3 BETWEEN 1 AND 74));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1>30) OR (v1>98 AND v4>43 AND v2<>80)) OR (v1 BETWEEN 2 AND 23 AND v2>=34)) OR (v1>=42));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<68 AND v2<81 AND v3<34 AND v4<>33) OR (v1<=78 AND v4 BETWEEN 34 AND 99 AND v2>=79 AND v3>=9)) OR (v1=27 AND v4 BETWEEN 20 AND 41 AND v2<98 AND v3>=15));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{21, 12, 42, 15, 31}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<23 AND v2<=45 AND v3<0) OR (v1>=31)) OR (v1>=50));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<16) OR (v1>=19 AND v2<25 AND v3>77));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{20, 12, 0, 33, 62}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{34, 32, 16, 97, 29}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<29 AND v2 BETWEEN 81 AND 92) OR (v1>20 AND v2>=53 AND v3 BETWEEN 20 AND 68));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{52, 47, 94, 56, 21}, sql.Row{78, 73, 91, 56, 0}, sql.Row{36, 33, 53, 56, 88}, sql.Row{59, 51, 97, 39, 36}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{74, 70, 56, 21, 22}, sql.Row{100, 96, 73, 38, 38}, sql.Row{60, 52, 72, 44, 2}, sql.Row{45, 38, 71, 22, 37}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 25 AND 59 AND v2=1 AND v3<93 AND v4<=16) OR (v1<40 AND v2 BETWEEN 14 AND 37 AND v3>62 AND v4<58)) OR (v1<>17 AND v2<>36)) OR (v1 BETWEEN 7 AND 99 AND v2<>6 AND v3=43 AND v4<89));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1=46) AND (v1>=93 AND v3<>51 AND v4=93 AND v2=8);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<=5 AND v2>=14 AND v3<=2) OR (v1<53 AND v4=99 AND v2=72)) OR (v1<>49 AND v2<>39 AND v3>=70 AND v4<>24)) OR (v1<79));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1<99 AND v2<=42) OR (v1=47 AND v4 BETWEEN 33 AND 63 AND v2>=10 AND v3<=57)) OR (v1>44)) OR (v1<>87 AND v2>42 AND v3<69));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=29 AND v2 BETWEEN 50 AND 86 AND v3<=6 AND v4 BETWEEN 8 AND 48) OR (v1>86 AND v2 BETWEEN 62 AND 70 AND v3=33));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=15) OR (v1>=59 AND v2<18)) OR (v1 BETWEEN 23 AND 31 AND v3>50 AND v4 BETWEEN 15 AND 54));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=50 AND v2<=84 AND v3 BETWEEN 22 AND 26) OR (v1<=18 AND v2<49 AND v3>19 AND v4 BETWEEN 61 AND 75)) AND (v1>48 AND v2>=56 AND v3=6) OR (v1<=88 AND v2>=76 AND v3<40 AND v4<=18));`, + Expected: []sql.Row{sql.Row{57, 50, 79, 10, 12}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=27) OR (v1>=11 AND v2<97 AND v3<97 AND v4<44));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{22, 12, 46, 43, 23}, sql.Row{56, 50, 39, 26, 37}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=89 AND v2<=93) OR (v1<=54));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=74 AND v2<=31) OR (v1<11)) OR (v1 BETWEEN 26 AND 38));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{40, 34, 89, 27, 90}, sql.Row{35, 33, 29, 69, 6}, sql.Row{43, 37, 35, 6, 44}, sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{79, 74, 22, 42, 16}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{18, 9, 19, 38, 35}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=10 AND v2<12 AND v3=54 AND v4>89) OR (v1=99 AND v4=37));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=50 AND v2<50) OR (v1<19)) OR (v1=51));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=62 AND v2<89) AND (v1<90 AND v2>=19) OR (v1<=1 AND v2>49));`, + Expected: []sql.Row{sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1<=61 AND v2<=64) AND (v1>=0);`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 5 AND 69) OR (v1<52 AND v4<14 AND v2>=25 AND v3=63));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=21 AND v2<>0 AND v3<49) OR (v1<=70 AND v2>16 AND v3<=89 AND v4>=27)) OR (v1>=14));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>14) OR (v1>=82));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=19 AND v3<72 AND v4=23) OR (v1<=36 AND v2>99));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>43) OR (v1>=41 AND v4=32 AND v2<=66)) AND (v1>43 AND v2 BETWEEN 83 AND 97);`, + Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{78, 73, 91, 56, 0}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{58, 50, 97, 0, 79}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=8 AND v4>=44) AND (v1=84 AND v2=41 AND v3 BETWEEN 5 AND 81) OR (v1<>31 AND v2<=96 AND v3<=20 AND v4<=14));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{96, 91, 23, 2, 9}, sql.Row{24, 17, 49, 14, 7}, sql.Row{57, 50, 79, 10, 12}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 52 AND 55) OR (v1>1 AND v2>36 AND v3<=47)) OR (v1 BETWEEN 0 AND 38 AND v2<=49 AND v3>=8));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{91, 87, 66, 8, 22}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{60, 52, 72, 44, 2}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=11 AND v2>=41 AND v3=9) AND (v1<>41 AND v3<>69 AND v4<24) OR (v1>48 AND v4<79));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{56, 50, 39, 26, 37}, sql.Row{81, 76, 74, 97, 18}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{94, 89, 91, 7, 45}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1=23 AND v4>=52 AND v2>=61) AND (v1<>85 AND v3>2 AND v4<15);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1 BETWEEN 32 AND 51 AND v4 BETWEEN 5 AND 14 AND v2=46 AND v3>=31) OR (v1>=32 AND v2<=26 AND v3>52 AND v4>55));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{67, 64, 26, 77, 97}, sql.Row{89, 86, 7, 57, 96}, sql.Row{64, 57, 25, 97, 65}, sql.Row{61, 53, 6, 53, 89}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=16 AND v2<59 AND v3<=43) OR (v1=17 AND v2<=4 AND v3>71));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{93, 89, 1, 27, 50}, sql.Row{24, 17, 49, 14, 7}, sql.Row{79, 74, 22, 42, 16}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=42 AND v4=47) OR (v1>=28)) AND (v1<>10) OR (v1 BETWEEN 20 AND 60 AND v2>96 AND v3<>28)) OR (v1=99 AND v2<=62 AND v3=30 AND v4 BETWEEN 92 AND 93));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=50 AND v3=4 AND v4=53 AND v2>=80) OR (v1<54 AND v4<=76 AND v2>48)) OR (v1>=38 AND v4<76 AND v2=56));`, + Expected: []sql.Row{sql.Row{52, 47, 94, 56, 21}, sql.Row{87, 84, 56, 78, 18}, sql.Row{11, 5, 76, 70, 46}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{50, 43, 66, 85, 66}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=79 AND v2>24) OR (v1<76 AND v3<=59 AND v4<=36 AND v2=39));`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<=15 AND v2 BETWEEN 21 AND 76 AND v3=23) OR (v1 BETWEEN 2 AND 55));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=85 AND v2>37 AND v3<=57 AND v4 BETWEEN 12 AND 49) AND (v1>10) OR (v1>56)) OR (v1>=57));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{74, 70, 56, 21, 22}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((((v1<>89 AND v2>=75) OR (v1<=5)) OR (v1=5 AND v2<19 AND v3>=1)) OR (v1>=18 AND v2>=17 AND v3 BETWEEN 78 AND 83)) OR (v1>=11 AND v3<=9 AND v4>39));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{78, 73, 91, 56, 0}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{7, 4, 10, 53, 69}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1 BETWEEN 36 AND 48 AND v4<97 AND v2>=99 AND v3=3) OR (v1<>84 AND v2=46 AND v3=4)) OR (v1>73 AND v2 BETWEEN 34 AND 39 AND v3 BETWEEN 34 AND 71 AND v4>=15)) OR (v1<>82));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1<=50 AND v3>=51 AND v4<>69) AND (v1>1 AND v3<24);`, + Expected: []sql.Row{}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>10 AND v2=72 AND v3<31) OR (v1<67 AND v3 BETWEEN 13 AND 70 AND v4>66 AND v2>39)) OR (v1<82)) AND (v1>=66);`, + Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{78, 73, 91, 56, 0}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{74, 70, 56, 21, 22}, sql.Row{77, 73, 10, 2, 0}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=84 AND v2<85 AND v3 BETWEEN 75 AND 86 AND v4<=34) OR (v1>=37 AND v2<59 AND v3 BETWEEN 2 AND 26 AND v4>6));`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{92, 88, 57, 12, 88}, sql.Row{74, 70, 56, 21, 22}, sql.Row{53, 48, 3, 11, 18}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>10 AND v2=42) OR (v1>=85 AND v2<>6 AND v3=34 AND v4<=45));`, + Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=24 AND v2<>33 AND v3=77 AND v4<>63) OR (v1<>22 AND v2<=58 AND v3>71 AND v4>=87)) OR (v1<=85 AND v2>18 AND v3<=40));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{40, 34, 89, 27, 90}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{83, 82, 31, 22, 99}, sql.Row{21, 12, 42, 15, 31}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{5, 3, 31, 22, 81}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{44, 37, 41, 36, 10}, sql.Row{84, 82, 70, 5, 47}, sql.Row{37, 33, 86, 12, 22}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{19, 10, 36, 27, 5}, sql.Row{45, 38, 71, 22, 37}, sql.Row{58, 50, 97, 0, 79}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{26, 20, 30, 34, 71}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<72 AND v2>=67) OR (v1<>88 AND v2<>23 AND v3=23));`, + Expected: []sql.Row{sql.Row{40, 34, 89, 27, 90}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{72, 69, 81, 70, 37}, sql.Row{11, 5, 76, 70, 46}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{3, 1, 72, 29, 21}, sql.Row{29, 22, 98, 22, 21}, sql.Row{57, 50, 79, 10, 12}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{60, 52, 72, 44, 2}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{58, 50, 97, 0, 79}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=11 AND v2>=99) OR (v1<18 AND v2>=34 AND v3<53)) OR (v1>68));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{86, 83, 41, 53, 57}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{73, 70, 40, 19, 5}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<=40 AND v2<0) OR (v1>=35 AND v2<=95 AND v3<>61)) OR (v1>49));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1=85 AND v2<81 AND v3 BETWEEN 14 AND 61 AND v4<>99) OR (v1 BETWEEN 31 AND 86 AND v4<>43)) OR (v1 BETWEEN 15 AND 67)) AND (v1 BETWEEN 37 AND 55);`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{43, 37, 35, 6, 44}, sql.Row{62, 53, 48, 19, 36}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{57, 50, 79, 10, 12}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>=52 AND v4>=86) OR (v1>=86 AND v3=79 AND v4=9 AND v2 BETWEEN 2 AND 6)) OR (v1>98 AND v2<=44 AND v3<>53));`, + Expected: []sql.Row{sql.Row{76, 71, 48, 89, 99}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{67, 64, 26, 77, 97}, sql.Row{92, 88, 57, 12, 88}, sql.Row{89, 86, 7, 57, 96}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>5 AND v4 BETWEEN 14 AND 43 AND v2>=62) OR (v1>=91 AND v2>=28 AND v3>=83 AND v4<>91));`, + Expected: []sql.Row{sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{72, 69, 81, 70, 37}, sql.Row{91, 87, 66, 8, 22}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{29, 22, 98, 22, 21}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{45, 38, 71, 22, 37}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1<>87) OR (v1>91 AND v2>23 AND v3<74));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1 BETWEEN 1 AND 19 AND v2 BETWEEN 22 AND 48) AND (v1 BETWEEN 6 AND 47 AND v2>=25 AND v3<27);`, + Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((((v1=76 AND v2>35 AND v3<=59 AND v4>25) OR (v1 BETWEEN 35 AND 82 AND v2 BETWEEN 8 AND 37 AND v3>18 AND v4<=70)) OR (v1<=95 AND v3=70 AND v4=11)) OR (v1 BETWEEN 15 AND 23 AND v2<>24 AND v3<=50 AND v4<>84));`, + Expected: []sql.Row{sql.Row{48, 41, 21, 82, 54}, sql.Row{28, 22, 21, 28, 78}, sql.Row{23, 15, 42, 17, 60}, sql.Row{66, 64, 23, 33, 5}, sql.Row{24, 17, 49, 14, 7}, sql.Row{55, 50, 36, 73, 58}, sql.Row{79, 74, 22, 42, 16}, sql.Row{29, 22, 98, 22, 21}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{64, 57, 25, 97, 65}, sql.Row{51, 45, 9, 76, 9}, sql.Row{26, 20, 30, 34, 71}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>42 AND v2=44 AND v3<>73) OR (v1>24 AND v2>49 AND v3>=7));`, + Expected: []sql.Row{sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{81, 76, 74, 97, 18}, sql.Row{52, 47, 94, 56, 21}, sql.Row{65, 63, 50, 20, 43}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{78, 73, 91, 56, 0}, sql.Row{91, 87, 66, 8, 22}, sql.Row{92, 88, 57, 12, 88}, sql.Row{36, 33, 53, 56, 88}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{100, 96, 73, 38, 38}, sql.Row{37, 33, 86, 12, 22}, sql.Row{60, 52, 72, 44, 2}, sql.Row{97, 93, 56, 71, 53}, sql.Row{45, 38, 71, 22, 37}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{69, 64, 77, 41, 17}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=79 AND v3<89 AND v4>=3) OR (v1<63 AND v2<66));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{22, 12, 46, 43, 23}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{54, 50, 26, 23, 71}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{12, 7, 7, 66, 62}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{34, 32, 16, 97, 29}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{51, 45, 9, 76, 9}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>66) OR (v1=33)) OR (v1<>39 AND v2>53 AND v3<73 AND v4<75));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{93, 89, 1, 27, 50}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1=15) OR (v1>36 AND v3=13 AND v4<=98 AND v2 BETWEEN 70 AND 85));`, + Expected: []sql.Row{sql.Row{23, 15, 42, 17, 60}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 23 AND 45 AND v4<30) OR (v1>=36 AND v2<>6 AND v3 BETWEEN 30 AND 53)) OR (v1 BETWEEN 41 AND 95));`, + Expected: []sql.Row{sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{31, 24, 26, 69, 25}, sql.Row{55, 50, 36, 73, 58}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{32, 24, 45, 96, 0}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>6 AND v4<>9 AND v2<>77 AND v3>=81) OR (v1<>21 AND v2>=17 AND v3<=3));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{48, 41, 21, 82, 54}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{0, 0, 33, 2, 67}, sql.Row{34, 32, 16, 97, 29}, sql.Row{25, 17, 75, 86, 18}, sql.Row{64, 57, 25, 97, 65}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{32, 24, 45, 96, 0}, sql.Row{4, 2, 27, 1, 75}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1 BETWEEN 94 AND 99 AND v2>4 AND v3<94 AND v4<=59) OR (v1=19 AND v2 BETWEEN 47 AND 54)) AND (v1>=83) OR (v1 BETWEEN 50 AND 97 AND v2<12 AND v3>23));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{93, 89, 1, 27, 50}, sql.Row{89, 86, 7, 57, 96}, sql.Row{100, 96, 73, 38, 38}, sql.Row{61, 53, 6, 53, 89}, sql.Row{75, 71, 3, 49, 55}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>19 AND v2>46 AND v3=26 AND v4>=47) OR (v1>18 AND v2<=79 AND v3=45 AND v4<=7)) OR (v1 BETWEEN 2 AND 21 AND v2>32));`, + Expected: []sql.Row{sql.Row{22, 12, 46, 43, 23}, sql.Row{23, 15, 42, 17, 60}, sql.Row{21, 12, 42, 15, 31}, sql.Row{11, 5, 76, 70, 46}, sql.Row{15, 8, 54, 46, 87}, sql.Row{24, 17, 49, 14, 7}, sql.Row{14, 7, 76, 26, 47}, sql.Row{16, 8, 99, 43, 1}, sql.Row{25, 17, 75, 86, 18}, sql.Row{19, 10, 36, 27, 5}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (v1>=5) AND (v1=50 AND v2<=50);`, + Expected: []sql.Row{sql.Row{56, 50, 39, 26, 37}, sql.Row{54, 50, 26, 23, 71}, sql.Row{55, 50, 36, 73, 58}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>=82 AND v2 BETWEEN 34 AND 50 AND v3<26 AND v4 BETWEEN 48 AND 76) OR (v1<=6));`, + Expected: []sql.Row{sql.Row{9, 5, 17, 52, 13}, sql.Row{11, 5, 76, 70, 46}, sql.Row{10, 5, 32, 30, 48}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{8, 4, 27, 77, 5}, sql.Row{5, 3, 31, 22, 81}, sql.Row{3, 1, 72, 29, 21}, sql.Row{1, 0, 55, 14, 32}, sql.Row{7, 4, 10, 53, 69}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE ((v1>29) OR (v1<>94 AND v2>=56 AND v3=14));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{93, 89, 1, 27, 50}, sql.Row{36, 33, 53, 56, 88}, sql.Row{55, 50, 36, 73, 58}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1>8 AND v2<97 AND v3=51 AND v4<=26) OR (v1>87)) OR (v1<10 AND v2<=45 AND v3>=73));`, + Expected: []sql.Row{sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{96, 91, 23, 2, 9}, sql.Row{95, 90, 25, 0, 17}, sql.Row{92, 88, 57, 12, 88}, sql.Row{17, 9, 7, 74, 92}, sql.Row{93, 89, 1, 27, 50}, sql.Row{8, 4, 27, 77, 5}, sql.Row{94, 89, 91, 7, 45}, sql.Row{13, 7, 21, 75, 70}, sql.Row{100, 96, 73, 38, 38}, sql.Row{97, 93, 56, 71, 53}}, + }, + { + Query: `SELECT * FROM comp_index_t2 WHERE (((v1<>15 AND v2>1) OR (v1<46)) OR (v1>47 AND v2>=9 AND v3 BETWEEN 39 AND 87 AND v4>=10));`, + Expected: []sql.Row{sql.Row{41, 35, 6, 86, 74}, sql.Row{49, 43, 23, 15, 0}, sql.Row{98, 94, 43, 71, 43}, sql.Row{99, 94, 79, 53, 73}, sql.Row{22, 12, 46, 43, 23}, sql.Row{40, 34, 89, 27, 90}, sql.Row{48, 41, 21, 82, 54}, sql.Row{56, 50, 39, 26, 37}, sql.Row{76, 71, 48, 89, 99}, sql.Row{81, 76, 74, 97, 18}, sql.Row{20, 12, 0, 33, 62}, sql.Row{35, 33, 29, 69, 6}, sql.Row{52, 47, 94, 56, 21}, sql.Row{54, 50, 26, 23, 71}, sql.Row{65, 63, 50, 20, 43}, sql.Row{68, 64, 41, 74, 85}, sql.Row{72, 69, 81, 70, 37}, sql.Row{87, 84, 56, 78, 18}, sql.Row{28, 22, 21, 28, 78}, sql.Row{43, 37, 35, 6, 44}, sql.Row{90, 87, 23, 16, 63}, sql.Row{23, 15, 42, 17, 60}, sql.Row{62, 53, 48, 19, 36}, sql.Row{78, 73, 91, 56, 0}, sql.Row{82, 82, 29, 66, 71}, sql.Row{83, 82, 31, 22, 99}, sql.Row{88, 85, 2, 3, 88}, sql.Row{9, 5, 17, 52, 13}, sql.Row{21, 12, 42, 15, 31}, sql.Row{96, 91, 23, 2, 9}, sql.Row{91, 87, 66, 8, 22}, sql.Row{95, 90, 25, 0, 17}, sql.Row{67, 64, 26, 77, 97}, sql.Row{85, 83, 37, 36, 16}, sql.Row{92, 88, 57, 12, 88}, sql.Row{11, 5, 76, 70, 46}, sql.Row{17, 9, 7, 74, 92}, sql.Row{10, 5, 32, 30, 48}, sql.Row{66, 64, 23, 33, 5}, sql.Row{86, 83, 41, 53, 57}, sql.Row{0, 0, 33, 2, 67}, sql.Row{2, 1, 43, 13, 36}, sql.Row{15, 8, 54, 46, 87}, sql.Row{31, 24, 26, 69, 25}, sql.Row{24, 17, 49, 14, 7}, sql.Row{36, 33, 53, 56, 88}, sql.Row{8, 4, 27, 77, 5}, sql.Row{14, 7, 76, 26, 47}, sql.Row{55, 50, 36, 73, 58}, sql.Row{5, 3, 31, 22, 81}, sql.Row{16, 8, 99, 43, 1}, sql.Row{39, 34, 87, 13, 51}, sql.Row{59, 51, 97, 39, 36}, sql.Row{70, 66, 97, 6, 39}, sql.Row{79, 74, 22, 42, 16}, sql.Row{89, 86, 7, 57, 96}, sql.Row{94, 89, 91, 7, 45}, sql.Row{3, 1, 72, 29, 21}, sql.Row{12, 7, 7, 66, 62}, sql.Row{29, 22, 98, 22, 21}, sql.Row{38, 34, 55, 37, 34}, sql.Row{42, 36, 7, 40, 16}, sql.Row{57, 50, 79, 10, 12}, sql.Row{74, 70, 56, 21, 22}, sql.Row{1, 0, 55, 14, 32}, sql.Row{13, 7, 21, 75, 70}, sql.Row{44, 37, 41, 36, 10}, sql.Row{46, 39, 45, 75, 55}, sql.Row{53, 48, 3, 11, 18}, sql.Row{84, 82, 70, 5, 47}, sql.Row{100, 96, 73, 38, 38}, sql.Row{34, 32, 16, 97, 29}, sql.Row{37, 33, 86, 12, 22}, sql.Row{25, 17, 75, 86, 18}, sql.Row{27, 21, 21, 32, 8}, sql.Row{30, 23, 43, 13, 11}, sql.Row{47, 41, 1, 85, 9}, sql.Row{60, 52, 72, 44, 2}, sql.Row{64, 57, 25, 97, 65}, sql.Row{7, 4, 10, 53, 69}, sql.Row{19, 10, 36, 27, 5}, sql.Row{97, 93, 56, 71, 53}, sql.Row{77, 73, 10, 2, 0}, sql.Row{45, 38, 71, 22, 37}, sql.Row{51, 45, 9, 76, 9}, sql.Row{33, 29, 72, 97, 93}, sql.Row{50, 43, 66, 85, 66}, sql.Row{58, 50, 97, 0, 79}, sql.Row{71, 67, 39, 87, 15}, sql.Row{73, 70, 40, 19, 5}, sql.Row{18, 9, 19, 38, 35}, sql.Row{32, 24, 45, 96, 0}, sql.Row{26, 20, 30, 34, 71}, sql.Row{61, 53, 6, 53, 89}, sql.Row{63, 55, 31, 29, 92}, sql.Row{69, 64, 77, 41, 17}, sql.Row{75, 71, 3, 49, 55}, sql.Row{80, 74, 35, 72, 97}, sql.Row{4, 2, 27, 1, 75}, sql.Row{6, 4, 6, 67, 80}}, + }, +} diff --git a/enginetest/index_query_plans.go b/enginetest/queries/index_query_plans.go similarity index 99% rename from enginetest/index_query_plans.go rename to enginetest/queries/index_query_plans.go index 0bac1a1f12..3bd1b1a187 100644 --- a/enginetest/index_query_plans.go +++ b/enginetest/queries/index_query_plans.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries var IndexPlanTests = []QueryPlanTest{ { diff --git a/enginetest/insert_queries.go b/enginetest/queries/insert_queries.go similarity index 99% rename from enginetest/insert_queries.go rename to enginetest/queries/insert_queries.go index 500eea2c49..f42b301e58 100644 --- a/enginetest/insert_queries.go +++ b/enginetest/queries/insert_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "math" diff --git a/enginetest/join_queries.go b/enginetest/queries/join_queries.go similarity index 94% rename from enginetest/join_queries.go rename to enginetest/queries/join_queries.go index 11287cf606..0d9992b342 100644 --- a/enginetest/join_queries.go +++ b/enginetest/queries/join_queries.go @@ -1,4 +1,18 @@ -package enginetest +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package queries import ( "github.com/dolthub/go-mysql-server/sql" diff --git a/enginetest/json_scripts.go b/enginetest/queries/json_scripts.go similarity index 99% rename from enginetest/json_scripts.go rename to enginetest/queries/json_scripts.go index 2316604980..0af3a8d99b 100644 --- a/enginetest/json_scripts.go +++ b/enginetest/queries/json_scripts.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import "github.com/dolthub/go-mysql-server/sql" diff --git a/enginetest/load_queries.go b/enginetest/queries/load_queries.go similarity index 99% rename from enginetest/load_queries.go rename to enginetest/queries/load_queries.go index b3776cd924..8afdcc5569 100644 --- a/enginetest/load_queries.go +++ b/enginetest/queries/load_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "fmt" diff --git a/enginetest/queries/null_range_tests.go b/enginetest/queries/null_range_tests.go new file mode 100644 index 0000000000..6aa48c9acd --- /dev/null +++ b/enginetest/queries/null_range_tests.go @@ -0,0 +1,121 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package queries + +import ( + "github.com/dolthub/go-mysql-server/sql" +) + +var NullRangeTests = []QueryTest{ + { + Query: "select * from null_ranges where y IS NULL or y < 1", + Expected: []sql.Row{ + {0, 0}, + {3, nil}, + {4, nil}, + }, + }, + { + Query: "select * from null_ranges where y IS NULL and y < 1", + Expected: []sql.Row{}, + }, + { + Query: "select * from null_ranges where y IS NULL or y IS NOT NULL", + Expected: []sql.Row{ + {0, 0}, + {1, 1}, + {2, 2}, + {3, nil}, + {4, nil}, + }, + }, + { + Query: "select * from null_ranges where y IS NOT NULL", + Expected: []sql.Row{ + {0, 0}, + {1, 1}, + {2, 2}, + }, + }, + { + Query: "select * from null_ranges where y IS NULL or y = 0 or y = 1", + Expected: []sql.Row{ + {0, 0}, + {1, 1}, + {3, nil}, + {4, nil}, + }, + }, + { + Query: "select * from null_ranges where y IS NULL or y < 1 or y > 1", + Expected: []sql.Row{ + {0, 0}, + {2, 2}, + {3, nil}, + {4, nil}, + }, + }, + { + Query: "select * from null_ranges where y IS NOT NULL and x > 1", + Expected: []sql.Row{ + {2, 2}, + }, + }, { + Query: "select * from null_ranges where y IS NULL and x = 4", + Expected: []sql.Row{ + {4, nil}, + }, + }, { + Query: "select * from null_ranges where y IS NULL and x > 1", + Expected: []sql.Row{ + {3, nil}, + {4, nil}, + }, + }, + { + Query: "select * from null_ranges where y IS NULL and y IS NOT NULL", + Expected: []sql.Row{}, + }, + { + Query: "select * from null_ranges where y is NULL and y > -1 and y > -2", + Expected: []sql.Row{}, + }, + { + Query: "select * from null_ranges where y > -1 and y < 7 and y IS NULL", + Expected: []sql.Row{}, + }, + { + Query: "select * from null_ranges where y > -1 and y > -2 and y IS NOT NULL", + Expected: []sql.Row{ + {0, 0}, + {1, 1}, + {2, 2}, + }, + }, + { + Query: "select * from null_ranges where y > -1 and y > 1 and y IS NOT NULL", + Expected: []sql.Row{ + {2, 2}, + }, + }, + { + Query: "select * from null_ranges where y < 6 and y > -1 and y IS NOT NULL", + Expected: []sql.Row{ + {0, 0}, + {1, 1}, + {2, 2}, + }, + }, +} diff --git a/enginetest/queries/ordinal_ddl_queries.go b/enginetest/queries/ordinal_ddl_queries.go new file mode 100644 index 0000000000..53596cb4b2 --- /dev/null +++ b/enginetest/queries/ordinal_ddl_queries.go @@ -0,0 +1,281 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package queries + +import ( + "github.com/dolthub/go-mysql-server/sql" +) + +var OrdinalDDLQueries = []QueryTest{ + { + Query: "show keys from short_ord_pk", + Expected: []sql.Row{ + {"short_ord_pk", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"short_ord_pk", 0, "PRIMARY", 2, "x", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + Query: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'short_ord_pk'", + Expected: []sql.Row{ + {"x", uint(1)}, + {"y", uint(2)}, + }, + }, + { + Query: "show keys from long_ord_pk1", + Expected: []sql.Row{ + {"long_ord_pk1", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk1", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + Query: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk1' and column_key = 'PRI'", + Expected: []sql.Row{ + {"v", uint(2)}, + {"y", uint(5)}, + }, + }, + { + Query: "show keys from long_ord_pk2", + Expected: []sql.Row{ + {"long_ord_pk2", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 3, "x", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 4, "z", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 5, "u", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + Query: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk2' and column_key = 'PRI'", + Expected: []sql.Row{ + {"u", uint(1)}, + {"v", uint(2)}, + {"x", uint(4)}, + {"y", uint(5)}, + {"z", uint(6)}, + }, + }, + { + Query: "show keys from long_ord_pk3", + Expected: []sql.Row{ + {"long_ord_pk3", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 3, "x", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 4, "z", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 5, "u", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + Query: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk3' and column_key = 'PRI'", + Expected: []sql.Row{ + {"u", uint(1)}, + {"v", uint(2)}, + {"x", uint(5)}, + {"y", uint(6)}, + {"z", uint(7)}, + }, + }, + { + Query: "show keys from ord_kl", + Expected: []sql.Row{}, + }, + { + Query: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'ord_kl' and column_key = 'PRI'", + Expected: []sql.Row{}, + }, +} + +var OrdinalDDLWriteQueries = []WriteQueryTest{ + { + WriteQuery: "ALTER TABLE long_ord_pk1 ADD COLUMN ww int AFTER v", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk1' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"v", uint(2)}, + {"y", uint(6)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk1 MODIFY COLUMN w int AFTER y", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk1' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"v", uint(2)}, + {"y", uint(4)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk1 DROP PRIMARY KEY", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "show keys from ord_kl", + ExpectedSelect: []sql.Row{}, + }, + { + WriteQuery: "ALTER TABLE ord_kl ADD PRIMARY KEY (y,v)", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "show keys from ord_kl", + ExpectedSelect: []sql.Row{ + {"ord_kl", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"ord_kl", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + WriteQuery: "ALTER TABLE ord_kl ADD PRIMARY KEY (y,v)", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'ord_kl' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"v", uint(2)}, + {"y", uint(5)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk1 MODIFY COLUMN y int AFTER u", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk1' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"y", uint(2)}, + {"v", uint(3)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk1 MODIFY COLUMN y int AFTER u", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "show keys from long_ord_pk1", + ExpectedSelect: []sql.Row{ + {"long_ord_pk1", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk1", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk1 RENAME COLUMN y to yy", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk1' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"v", uint(2)}, + {"yy", uint(5)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk1 RENAME COLUMN y to yy", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "show keys from long_ord_pk1", + ExpectedSelect: []sql.Row{ + {"long_ord_pk1", 0, "PRIMARY", 1, "yy", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk1", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk2 ADD COLUMN ww int AFTER w", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk2' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"u", uint(1)}, + {"v", uint(2)}, + {"x", uint(5)}, + {"y", uint(6)}, + {"z", uint(7)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk2 ADD COLUMN ww int AFTER w", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "show keys from long_ord_pk2", + ExpectedSelect: []sql.Row{ + {"long_ord_pk2", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 3, "x", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 4, "z", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 5, "u", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk3 DROP COLUMN ww", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk3' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"u", uint(1)}, + {"v", uint(2)}, + {"x", uint(4)}, + {"y", uint(5)}, + {"z", uint(6)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk3 DROP COLUMN ww", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "show keys from long_ord_pk3", + ExpectedSelect: []sql.Row{ + {"long_ord_pk3", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 3, "x", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 4, "z", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk3", 0, "PRIMARY", 5, "u", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk2 MODIFY COLUMN y int AFTER u", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "SELECT column_name, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'mydb' AND TABLE_NAME = 'long_ord_pk2' and column_key = 'PRI'", + ExpectedSelect: []sql.Row{ + {"u", uint(1)}, + {"y", uint(2)}, + {"v", uint(3)}, + {"x", uint(5)}, + {"z", uint(6)}, + }, + }, + { + WriteQuery: "ALTER TABLE long_ord_pk2 MODIFY COLUMN y int AFTER u", + ExpectedWriteResult: []sql.Row{ + {sql.OkResult{RowsAffected: 0}}, + }, + SelectQuery: "show keys from long_ord_pk2", + ExpectedSelect: []sql.Row{ + {"long_ord_pk2", 0, "PRIMARY", 1, "y", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 2, "v", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 3, "x", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 4, "z", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + {"long_ord_pk2", 0, "PRIMARY", 5, "u", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + }, + }, +} diff --git a/enginetest/priv_auth_queries.go b/enginetest/queries/priv_auth_queries.go similarity index 99% rename from enginetest/priv_auth_queries.go rename to enginetest/queries/priv_auth_queries.go index 0bed8ad74d..6fb761bee0 100644 --- a/enginetest/priv_auth_queries.go +++ b/enginetest/queries/priv_auth_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "testing" diff --git a/enginetest/procedure_queries.go b/enginetest/queries/procedure_queries.go similarity index 99% rename from enginetest/procedure_queries.go rename to enginetest/queries/procedure_queries.go index 98a47150bc..982f02ae78 100644 --- a/enginetest/procedure_queries.go +++ b/enginetest/queries/procedure_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "time" diff --git a/enginetest/queries.go b/enginetest/queries/queries.go similarity index 91% rename from enginetest/queries.go rename to enginetest/queries/queries.go index 97f644307d..83cd44b4b0 100644 --- a/enginetest/queries.go +++ b/enginetest/queries/queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "time" @@ -2341,74 +2341,6 @@ var QueryTests = []QueryTest{ Query: `SELECT SUBSTRING_INDEX(mytable.s, "d", 1) AS s FROM mytable INNER JOIN othertable ON (SUBSTRING_INDEX(mytable.s, "d", 1) = SUBSTRING_INDEX(othertable.s2, "d", 1)) GROUP BY 1 HAVING s = 'secon'`, Expected: []sql.Row{{"secon"}}, }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "%a_%" ESCAPE 'a'`, - Expected: []sql.Row{sql.Row{"first_row"}, sql.Row{"second_row"}, sql.Row{"third_row"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "%$_%" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{"first_row"}, sql.Row{"second_row"}, sql.Row{"third_row"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "first$_%" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{"first_row"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "%$_row" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{"first_row"}, sql.Row{"second_row"}, sql.Row{"third_row"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "$%" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{"%"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "$'" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{`'`}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "$\"" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{`"`}}, - }, - { - Query: "SELECT name FROM specialtable t WHERE t.name LIKE '$\t' ESCAPE '$'", - Expected: []sql.Row{sql.Row{"\t"}}, - }, - { - Query: "SELECT name FROM specialtable t WHERE t.name LIKE '$\n' ESCAPE '$'", - Expected: []sql.Row{sql.Row{"\n"}}, - }, - { - Query: "SELECT name FROM specialtable t WHERE t.name LIKE '$\v' ESCAPE '$'", - Expected: []sql.Row{sql.Row{"\v"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "test$%test" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{"test%test"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "%$%%" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{"%"}, sql.Row{"test%test"}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "%$'%" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{`'`}, sql.Row{`test'test`}}, - }, - { - Query: `SELECT name FROM specialtable t WHERE t.name LIKE "%\"%" ESCAPE '$'`, - Expected: []sql.Row{sql.Row{`"`}, sql.Row{`test"test`}}, - }, - { - Query: "SELECT name FROM specialtable t WHERE t.name LIKE 'test$\ttest' ESCAPE '$'", - Expected: []sql.Row{sql.Row{"test\ttest"}}, - }, - { - Query: "SELECT name FROM specialtable t WHERE t.name LIKE '%$\n%' ESCAPE '$'", - Expected: []sql.Row{sql.Row{"\n"}, sql.Row{"test\ntest"}}, - }, - { - Query: "SELECT name FROM specialtable t WHERE t.name LIKE '%$\v%' ESCAPE '$'", - Expected: []sql.Row{sql.Row{"\v"}, sql.Row{"test\vtest"}}, - }, { Query: `SELECT TRIM(mytable.s) AS s FROM mytable`, Expected: []sql.Row{sql.Row{"first row"}, sql.Row{"second row"}, sql.Row{"third row"}}, @@ -3438,22 +3370,6 @@ var QueryTests = []QueryTest{ Query: `SELECT SUM(i) FROM mytable`, Expected: []sql.Row{{float64(6)}}, }, - { - Query: `SELECT GET_LOCK("test", 0)`, - Expected: []sql.Row{{int8(1)}}, - }, - { - Query: `SELECT IS_FREE_LOCK("test")`, - Expected: []sql.Row{{int8(0)}}, - }, - { - Query: `SELECT RELEASE_LOCK("test")`, - Expected: []sql.Row{{int8(1)}}, - }, - { - Query: `SELECT RELEASE_ALL_LOCKS()`, - Expected: []sql.Row{{int32(0)}}, - }, { Query: `SELECT * FROM mytable mt INNER JOIN othertable ot ON mt.i = ot.i2 AND mt.i > 2`, Expected: []sql.Row{ @@ -4009,12 +3925,6 @@ var QueryTests = []QueryTest{ Query: `SELECT -1`, Expected: []sql.Row{{int8(-1)}}, }, - { - Query: ` - SHOW WARNINGS - `, - Expected: nil, - }, { Query: `SHOW WARNINGS LIMIT 0`, Expected: nil, @@ -6078,8 +5988,8 @@ var QueryTests = []QueryTest{ { Query: "SELECT * FROM people WHERE last_name='doe' and first_name='jane' order by dob", Expected: []sql.Row{ - sql.NewRow(dob(1990, 2, 21), "jane", "doe", "", int64(68), int64(1)), - sql.NewRow(dob(2010, 3, 15), "jane", "doe", "", int64(69), int64(1)), + sql.NewRow(time.Date(1990, time.Month(2), 21, 0, 0, 0, 0, time.UTC), "jane", "doe", "", int64(68), int64(1)), + sql.NewRow(time.Date(2010, time.Month(3), 15, 0, 0, 0, 0, time.UTC), "jane", "doe", "", int64(69), int64(1)), }, }, { @@ -7306,357 +7216,248 @@ var DateParseQueries = []QueryTest{ } var InfoSchemaQueries = []QueryTest{ - { - Query: "SHOW TABLES", - Expected: []sql.Row{ - {"auto_increment_tbl"}, - {"bigtable"}, - {"floattable"}, - {"fk_tbl"}, - {"mytable"}, - {"myview"}, - {"newlinetable"}, - {"niltable"}, - {"one_pk_three_idx"}, - {"one_pk_two_idx"}, - {"othertable"}, - {"tabletest"}, - {"people"}, - {"datetime_table"}, - {"invert_pk"}, - }, - }, - { - Query: "SHOW FULL TABLES", - Expected: []sql.Row{ - {"auto_increment_tbl", "BASE TABLE"}, - {"bigtable", "BASE TABLE"}, - {"fk_tbl", "BASE TABLE"}, - {"floattable", "BASE TABLE"}, - {"mytable", "BASE TABLE"}, - {"myview", "VIEW"}, - {"newlinetable", "BASE TABLE"}, - {"niltable", "BASE TABLE"}, - {"one_pk_three_idx", "BASE TABLE"}, - {"one_pk_two_idx", "BASE TABLE"}, - {"othertable", "BASE TABLE"}, - {"tabletest", "BASE TABLE"}, - {"people", "BASE TABLE"}, - {"datetime_table", "BASE TABLE"}, - {"invert_pk", "BASE TABLE"}, - }, - }, - { - Query: "SHOW TABLES FROM foo", - Expected: []sql.Row{ - {"other_table"}, - }, - }, - { - Query: "SHOW TABLES LIKE '%table'", - Expected: []sql.Row{ - {"mytable"}, - {"othertable"}, - {"bigtable"}, - {"floattable"}, - {"niltable"}, - {"newlinetable"}, - {"datetime_table"}, - }, - }, - { - Query: `SHOW COLUMNS FROM mytable`, - Expected: []sql.Row{ - {"i", "bigint", "NO", "PRI", "", ""}, - {"s", "varchar(20)", "NO", "UNI", "", ""}, - }, - }, - { - Query: `DESCRIBE mytable`, - Expected: []sql.Row{ - {"i", "bigint", "NO", "PRI", "", ""}, - {"s", "varchar(20)", "NO", "UNI", "", ""}, - }, - }, - { - Query: `DESC mytable`, - Expected: []sql.Row{ - {"i", "bigint", "NO", "PRI", "", ""}, - {"s", "varchar(20)", "NO", "UNI", "", ""}, - }, - }, - { - Query: `DESCRIBE auto_increment_tbl`, - Expected: []sql.Row{ - {"pk", "bigint", "NO", "PRI", "", "auto_increment"}, - {"c0", "bigint", "YES", "", "", ""}, - }, - }, - { - Query: `SHOW COLUMNS FROM mytable WHERE Field = 'i'`, - Expected: []sql.Row{ - {"i", "bigint", "NO", "PRI", "", ""}, - }, - }, - { - Query: `SHOW COLUMNS FROM mytable LIKE 'i'`, - Expected: []sql.Row{ - {"i", "bigint", "NO", "PRI", "", ""}, - }, - }, - { - Query: `SHOW FULL COLUMNS FROM mytable`, - Expected: []sql.Row{ - {"i", "bigint", nil, "NO", "PRI", "", "", "", ""}, - {"s", "varchar(20)", "utf8mb4_0900_bin", "NO", "UNI", "", "", "", "column s"}, - }, - }, - { - Query: "SHOW TABLES WHERE `Tables_in_mydb` = 'mytable'", - Expected: []sql.Row{ - {"mytable"}, - }, - }, - { - Query: ` - SELECT - LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA - FROM INFORMATION_SCHEMA.FILES - WHERE FILE_TYPE = 'UNDO LOG' - AND FILE_NAME IS NOT NULL - AND LOGFILE_GROUP_NAME IS NOT NULL - GROUP BY LOGFILE_GROUP_NAME, FILE_NAME, ENGINE, TOTAL_EXTENTS, INITIAL_SIZE - ORDER BY LOGFILE_GROUP_NAME - `, - Expected: nil, - }, - { - Query: ` - SELECT DISTINCT - TABLESPACE_NAME, FILE_NAME, LOGFILE_GROUP_NAME, EXTENT_SIZE, INITIAL_SIZE, ENGINE - FROM INFORMATION_SCHEMA.FILES - WHERE FILE_TYPE = 'DATAFILE' - ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME - `, - Expected: nil, - }, - { - Query: ` - SELECT - COLUMN_NAME, - JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') - FROM information_schema.COLUMN_STATISTICS - WHERE SCHEMA_NAME = 'mydb' - AND TABLE_NAME = 'mytable' - `, - Expected: nil, - }, - { - Query: ` - SELECT TABLE_NAME FROM information_schema.TABLES - WHERE TABLE_SCHEMA='mydb' AND (TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW') - ORDER BY 1 - `, - Expected: []sql.Row{ - {"auto_increment_tbl"}, - {"bigtable"}, - {"datetime_table"}, - {"fk_tbl"}, - {"floattable"}, - {"invert_pk"}, - {"mytable"}, - {"myview"}, - {"newlinetable"}, - {"niltable"}, - {"one_pk_three_idx"}, - {"one_pk_two_idx"}, - {"othertable"}, - {"people"}, - {"tabletest"}, - }, - }, - { - Query: ` - SELECT COLUMN_NAME, DATA_TYPE FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA='mydb' AND TABLE_NAME='mytable' - `, - Expected: []sql.Row{ - {"s", "varchar(20)"}, - {"i", "bigint"}, - }, - }, - { - Query: ` - SELECT COLUMN_NAME FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' - GROUP BY COLUMN_NAME - `, - Expected: []sql.Row{ - {"s"}, - {"i"}, - {"s2"}, - {"i2"}, - {"t"}, - {"n"}, - {"f32"}, - {"f64"}, - {"b"}, - {"f"}, - {"date_col"}, - {"datetime_col"}, - {"timestamp_col"}, - {"time_col"}, - }, - }, - { - Query: ` - SELECT COLUMN_NAME FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' - GROUP BY 1 - `, - Expected: []sql.Row{ - {"s"}, - {"i"}, - {"s2"}, - {"i2"}, - {"t"}, - {"n"}, - {"f32"}, - {"f64"}, - {"b"}, - {"f"}, - {"date_col"}, - {"datetime_col"}, - {"timestamp_col"}, - {"time_col"}, - }, - }, - { - Query: ` - SELECT COLUMN_NAME AS COLUMN_NAME FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' - GROUP BY 1 - `, - Expected: []sql.Row{ - {"s"}, - {"i"}, - {"s2"}, - {"i2"}, - {"t"}, - {"n"}, - {"f32"}, - {"f64"}, - {"b"}, - {"f"}, - {"date_col"}, - {"datetime_col"}, - {"timestamp_col"}, - {"time_col"}, - }, - }, - { - Query: ` - SELECT COLUMN_NAME AS COLUMN_NAME FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' - GROUP BY 1 HAVING SUBSTRING(COLUMN_NAME, 1, 1) = "s" - `, - Expected: []sql.Row{{"s"}, {"s2"}}, - }, - { - Query: `SHOW INDEXES FROM mytaBLE`, - Expected: []sql.Row{ - {"mytable", 0, "PRIMARY", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 0, "mytable_s", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "mytable_i_s", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "mytable_i_s", 2, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "idx_si", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "idx_si", 2, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - }, - }, - { - Query: `SHOW KEYS FROM mytaBLE`, - Expected: []sql.Row{ - {"mytable", 0, "PRIMARY", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 0, "mytable_s", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "mytable_i_s", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "mytable_i_s", 2, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "idx_si", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - {"mytable", 1, "idx_si", 2, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, - }, - }, - { - Query: `SHOW CREATE TABLE mytaBLE`, - Expected: []sql.Row{ - {"mytable", "CREATE TABLE `mytable` (\n" + - " `i` bigint NOT NULL,\n" + - " `s` varchar(20) NOT NULL COMMENT 'column s',\n" + - " PRIMARY KEY (`i`),\n" + - " KEY `idx_si` (`s`,`i`),\n" + - " KEY `mytable_i_s` (`i`,`s`),\n" + - " UNIQUE KEY `mytable_s` (`s`)\n" + - ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}, - }, - }, - { - Query: `SHOW CREATE TABLE fk_TBL`, - Expected: []sql.Row{ - {"fk_tbl", "CREATE TABLE `fk_tbl` (\n" + - " `pk` bigint NOT NULL,\n" + - " `a` bigint,\n" + - " `b` varchar(20),\n" + - " PRIMARY KEY (`pk`),\n" + - " KEY `ab` (`a`,`b`),\n" + - " CONSTRAINT `fk1` FOREIGN KEY (`a`,`b`) REFERENCES `mytable` (`i`,`s`) ON DELETE CASCADE\n" + - ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}, - }, - }, - { - - Query: "SELECT table_name, `auto_increment` FROM information_schema.tables " + - "WHERE TABLE_SCHEMA='mydb' AND TABLE_TYPE='BASE TABLE' ORDER BY 1", - Expected: []sql.Row{ - {"auto_increment_tbl", nil}, - {"bigtable", nil}, - {"datetime_table", nil}, - {"fk_tbl", nil}, - {"floattable", nil}, - {"invert_pk", nil}, - {"mytable", nil}, - {"newlinetable", nil}, - {"niltable", nil}, - {"one_pk_three_idx", nil}, - {"one_pk_two_idx", nil}, - {"othertable", nil}, - {"people", nil}, - {"tabletest", nil}, - }, - }, - { - Query: "SHOW ENGINES", - Expected: []sql.Row{ - {"InnoDB", "DEFAULT", "Supports transactions, row-level locking, and foreign keys", "YES", "YES", "YES"}, - }, - }, + //{ + // Query: "SHOW TABLES", + // Expected: []sql.Row{ + // {"myview"}, + // {"fk_tbl"}, + // {"mytable"}, + // }, + //}, + //{ + // Query: "SHOW FULL TABLES", + // Expected: []sql.Row{ + // {"fk_tbl", "BASE TABLE"}, + // {"myview", "VIEW"}, + // {"mytable", "BASE TABLE"}, + // }, + //}, + //{ + // Query: "SHOW TABLES FROM foo", + // Expected: []sql.Row{ + // {"other_table"}, + // }, + //}, + //{ + // Query: "SHOW TABLES LIKE '%table'", + // Expected: []sql.Row{ + // {"mytable"}, + // }, + //}, + //{ + // Query: `SHOW COLUMNS FROM mytable`, + // Expected: []sql.Row{ + // {"i", "bigint", "NO", "PRI", "", ""}, + // {"s", "varchar(20)", "NO", "UNI", "", ""}, + // }, + //}, + //{ + // Query: `DESCRIBE mytable`, + // Expected: []sql.Row{ + // {"i", "bigint", "NO", "PRI", "", ""}, + // {"s", "varchar(20)", "NO", "UNI", "", ""}, + // }, + //}, + //{ + // Query: `DESC mytable`, + // Expected: []sql.Row{ + // {"i", "bigint", "NO", "PRI", "", ""}, + // {"s", "varchar(20)", "NO", "UNI", "", ""}, + // }, + //}, + //{ + // Query: `SHOW COLUMNS FROM mytable WHERE Field = 'i'`, + // Expected: []sql.Row{ + // {"i", "bigint", "NO", "PRI", "", ""}, + // }, + //}, + //{ + // Query: `SHOW COLUMNS FROM mytable LIKE 'i'`, + // Expected: []sql.Row{ + // {"i", "bigint", "NO", "PRI", "", ""}, + // }, + //}, + //{ + // Query: `SHOW FULL COLUMNS FROM mytable`, + // Expected: []sql.Row{ + // {"i", "bigint", nil, "NO", "PRI", "", "", "", ""}, + // {"s", "varchar(20)", "utf8mb4_0900_bin", "NO", "UNI", "", "", "", "column s"}, + // }, + //}, + //{ + // Query: "SHOW TABLES WHERE `Tables_in_mydb` = 'mytable'", + // Expected: []sql.Row{ + // {"mytable"}, + // }, + //}, + //{ + // Query: ` + // SELECT + // LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA + // FROM INFORMATION_SCHEMA.FILES + // WHERE FILE_TYPE = 'UNDO LOG' + // AND FILE_NAME IS NOT NULL + // AND LOGFILE_GROUP_NAME IS NOT NULL + // GROUP BY LOGFILE_GROUP_NAME, FILE_NAME, ENGINE, TOTAL_EXTENTS, INITIAL_SIZE + // ORDER BY LOGFILE_GROUP_NAME + // `, + // Expected: nil, + //}, + //{ + // Query: ` + // SELECT DISTINCT + // TABLESPACE_NAME, FILE_NAME, LOGFILE_GROUP_NAME, EXTENT_SIZE, INITIAL_SIZE, ENGINE + // FROM INFORMATION_SCHEMA.FILES + // WHERE FILE_TYPE = 'DATAFILE' + // ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME + // `, + // Expected: nil, + //}, + //{ + // Query: ` + // SELECT + // COLUMN_NAME, + // JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') + // FROM information_schema.COLUMN_STATISTICS + // WHERE SCHEMA_NAME = 'mydb' + // AND TABLE_NAME = 'mytable' + // `, + // Expected: nil, + //}, + //{ + // Query: ` + // SELECT TABLE_NAME FROM information_schema.TABLES + // WHERE TABLE_SCHEMA='mydb' AND (TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW') + // ORDER BY 1 + // `, + // Expected: []sql.Row{ + // {"fk_tbl"}, + // {"mytable"}, + // {"myview"}, + // }, + //}, + //{ + // Query: ` + // SELECT COLUMN_NAME, DATA_TYPE FROM information_schema.COLUMNS + // WHERE TABLE_SCHEMA='mydb' AND TABLE_NAME='mytable' + // `, + // Expected: []sql.Row{ + // {"s", "varchar(20)"}, + // {"i", "bigint"}, + // }, + //}, + //{ + // Query: ` + // SELECT COLUMN_NAME FROM information_schema.COLUMNS + // WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' + // GROUP BY COLUMN_NAME + // `, + // Expected: []sql.Row{ + // {"s"}, + // {"i"}, + // }, + //}, + //{ + // Query: ` + // SELECT COLUMN_NAME FROM information_schema.COLUMNS + // WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' + // GROUP BY 1 + // `, + // Expected: []sql.Row{ + // {"s"}, + // {"i"}, + // }, + //}, + //{ + // Query: ` + // SELECT COLUMN_NAME AS COLUMN_NAME FROM information_schema.COLUMNS + // WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' + // GROUP BY 1 + // `, + // Expected: []sql.Row{ + // {"s"}, + // {"i"}, + // }, + //}, + //{ + // Query: ` + // SELECT COLUMN_NAME AS COLUMN_NAME FROM information_schema.COLUMNS + // WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '%table' + // GROUP BY 1 HAVING SUBSTRING(COLUMN_NAME, 1, 1) = "s" + // `, + // Expected: []sql.Row{{"s"}}, + //}, + //{ + // Query: `SHOW INDEXES FROM mytaBLE`, + // Expected: []sql.Row{ + // {"mytable", 0, "PRIMARY", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 0, "mytable_s", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "mytable_i_s", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "mytable_i_s", 2, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "idx_si", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "idx_si", 2, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // }, + //}, + //{ + // Query: `SHOW KEYS FROM mytaBLE`, + // Expected: []sql.Row{ + // {"mytable", 0, "PRIMARY", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 0, "mytable_s", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "mytable_i_s", 1, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "mytable_i_s", 2, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "idx_si", 1, "s", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // {"mytable", 1, "idx_si", 2, "i", nil, 0, nil, nil, "", "BTREE", "", "", "YES", nil}, + // }, + //}, + //{ + // Query: `SHOW CREATE TABLE mytaBLE`, + // Expected: []sql.Row{ + // {"mytable", "CREATE TABLE `mytable` (\n" + + // " `i` bigint NOT NULL,\n" + + // " `s` varchar(20) NOT NULL COMMENT 'column s',\n" + + // " PRIMARY KEY (`i`),\n" + + // " KEY `idx_si` (`s`,`i`),\n" + + // " KEY `mytable_i_s` (`i`,`s`),\n" + + // " UNIQUE KEY `mytable_s` (`s`)\n" + + // ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}, + // }, + //}, + //{ + // Query: `SHOW CREATE TABLE fk_TBL`, + // Expected: []sql.Row{ + // {"fk_tbl", "CREATE TABLE `fk_tbl` (\n" + + // " `pk` bigint NOT NULL,\n" + + // " `a` bigint,\n" + + // " `b` varchar(20),\n" + + // " PRIMARY KEY (`pk`),\n" + + // " KEY `ab` (`a`,`b`),\n" + + // " CONSTRAINT `fk1` FOREIGN KEY (`a`,`b`) REFERENCES `mytable` (`i`,`s`) ON DELETE CASCADE\n" + + // ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin"}, + // }, + //}, + //{ + // + // Query: "SELECT table_name, `auto_increment` FROM information_schema.tables " + + // "WHERE TABLE_SCHEMA='mydb' AND TABLE_TYPE='BASE TABLE' ORDER BY 1", + // Expected: []sql.Row{ + // {"fk_tbl", nil}, + // {"mytable", nil}, + // }, + //}, + //{ + // Query: "SHOW ENGINES", + // Expected: []sql.Row{ + // {"InnoDB", "DEFAULT", "Supports transactions, row-level locking, and foreign keys", "YES", "YES", "YES"}, + // }, + //}, { Query: "SELECT * FROM information_schema.table_constraints ORDER BY table_name, constraint_type;", Expected: []sql.Row{ - {"def", "mydb", "PRIMARY", "mydb", "auto_increment_tbl", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "bigtable", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "datetime_table", "PRIMARY KEY", "YES"}, {"def", "mydb", "fk1", "mydb", "fk_tbl", "FOREIGN KEY", "YES"}, {"def", "mydb", "PRIMARY", "mydb", "fk_tbl", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "floattable", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "invert_pk", "PRIMARY KEY", "YES"}, {"def", "mydb", "PRIMARY", "mydb", "mytable", "PRIMARY KEY", "YES"}, {"def", "mydb", "mytable_s", "mydb", "mytable", "UNIQUE", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "newlinetable", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "niltable", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "one_pk_three_idx", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "one_pk_two_idx", "PRIMARY KEY", "YES"}, {"def", "foo", "PRIMARY", "foo", "other_table", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "othertable", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "people", "PRIMARY KEY", "YES"}, - {"def", "mydb", "PRIMARY", "mydb", "tabletest", "PRIMARY KEY", "YES"}, }, }, { @@ -7667,28 +7468,11 @@ var InfoSchemaQueries = []QueryTest{ Query: "SELECT * FROM information_schema.key_column_usage ORDER BY constraint_schema, table_name", Expected: []sql.Row{ {"def", "foo", "PRIMARY", "def", "foo", "other_table", "text", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "auto_increment_tbl", "pk", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "bigtable", "t", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "datetime_table", "i", 1, nil, nil, nil, nil}, {"def", "mydb", "PRIMARY", "def", "mydb", "fk_tbl", "pk", 1, nil, nil, nil, nil}, {"def", "mydb", "fk1", "def", "mydb", "fk_tbl", "a", 1, 1, "mydb", "mytable", "i"}, {"def", "mydb", "fk1", "def", "mydb", "fk_tbl", "b", 2, 2, "mydb", "mytable", "s"}, - {"def", "mydb", "PRIMARY", "def", "mydb", "floattable", "i", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "invert_pk", "y", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "invert_pk", "z", 2, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "invert_pk", "x", 3, nil, nil, nil, nil}, {"def", "mydb", "PRIMARY", "def", "mydb", "mytable", "i", 1, nil, nil, nil, nil}, {"def", "mydb", "mytable_s", "def", "mydb", "mytable", "s", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "newlinetable", "i", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "niltable", "i", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "one_pk_three_idx", "pk", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "one_pk_two_idx", "pk", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "othertable", "i2", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "people", "dob", 1, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "people", "first_name", 2, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "people", "last_name", 3, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "people", "middle_name", 4, nil, nil, nil, nil}, - {"def", "mydb", "PRIMARY", "def", "mydb", "tabletest", "i", 1, nil, nil, nil, nil}, }, }, { @@ -7701,22 +7485,19 @@ var InfoSchemaQueries = []QueryTest{ col.column_name, GROUP_CONCAT(kcu.column_name SEPARATOR ',') as pk from information_schema.tables as tbl join information_schema.columns as col - on tbl.table_name = col.table_name + on tbl.table_name = col.table_name join information_schema.key_column_usage as kcu on tbl.table_name = kcu.table_name join information_schema.table_constraints as tc on kcu.constraint_name = tc.constraint_name where tbl.table_schema = 'mydb' and - tbl.table_name = kcu.table_name and - tc.constraint_type = 'PRIMARY KEY' and + tbl.table_name = kcu.table_name and + tc.constraint_type = 'PRIMARY KEY' and col.column_name like 'pk%' group by the_table, col.column_name `, Expected: []sql.Row{ - {"mydb.one_pk_two_idx", "pk", "pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk"}, - {"mydb.one_pk_three_idx", "pk", "pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk"}, - {"mydb.auto_increment_tbl", "pk", "pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk"}, - {"mydb.fk_tbl", "pk", "pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk,pk"}, + {"mydb.fk_tbl", "pk", "pk,pk,pk"}, }, }, { @@ -7963,31 +7744,17 @@ var InfoSchemaQueries = []QueryTest{ } var InfoSchemaScripts = []ScriptTest{ - { - Name: "describe auto_increment table", - SetUpScript: []string{ - "create table auto (pk int primary key auto_increment)", - }, - Assertions: []ScriptTestAssertion{ - { - Query: "describe auto;", - Expected: []sql.Row{ - {"pk", "int", "NO", "PRI", "", "auto_increment"}, - }, - }, - }, - }, { Name: "information_schema.table_constraints ignores non-unique indexes", SetUpScript: []string{ - "CREATE TABLE mytable (pk int primary key, test_score int, height int)", - "CREATE INDEX myindex on mytable(test_score)", + "CREATE TABLE t (pk int primary key, test_score int, height int)", + "CREATE INDEX myindex on t(test_score)", }, Assertions: []ScriptTestAssertion{ { - Query: "SELECT * FROM information_schema.table_constraints where table_name='mytable' ORDER BY constraint_type,constraint_name", + Query: "SELECT * FROM information_schema.table_constraints where table_name='t' ORDER BY constraint_type,constraint_name", Expected: []sql.Row{ - {"def", "mydb", "PRIMARY", "mydb", "mytable", "PRIMARY KEY", "YES"}, + {"def", "mydb", "PRIMARY", "mydb", "t", "PRIMARY KEY", "YES"}, }, }, }, @@ -7995,14 +7762,14 @@ var InfoSchemaScripts = []ScriptTest{ { Name: "information_schema.key_column_usage ignores non-unique indexes", SetUpScript: []string{ - "CREATE TABLE mytable (pk int primary key, test_score int, height int)", - "CREATE INDEX myindex on mytable(test_score)", + "CREATE TABLE t (pk int primary key, test_score int, height int)", + "CREATE INDEX myindex on t(test_score)", }, Assertions: []ScriptTestAssertion{ { - Query: "SELECT * FROM information_schema.key_column_usage where table_name='mytable'", + Query: "SELECT * FROM information_schema.key_column_usage where table_name='t'", Expected: []sql.Row{ - {"def", "mydb", "PRIMARY", "def", "mydb", "mytable", "pk", 1, nil, nil, nil, nil}, + {"def", "mydb", "PRIMARY", "def", "mydb", "t", "pk", 1, nil, nil, nil, nil}, }, }, }, @@ -8058,16 +7825,16 @@ var InfoSchemaScripts = []ScriptTest{ { Name: "information_schema.statistics shows non unique index", SetUpScript: []string{ - "CREATE TABLE mytable (pk int primary key, test_score int, height int)", - "CREATE INDEX myindex on mytable(test_score)", - "INSERT INTO mytable VALUES (2,23,25), (3,24,26)", + "CREATE TABLE t (pk int primary key, test_score int, height int)", + "CREATE INDEX myindex on t(test_score)", + "INSERT INTO t VALUES (2,23,25), (3,24,26)", }, Assertions: []ScriptTestAssertion{ { - Query: "SELECT * FROM information_schema.statistics where table_name='mytable'", + Query: "SELECT * FROM information_schema.statistics where table_name='t'", Expected: []sql.Row{ - {"def", "mydb", "mytable", 1, "mydb", "myindex", 1, "test_score", "A", int64(2), nil, nil, "YES", "BTREE", "", "", "YES", nil}, - {"def", "mydb", "mytable", 0, "mydb", "PRIMARY", 1, "pk", "A", int64(2), nil, nil, "", "BTREE", "", "", "YES", nil}, + {"def", "mydb", "t", 1, "mydb", "myindex", 1, "test_score", "A", int64(2), nil, nil, "YES", "BTREE", "", "", "YES", nil}, + {"def", "mydb", "t", 0, "mydb", "PRIMARY", 1, "pk", "A", int64(2), nil, nil, "", "BTREE", "", "", "YES", nil}, }, }, }, @@ -8075,19 +7842,19 @@ var InfoSchemaScripts = []ScriptTest{ { Name: "information_schema.columns shows default value", SetUpScript: []string{ - "CREATE TABLE mytable (pk int primary key, fname varchar(20), lname varchar(20), height int)", - "ALTER TABLE mytable CHANGE fname fname varchar(20) NOT NULL DEFAULT ''", - "ALTER TABLE mytable CHANGE lname lname varchar(20) NOT NULL DEFAULT 'ln'", - "ALTER TABLE mytable CHANGE height h int DEFAULT NULL", + "CREATE TABLE t (pk int primary key, fname varchar(20), lname varchar(20), height int)", + "ALTER TABLE t CHANGE fname fname varchar(20) NOT NULL DEFAULT ''", + "ALTER TABLE t CHANGE lname lname varchar(20) NOT NULL DEFAULT 'ln'", + "ALTER TABLE t CHANGE height h int DEFAULT NULL", }, Assertions: []ScriptTestAssertion{ { - Query: "SELECT table_name, column_name, column_default, is_nullable FROM information_schema.columns where table_name='mytable'", + Query: "SELECT table_name, column_name, column_default, is_nullable FROM information_schema.columns where table_name='t'", Expected: []sql.Row{ - {"mytable", "pk", nil, "NO"}, - {"mytable", "fname", "", "NO"}, - {"mytable", "lname", "ln", "NO"}, - {"mytable", "h", nil, "YES"}, + {"t", "pk", nil, "NO"}, + {"t", "fname", "", "NO"}, + {"t", "lname", "ln", "NO"}, + {"t", "h", nil, "YES"}, }, }, }, @@ -8140,8 +7907,7 @@ var InfoSchemaScripts = []ScriptTest{ "CREATE PROCEDURE p1() COMMENT 'hi' DETERMINISTIC SELECT 6", "CREATE definer=`user` PROCEDURE p2() SQL SECURITY INVOKER SELECT 7", "CREATE PROCEDURE p21() SQL SECURITY DEFINER SELECT 8", - "CREATE DATABASE somedb", - "USE somedb", + "USE foo", "CREATE PROCEDURE p12() COMMENT 'hello' DETERMINISTIC SELECT 6", }, Assertions: []ScriptTestAssertion{ @@ -8159,7 +7925,7 @@ var InfoSchemaScripts = []ScriptTest{ {"p2", "def", "mydb", "p2", "PROCEDURE", "", nil, nil, nil, nil, nil, nil, nil, "", "SQL", nil, "SQL", "SQL", "", "", nil, "INVOKER", "SQL", "", "`user`@`%`", "utf8mb4", "utf8mb4_0900_bin", "utf8mb4_0900_bin"}, - {"p12", "def", "somedb", "p12", "PROCEDURE", "", nil, nil, nil, nil, nil, nil, nil, "", "SQL", + {"p12", "def", "foo", "p12", "PROCEDURE", "", nil, nil, nil, nil, nil, nil, nil, "", "SQL", nil, "SQL", "SQL", "", "", nil, "DEFINER", "SQL", "hello", "", "utf8mb4", "utf8mb4_0900_bin", "utf8mb4_0900_bin"}, {"p21", "def", "mydb", "p21", "PROCEDURE", "", nil, nil, nil, nil, nil, nil, nil, "", "SQL", @@ -8172,17 +7938,17 @@ var InfoSchemaScripts = []ScriptTest{ { Name: "information_schema.columns", SetUpScript: []string{ - "CREATE DATABASE somedb", - "USE somedb", + "USE foo", + "drop table other_table", "CREATE TABLE t (i int)", "CREATE VIEW v as select * from t", }, Assertions: []ScriptTestAssertion{ { - Query: "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'somedb'", + Query: "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'foo'", Expected: []sql.Row{ - {"def", "somedb", "t", "i", uint64(1), nil, "YES", "int", nil, nil, nil, nil, nil, nil, nil, "int", "", "", "select", "", ""}, - {"def", "somedb", "v", "", uint64(0), nil, nil, nil, nil, nil, nil, nil, nil, "", "", "", "", "", "select", "", ""}, + {"def", "foo", "t", "i", uint64(1), nil, "YES", "int", nil, nil, nil, nil, nil, nil, nil, "int", "", "", "select", "", ""}, + {"def", "foo", "v", "", uint64(0), nil, nil, nil, nil, nil, nil, nil, nil, "", "", "", "", "", "select", "", ""}, }, }, }, @@ -8191,7 +7957,7 @@ var InfoSchemaScripts = []ScriptTest{ var ExplodeQueries = []QueryTest{ { - Query: `SELECT a, EXPLODE(b), c FROM t`, + Query: `SELECT a, EXPLODE(b), c FROM explode`, Expected: []sql.Row{ {int64(1), "a", "first"}, {int64(1), "b", "first"}, @@ -8202,7 +7968,7 @@ var ExplodeQueries = []QueryTest{ }, }, { - Query: `SELECT a, EXPLODE(b) AS x, c FROM t`, + Query: `SELECT a, EXPLODE(b) AS x, c FROM explode`, Expected: []sql.Row{ {int64(1), "a", "first"}, {int64(1), "b", "first"}, @@ -8213,7 +7979,7 @@ var ExplodeQueries = []QueryTest{ }, }, { - Query: `SELECT EXPLODE(SPLIT(c, "")) FROM t LIMIT 5`, + Query: `SELECT EXPLODE(SPLIT(c, "")) FROM explode LIMIT 5`, Expected: []sql.Row{ {"f"}, {"i"}, @@ -8223,7 +7989,7 @@ var ExplodeQueries = []QueryTest{ }, }, { - Query: `SELECT a, EXPLODE(b) AS x, c FROM t WHERE x = 'e'`, + Query: `SELECT a, EXPLODE(b) AS x, c FROM explode WHERE x = 'e'`, Expected: []sql.Row{ {int64(3), "e", "third"}, }, @@ -8243,7 +8009,7 @@ type QueryErrorTest struct { ExpectedErrStr string } -var errorQueries = []QueryErrorTest{ +var ErrorQueries = []QueryErrorTest{ { // Test for: https://github.com/dolthub/dolt/issues/3247 Query: "select * from dual where foo() and true;", @@ -8889,20 +8655,8 @@ var ShowTableStatusQueries = []QueryTest{ { Query: `SHOW TABLE STATUS FROM mydb`, Expected: []sql.Row{ - {"auto_increment_tbl", "InnoDB", "10", "Fixed", uint64(3), uint64(16), uint64(48), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, {"mytable", "InnoDB", "10", "Fixed", uint64(3), uint64(88), uint64(264), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"one_pk_three_idx", "InnoDB", "10", "Fixed", uint64(8), uint64(32), uint64(256), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"one_pk_two_idx", "InnoDB", "10", "Fixed", uint64(8), uint64(24), uint64(192), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, {"othertable", "InnoDB", "10", "Fixed", uint64(3), uint64(65540), uint64(196620), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"tabletest", "InnoDB", "10", "Fixed", uint64(3), uint64(65540), uint64(196620), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"bigtable", "InnoDB", "10", "Fixed", uint64(14), uint64(65540), uint64(917560), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"floattable", "InnoDB", "10", "Fixed", uint64(6), uint64(24), uint64(144), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"fk_tbl", "InnoDB", "10", "Fixed", uint64(3), uint64(96), uint64(288), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"niltable", "InnoDB", "10", "Fixed", uint64(6), uint64(32), uint64(192), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"newlinetable", "InnoDB", "10", "Fixed", uint64(5), uint64(65540), uint64(327700), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"people", "InnoDB", "10", "Fixed", uint64(5), uint64(196620), uint64(983100), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"datetime_table", "InnoDB", "10", "Fixed", uint64(3), uint64(52), uint64(156), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"invert_pk", "InnoDB", "10", "Fixed", uint64(3), uint64(24), uint64(72), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, }, }, { @@ -8910,11 +8664,6 @@ var ShowTableStatusQueries = []QueryTest{ Expected: []sql.Row{ {"mytable", "InnoDB", "10", "Fixed", uint64(3), uint64(88), uint64(264), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, {"othertable", "InnoDB", "10", "Fixed", uint64(3), uint64(65540), uint64(196620), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"bigtable", "InnoDB", "10", "Fixed", uint64(14), uint64(65540), uint64(917560), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"floattable", "InnoDB", "10", "Fixed", uint64(6), uint64(24), uint64(144), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"niltable", "InnoDB", "10", "Fixed", uint64(6), uint64(32), uint64(192), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"newlinetable", "InnoDB", "10", "Fixed", uint64(5), uint64(65540), uint64(327700), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"datetime_table", "InnoDB", "10", "Fixed", uint64(3), uint64(52), uint64(156), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, }, }, { @@ -8932,20 +8681,8 @@ var ShowTableStatusQueries = []QueryTest{ { Query: `SHOW TABLE STATUS`, Expected: []sql.Row{ - {"auto_increment_tbl", "InnoDB", "10", "Fixed", uint64(3), uint64(16), uint64(48), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, {"mytable", "InnoDB", "10", "Fixed", uint64(3), uint64(88), uint64(264), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"one_pk_three_idx", "InnoDB", "10", "Fixed", uint64(8), uint64(32), uint64(256), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"one_pk_two_idx", "InnoDB", "10", "Fixed", uint64(8), uint64(24), uint64(192), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, {"othertable", "InnoDB", "10", "Fixed", uint64(3), uint64(65540), uint64(196620), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"tabletest", "InnoDB", "10", "Fixed", uint64(3), uint64(65540), uint64(196620), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"bigtable", "InnoDB", "10", "Fixed", uint64(14), uint64(65540), uint64(917560), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"floattable", "InnoDB", "10", "Fixed", uint64(6), uint64(24), uint64(144), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"fk_tbl", "InnoDB", "10", "Fixed", uint64(3), uint64(96), uint64(288), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"niltable", "InnoDB", "10", "Fixed", uint64(6), uint64(32), uint64(192), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"newlinetable", "InnoDB", "10", "Fixed", uint64(5), uint64(65540), uint64(327700), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"people", "InnoDB", "10", "Fixed", uint64(5), uint64(196620), uint64(983100), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"datetime_table", "InnoDB", "10", "Fixed", uint64(3), uint64(52), uint64(156), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, - {"invert_pk", "InnoDB", "10", "Fixed", uint64(3), uint64(24), uint64(72), uint64(0), int64(0), int64(0), nil, nil, nil, nil, "utf8mb4_0900_bin", nil, nil, nil}, }, }, { diff --git a/enginetest/query_plans.go b/enginetest/queries/query_plans.go similarity index 99% rename from enginetest/query_plans.go rename to enginetest/queries/query_plans.go index 723ad98d34..94fc977632 100644 --- a/enginetest/query_plans.go +++ b/enginetest/queries/query_plans.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries type QueryPlanTest struct { Query string @@ -2347,8 +2347,6 @@ var PlanTests = []QueryPlanTest{ }, } -var ScriptQueryPlanTest = []ScriptTest{} - // Queries where the query planner produces a correct (results) but suboptimal plan. var QueryPlanTODOs = []QueryPlanTest{ { diff --git a/enginetest/replace_queries.go b/enginetest/queries/replace_queries.go similarity index 99% rename from enginetest/replace_queries.go rename to enginetest/queries/replace_queries.go index 450deccbf6..dbd645ce8e 100644 --- a/enginetest/replace_queries.go +++ b/enginetest/queries/replace_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "math" diff --git a/enginetest/script_queries.go b/enginetest/queries/script_queries.go similarity index 99% rename from enginetest/script_queries.go rename to enginetest/queries/script_queries.go index 9c4083b20c..f0f69e4fe9 100644 --- a/enginetest/script_queries.go +++ b/enginetest/queries/script_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "gopkg.in/src-d/go-errors.v1" @@ -63,6 +63,9 @@ type ScriptTestAssertion struct { // SkipResultsCheck is used to skip assertions on expected Rows returned from a query. This should be used // sparingly, such as in cases where you only want to test warning messages. SkipResultsCheck bool + + // Bindings are variable mappings only used for prepared tests + Bindings map[string]sql.Expression } // ScriptTests are a set of test scripts to run. @@ -716,6 +719,10 @@ var ScriptTests = []ScriptTest{ "insert into b values (1), (2), (3), (4)", }, Assertions: []ScriptTestAssertion{ + { + Query: "select * from b where x < 2", + Expected: []sql.Row{{1}}, + }, { Query: "select found_rows()", Expected: []sql.Row{{1}}, @@ -2135,6 +2142,19 @@ var SpatialScriptTests = []ScriptTest{ }, }, }, + { + Name: "create table with NULL default values for geometry types", + SetUpScript: []string{ + "CREATE TABLE null_default (pk int NOT NULL PRIMARY KEY, v1 geometry DEFAULT NULL, v2 linestring DEFAULT NULL, v3 point DEFAULT NULL, v4 polygon DEFAULT NULL)", + "insert into null_default(pk) values (0)", + }, + Assertions: []ScriptTestAssertion{ + { + Query: "select * from null_default", + Expected: []sql.Row{{0, nil, nil, nil, nil}}, + }, + }, + }, } var CreateCheckConstraintsScripts = []ScriptTest{ diff --git a/enginetest/transaction_queries.go b/enginetest/queries/transaction_queries.go similarity index 99% rename from enginetest/transaction_queries.go rename to enginetest/queries/transaction_queries.go index ce750c3a02..f2427f61df 100755 --- a/enginetest/transaction_queries.go +++ b/enginetest/queries/transaction_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "github.com/dolthub/go-mysql-server/sql" diff --git a/enginetest/trigger_queries.go b/enginetest/queries/trigger_queries.go similarity index 99% rename from enginetest/trigger_queries.go rename to enginetest/queries/trigger_queries.go index e46efb5071..ff872fbb4b 100644 --- a/enginetest/trigger_queries.go +++ b/enginetest/queries/trigger_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "time" @@ -454,29 +454,28 @@ var TriggerTests = []ScriptTest{ { Name: "Create a trigger on a new database and verify that the trigger works when selected on another database", SetUpScript: []string{ - "create database test", - "create table test.a (x int primary key)", - "create table test.b (y int primary key)", - "use test", - "create trigger insert_into_b after insert on test.a for each row insert into test.b values (new.x + 1)", + "create table foo.a (x int primary key)", + "create table foo.b (y int primary key)", + "use foo", + "create trigger insert_into_b after insert on foo.a for each row insert into foo.b values (new.x + 1)", "use mydb", - "insert into test.a values (1), (3), (5)", + "insert into foo.a values (1), (3), (5)", }, Assertions: []ScriptTestAssertion{ { - Query: "select x from test.a order by 1", + Query: "select x from foo.a order by 1", Expected: []sql.Row{ {1}, {3}, {5}, }, }, { - Query: "select y from test.b order by 1", + Query: "select y from foo.b order by 1", Expected: []sql.Row{ {2}, {4}, {6}, }, }, { - Query: "insert into test.a values (7), (9)", + Query: "insert into foo.a values (7), (9)", Expected: []sql.Row{ {sql.OkResult{RowsAffected: 2}}, }, @@ -2736,25 +2735,24 @@ var BrokenTriggerQueries = []ScriptTest{ { Name: "trigger after update, delete from other table", SetUpScript: []string{ - "create database test", - "create table test.a (x int primary key)", - "create table test.b (y int primary key)", - "insert into test.a values (0), (2), (4), (6), (8)", - "insert into test.b values (1), (3), (5), (7), (9)", - "use test", + "create table foo.a (x int primary key)", + "create table foo.b (y int primary key)", + "insert into foo.a values (0), (2), (4), (6), (8)", + "insert into foo.b values (1), (3), (5), (7), (9)", + "use foo", "create trigger insert_into_b after update on a for each row insert into b values (old.x + new.x + 1)", "use mydb", - "update test.a set x = x + 1 where x in (2,4)", + "update foo.a set x = x + 1 where x in (2,4)", }, Assertions: []ScriptTestAssertion{ { - Query: "select x from test.a order by 1", + Query: "select x from foo.a order by 1", Expected: []sql.Row{ {0}, {3}, {5}, {6}, {8}, }, }, { - Query: "select y from test.b order by 1", + Query: "select y from foo.b order by 1", Expected: []sql.Row{ {1}, {3}, {7}, }, diff --git a/enginetest/update_queries.go b/enginetest/queries/update_queries.go similarity index 99% rename from enginetest/update_queries.go rename to enginetest/queries/update_queries.go index 02b3d008cf..334c43eb23 100644 --- a/enginetest/update_queries.go +++ b/enginetest/queries/update_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "github.com/dolthub/go-mysql-server/sql" diff --git a/enginetest/variable_queries.go b/enginetest/queries/variable_queries.go similarity index 99% rename from enginetest/variable_queries.go rename to enginetest/queries/variable_queries.go index caebbc9a4b..f16a9dded5 100644 --- a/enginetest/variable_queries.go +++ b/enginetest/queries/variable_queries.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package enginetest +package queries import ( "math" diff --git a/enginetest/scriptgen/cmd/scriptgen/main.go b/enginetest/scriptgen/cmd/scriptgen/main.go new file mode 100644 index 0000000000..b5cdf0bc25 --- /dev/null +++ b/enginetest/scriptgen/cmd/scriptgen/main.go @@ -0,0 +1,164 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "bytes" + "errors" + "flag" + "fmt" + "go/format" + "io" + "io/fs" + "log" + "os" + "path/filepath" + "strings" + + "github.com/dolthub/go-mysql-server/enginetest/scriptgen/setup" +) + +var ( + errInvalidArgCount = errors.New("invalid number of arguments") + errUnrecognizedCommand = errors.New("unrecognized command") +) + +var ( + pkg = flag.String("pkg", "queries", "package name used in generated files") + out = flag.String("out", "", "output file name of generated code") +) + +const useGoFmt = true + +func main() { + flag.Usage = usage + flag.Parse() + + args := flag.Args() + if len(args) < 2 { + flag.Usage() + exit(errInvalidArgCount) + } + + cmd := args[0] + switch cmd { + case "setup": + + default: + flag.Usage() + exit(errUnrecognizedCommand) + } + + var buf bytes.Buffer + buf.WriteString("// Code generated by scriptgen; DO NOT EDIT.\n\n") + fmt.Fprintf(&buf, " package %s\n\n", *pkg) + + var err error + switch cmd { + case "setup": + err = generateSetup(args[1], &buf) + } + + toFile(buf, *out) + if err != nil { + exit(err) + } +} + +// usage is a replacement usage function for the flags package. +func usage() { + fmt.Fprintf(os.Stderr, "Scriptgen is a tool for generating optimizer code.\n\n") + fmt.Fprintf(os.Stderr, "Usage:\n") + + fmt.Fprintf(os.Stderr, "\tscriptgen command [flags] sources...\n\n") + + fmt.Fprintf(os.Stderr, "The commands are:\n\n") + fmt.Fprintf(os.Stderr, "\taggs generates aggregation definitions and functions\n") + fmt.Fprintf(os.Stderr, "\n") + + fmt.Fprintf(os.Stderr, "Flags:\n") + + flag.PrintDefaults() + + fmt.Fprintf(os.Stderr, "\n") +} + +func exit(err error) { + fmt.Fprintf(os.Stderr, "ERROR: %v\n", err) + os.Exit(2) +} + +func generateSetup(setupDir string, buf *bytes.Buffer) error { + return filepath.WalkDir(setupDir, func(path string, d fs.DirEntry, err error) error { + if d.IsDir() { + return nil + } + name := strings.Title(strings.TrimSuffix(d.Name(), ".txt")) + fmt.Fprintf(buf, "var %sData = []SetupScript{{\n", name) + + s, err := setup.NewFileSetup(path) + if err != nil { + log.Fatal(err) + } + for { + _, err := s.Next() + if errors.Is(err, io.EOF) { + break + } else if err != nil { + log.Fatal(err) + } + + hasBacktick := strings.Contains(s.Data().Sql, "`") + if hasBacktick { + fmt.Fprintf(buf, " \"%s\",\n", s.Data().Sql) + } else { + fmt.Fprintf(buf, " `%s`,\n", s.Data().Sql) + } + } + fmt.Fprintf(buf, "}}\n\n") + return nil + }) +} + +func toFile(buf bytes.Buffer, out string) error { + var w io.Writer + if out != "" { + file, err := os.Create(out) + if err != nil { + exit(err) + } + + defer file.Close() + w = file + } else { + w = os.Stderr + } + + var b []byte + var err error + + if useGoFmt { + b, err = format.Source(buf.Bytes()) + if err != nil { + // Write out incorrect source for easier debugging. + b = buf.Bytes() + } + } else { + b = buf.Bytes() + } + + w.Write(b) + return err +} diff --git a/enginetest/scriptgen/setup/helper.go b/enginetest/scriptgen/setup/helper.go new file mode 100644 index 0000000000..3dace2bdaf --- /dev/null +++ b/enginetest/scriptgen/setup/helper.go @@ -0,0 +1,87 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package setup + +var ( + Mytable [][]SetupScript + KeylessSetup [][]SetupScript + VersionedSetup [][]SetupScript + SpecialSetup [][]SetupScript + SimpleSetup [][]SetupScript + OrdinalSetup [][]SetupScript + SpatialSetup [][]SetupScript + JsonSetup [][]SetupScript + FooSetup [][]SetupScript + GraphSetup [][]SetupScript + ReservedSetup [][]SetupScript + ChecksSetup [][]SetupScript + NullsSetup [][]SetupScript + ComplexIndexSetup [][]SetupScript + LoadDataSetup [][]SetupScript +) + +func init() { + KeylessSetup = [][]SetupScript{MydbData, KeylessData} + VersionedSetup = [][]SetupScript{MydbData, MyhistorytableData} + SpecialSetup = [][]SetupScript{ + MydbData, + AutoincrementData, + BigtableData, + DatetimetableData, + EmptytableData, + Fk_tblData, + FloattableData, + NewlinetableData, + NiltableData, + OthertableData, + SpecialtableData, + StringandtableData, + TabletestData, + TypestableData, + PeopleData, + Reserved_keywordsData, + } + OrdinalSetup = [][]SetupScript{MydbData, Invert_pkData, Ordinals_ddlData} + FooSetup = [][]SetupScript{MydbData, FooData} + JsonSetup = [][]SetupScript{MydbData, JsontableData} + SpatialSetup = [][]SetupScript{MydbData, SpatialData} + PksSetup := [][]SetupScript{MydbData, Pk_tablesData} + GraphSetup = [][]SetupScript{MydbData, Graph_tablesData} + ReservedSetup = [][]SetupScript{MydbData, Reserved_keywordsData} + Mytable = [][]SetupScript{MydbData, MytableData} + ChecksSetup = [][]SetupScript{MydbData, Check_constraintData} + NullsSetup = [][]SetupScript{MydbData, Null_rangesData} + ComplexIndexSetup = [][]SetupScript{MydbData, Comp_index_tablesData} + LoadDataSetup = [][]SetupScript{MydbData, LoadtableData} + SimpleSetup = concatenateSetupSources( + Mytable, + SpecialSetup, + PksSetup, + OrdinalSetup, + JsonSetup, + VersionedSetup, + KeylessSetup, + FooSetup, + GraphSetup, + ) +} + +func concatenateSetupSources(in ...[][]SetupScript) [][]SetupScript { + out := make([][]SetupScript, 0) + for i := range in { + out = append(out, in[i]...) + } + return out +} diff --git a/enginetest/scriptgen/setup/main.go b/enginetest/scriptgen/setup/main.go new file mode 100644 index 0000000000..5078eae058 --- /dev/null +++ b/enginetest/scriptgen/setup/main.go @@ -0,0 +1,207 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package setup + +import ( + "bufio" + "bytes" + "fmt" + "io" + "os" + "strings" + + ast "github.com/dolthub/vitess/go/vt/sqlparser" +) + +//go:generate go run ../cmd/scriptgen/main.go -out setup_data.sg.go -pkg setup setup scripts + +type setupSource interface { + Next() (bool, error) + Close() error + Data() Testdata +} + +type Testdata struct { + pos string // file and line number + cmd string // exec, query, ... + Sql string + stmt ast.Statement + expected string +} + +type SetupScript []string + +type fileSetup struct { + path string + file *os.File + scanner *lineScanner + data Testdata + rewrite *bytes.Buffer +} + +func NewFileSetup(path string) (*fileSetup, error) { + file, err := os.Open(path) + if err != nil { + return nil, err + } + return &fileSetup{ + path: path, + file: file, + scanner: newLineScanner(file), + rewrite: &bytes.Buffer{}, + }, nil +} + +var _ setupSource = (*fileSetup)(nil) + +func (f *fileSetup) Data() Testdata { + return f.data +} + +func (f *fileSetup) Next() (bool, error) { + f.data = Testdata{} + for f.scanner.Scan() { + line := f.scanner.Text() + f.emit(line) + + fields := strings.Fields(line) + if len(fields) == 0 { + continue + } + cmd := fields[0] + if strings.HasPrefix(cmd, "#") { + // Skip comment lines. + continue + } + f.data.pos = fmt.Sprintf("%s:%d", f.path, f.scanner.line) + f.data.cmd = cmd + + var buf bytes.Buffer + var separator bool + for f.scanner.Scan() { + line := f.scanner.Text() + if strings.TrimSpace(line) == "" { + break + } + + f.emit(line) + if line == "----" { + separator = true + break + } + buf.WriteString(line) + } + + f.data.Sql = strings.TrimSpace(buf.String()) + stmt, err := ast.Parse(f.data.Sql) + if err != nil { + return false, err + } + f.data.stmt = stmt + + if separator { + buf.Reset() + for f.scanner.Scan() { + line := f.scanner.Text() + if strings.TrimSpace(line) == "" { + break + } + fmt.Fprintln(&buf, line) + } + f.data.expected = buf.String() + } + return true, nil + } + return false, io.EOF +} + +func (f *fileSetup) emit(s string) { + if f.rewrite != nil { + f.rewrite.WriteString(s) + f.rewrite.WriteString("\n") + } +} + +func (f *fileSetup) Close() error { + return f.file.Close() +} + +type lineScanner struct { + *bufio.Scanner + line int +} + +func newLineScanner(r io.Reader) *lineScanner { + return &lineScanner{ + Scanner: bufio.NewScanner(r), + line: 0, + } +} + +func (l *lineScanner) Scan() bool { + ok := l.Scanner.Scan() + if ok { + l.line++ + } + return ok +} + +type stringSetup struct { + setup []string + pos int + data Testdata +} + +var _ setupSource = (*stringSetup)(nil) + +func NewStringSetup(s ...string) []setupSource { + return []setupSource{ + stringSetup{ + setup: s, + pos: 0, + data: Testdata{}, + }, + } +} + +func (s stringSetup) Next() (bool, error) { + if s.pos > len(s.setup) { + return false, io.EOF + } + + stmt, err := ast.Parse(s.setup[s.pos]) + if err != nil { + return false, err + } + + d := Testdata{ + pos: fmt.Sprintf("line %d, query: '%s'", s.pos, s.setup[s.pos]), + cmd: "exec", + Sql: s.setup[s.pos], + stmt: stmt, + } + s.data = d + s.pos++ + return true, nil +} + +func (s stringSetup) Close() error { + s.setup = nil + return nil +} + +func (s stringSetup) Data() Testdata { + return s.data +} diff --git a/enginetest/scriptgen/setup/main_test.go b/enginetest/scriptgen/setup/main_test.go new file mode 100644 index 0000000000..58d0842f75 --- /dev/null +++ b/enginetest/scriptgen/setup/main_test.go @@ -0,0 +1,46 @@ +// Copyright 2022 Dolthub, 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package setup + +import ( + "io" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestFileSourceScanner(t *testing.T) { + s, err := NewFileSetup("scripts/mydb") + if err != nil { + t.Fatal(err) + } + out := make([]string, 0) + for { + ok, err := s.Next() + if err == io.EOF || !ok { + break + } + if err != nil { + t.Fatal(err) + } + out = append(out, s.data.Sql) + } + + exp := []string{ + "create database if not exists mydb", + "use mydb", + } + require.Equal(t, exp, out) +} diff --git a/enginetest/scriptgen/setup/scripts/autoincrement b/enginetest/scriptgen/setup/scripts/autoincrement new file mode 100644 index 0000000000..91824a0e40 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/autoincrement @@ -0,0 +1,18 @@ +exec +drop table if exists auto_increment_tbl +---- + +exec +CREATE TABLE `auto_increment_tbl` ( + `pk` bigint NOT NULL AUTO_INCREMENT, + `c0` bigint, + PRIMARY KEY (`pk`) +) +---- + +exec +INSERT INTO auto_increment_tbl values + (1, 11), + (2, 22), + (3, 33) +---- diff --git a/enginetest/scriptgen/setup/scripts/bigtable b/enginetest/scriptgen/setup/scripts/bigtable new file mode 100644 index 0000000000..155a4330b3 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/bigtable @@ -0,0 +1,21 @@ +exec +create table bigtable (t text primary key, n bigint) +---- + +exec +insert into bigtable values + ('a', 1), + ('s', 2), + ('f', 3), + ('g', 1), + ('h', 2), + ('j', 3), + ('k', 1), + ('l', 2), + ('ñ', 4), + ('z', 5), + ('x', 6), + ('c', 7), + ('v', 8), + ('b', 9) +---- diff --git a/enginetest/scriptgen/setup/scripts/check_constraint b/enginetest/scriptgen/setup/scripts/check_constraint new file mode 100644 index 0000000000..df14ea76ad --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/check_constraint @@ -0,0 +1,19 @@ +exec +CREATE TABLE checks (a INTEGER PRIMARY KEY, b INTEGER, c varchar(20)) +---- + +exec +ALTER TABLE checks ADD CONSTRAINT chk1 CHECK (B > 0) +---- + +exec +ALTER TABLE checks ADD CONSTRAINT chk2 CHECK (b > 0) NOT ENFORCED +---- + +exec +ALTER TABLE checks ADD CONSTRAINT chk3 CHECK (B > 1) +---- + +exec +ALTER TABLE checks ADD CONSTRAINT chk4 CHECK (upper(C) = c) +---- diff --git a/enginetest/scriptgen/setup/scripts/comp_index_tables b/enginetest/scriptgen/setup/scripts/comp_index_tables new file mode 100644 index 0000000000..bfde658b88 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/comp_index_tables @@ -0,0 +1,70 @@ +exec +CREATE TABLE comp_index_t0 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT) +---- + +exec +create INDEX v_idx on comp_index_t0 (v1, v2) +---- + +exec +INSERT INTO comp_index_t0 VALUES (0,0,48),(1,0,52),(2,2,4),(3,2,10),(4,3,35),(5,5,36),(6,5,60),(7,6,1),(8,6,51), +(9,6,60),(10,6,73),(11,9,44),(12,9,97),(13,13,44),(14,14,53),(15,14,57),(16,14,98),(17,16,19),(18,16,53),(19,16,95), +(20,18,31),(21,19,48),(22,19,75),(23,19,97),(24,24,60),(25,25,14),(26,25,31),(27,27,9),(28,27,24),(29,28,24),(30,28,83), +(31,31,14),(32,33,39),(33,34,22),(34,34,91),(35,35,89),(36,38,20),(37,38,66),(38,39,55),(39,39,86),(40,40,97),(41,42,0), +(42,42,82),(43,43,63),(44,44,48),(45,44,67),(46,45,22),(47,45,31),(48,45,63),(49,45,86),(50,46,46),(51,47,5),(52,48,22), +(53,49,0),(54,50,0),(55,50,14),(56,51,35),(57,54,38),(58,56,0),(59,56,60),(60,57,29),(61,57,49),(62,58,12),(63,58,32), +(64,59,29),(65,59,45),(66,59,54),(67,60,66),(68,61,3),(69,61,34),(70,63,19),(71,63,69),(72,65,80),(73,65,97),(74,67,95), +(75,68,11),(76,69,34),(77,72,52),(78,74,81),(79,76,39),(80,78,0),(81,78,90),(82,79,36),(83,80,61),(84,80,88),(85,81,4), +(86,82,16),(87,83,30),(88,83,74),(89,84,9),(90,84,45),(91,86,56),(92,86,88),(93,87,51),(94,89,3),(95,93,19),(96,93,21), +(97,93,96),(98,98,0),(99,98,51),(100,98,61); +---- + +exec +CREATE TABLE comp_index_t1 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT) +---- + +exec +create INDEX v_idx on comp_index_t1 (v1, v2, v3) +---- + +exec +INSERT INTO comp_index_t1 VALUES (0,0,3,16),(1,2,65,9),(2,3,38,37),(3,3,99,99),(4,5,17,42),(5,6,6,76),(6,6,81,33), +(7,7,33,51),(8,7,37,42),(9,8,9,21),(10,8,37,90),(11,9,39,20),(12,9,71,82),(13,10,16,21),(14,10,32,46),(15,10,47,36), +(16,12,44,84),(17,12,66,40),(18,13,47,30),(19,13,56,41),(20,14,38,24),(21,14,91,1),(22,15,2,69),(23,16,40,36), +(24,20,29,93),(25,21,9,89),(26,21,42,76),(27,23,13,53),(28,23,28,68),(29,23,28,90),(30,23,30,44),(31,24,20,8), +(32,25,49,88),(33,26,15,28),(34,27,35,12),(35,28,39,84),(36,29,7,38),(37,29,21,74),(38,29,27,48),(39,29,77,46), +(40,31,47,21),(41,31,47,91),(42,32,40,76),(43,33,70,50),(44,34,27,58),(45,35,32,36),(46,36,4,36),(47,36,84,75), +(48,37,27,32),(49,38,88,68),(50,41,17,68),(51,41,77,26),(52,42,80,85),(53,45,1,57),(54,46,58,8),(55,49,26,11), +(56,50,49,20),(57,50,86,6),(58,54,13,78),(59,54,57,83),(60,55,45,46),(61,55,81,80),(62,56,0,97),(63,56,8,78), +(64,56,58,4),(65,56,66,33),(66,57,7,52),(67,59,77,53),(68,60,8,70),(69,61,11,25),(70,63,85,23),(71,65,17,9), +(72,66,46,46),(73,66,73,4),(74,67,55,27),(75,70,8,54),(76,70,58,33),(77,71,39,15),(78,72,65,64),(79,74,78,26), +(80,75,91,35),(81,76,40,52),(82,76,44,87),(83,81,32,4),(84,82,11,6),(85,82,46,32),(86,84,40,8),(87,84,93,37), +(88,85,53,50),(89,86,63,79),(90,87,22,34),(91,87,57,62),(92,88,88,42),(93,90,30,67),(94,91,15,15),(95,93,7,26), +(96,94,92,38),(97,95,89,66),(98,97,63,19),(99,98,31,21),(100,98,42,22) +---- + +exec +CREATE TABLE comp_index_t2 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT, v4 BIGINT) +---- + +exec +create INDEX v_idx on comp_index_t2 (v1, v2, v3, v4) +---- + +exec +INSERT INTO comp_index_t2 VALUES (0,0,33,2,67),(1,0,55,14,32),(2,1,43,13,36),(3,1,72,29,21),(4,2,27,1,75), +(5,3,31,22,81),(6,4,6,67,80),(7,4,10,53,69),(8,4,27,77,5),(9,5,17,52,13),(10,5,32,30,48),(11,5,76,70,46),(12,7,7,66,62), +(13,7,21,75,70),(14,7,76,26,47),(15,8,54,46,87),(16,8,99,43,1),(17,9,7,74,92),(18,9,19,38,35),(19,10,36,27,5), +(20,12,0,33,62),(21,12,42,15,31),(22,12,46,43,23),(23,15,42,17,60),(24,17,49,14,7),(25,17,75,86,18),(26,20,30,34,71), +(27,21,21,32,8),(28,22,21,28,78),(29,22,98,22,21),(30,23,43,13,11),(31,24,26,69,25),(32,24,45,96,0),(33,29,72,97,93), +(34,32,16,97,29),(35,33,29,69,6),(36,33,53,56,88),(37,33,86,12,22),(38,34,55,37,34),(39,34,87,13,51),(40,34,89,27,90), +(41,35,6,86,74),(42,36,7,40,16),(43,37,35,6,44),(44,37,41,36,10),(45,38,71,22,37),(46,39,45,75,55),(47,41,1,85,9), +(48,41,21,82,54),(49,43,23,15,0),(50,43,66,85,66),(51,45,9,76,9),(52,47,94,56,21),(53,48,3,11,18),(54,50,26,23,71), +(55,50,36,73,58),(56,50,39,26,37),(57,50,79,10,12),(58,50,97,0,79),(59,51,97,39,36),(60,52,72,44,2),(61,53,6,53,89), +(62,53,48,19,36),(63,55,31,29,92),(64,57,25,97,65),(65,63,50,20,43),(66,64,23,33,5),(67,64,26,77,97),(68,64,41,74,85), +(69,64,77,41,17),(70,66,97,6,39),(71,67,39,87,15),(72,69,81,70,37),(73,70,40,19,5),(74,70,56,21,22),(75,71,3,49,55), +(76,71,48,89,99),(77,73,10,2,0),(78,73,91,56,0),(79,74,22,42,16),(80,74,35,72,97),(81,76,74,97,18),(82,82,29,66,71), +(83,82,31,22,99),(84,82,70,5,47),(85,83,37,36,16),(86,83,41,53,57),(87,84,56,78,18),(88,85,2,3,88),(89,86,7,57,96), +(90,87,23,16,63),(91,87,66,8,22),(92,88,57,12,88),(93,89,1,27,50),(94,89,91,7,45),(95,90,25,0,17),(96,91,23,2,9), +(97,93,56,71,53),(98,94,43,71,43),(99,94,79,53,73),(100,96,73,38,38) +---- diff --git a/enginetest/scriptgen/setup/scripts/datetimetable b/enginetest/scriptgen/setup/scripts/datetimetable new file mode 100644 index 0000000000..90f153e9eb --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/datetimetable @@ -0,0 +1,29 @@ +exec +CREATE TABLE `datetime_table` ( + `i` bigint NOT NULL, + `date_col` date, + `datetime_col` datetime, + `timestamp_col` timestamp, + `time_col` time(6), + PRIMARY KEY (`i`) +) +---- + +exec +insert into datetime_table values + (1, '2019-12-31T12:00:00Z', '2020-01-01T12:00:00Z', '2020-01-02T12:00:00Z', '03:10:0'), + (2, '2020-01-03T12:00:00Z', '2020-01-04T12:00:00Z', '2020-01-05T12:00:00Z', '04:00:44'), + (3, '2020-01-07T00:00:00Z', '2020-01-07T12:00:00Z', '2020-01-07T12:00:01Z', '15:00:00.005000') +---- + +exec +create index datetime_table_d on datetime_table (date_col) +---- + +exec +create index datetime_table_dt on datetime_table (datetime_col) +---- + +exec +create index datetime_table_ts on datetime_table (timestamp_col) +---- diff --git a/enginetest/scriptgen/setup/scripts/emptytable b/enginetest/scriptgen/setup/scripts/emptytable new file mode 100644 index 0000000000..ca223cb7d6 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/emptytable @@ -0,0 +1,3 @@ +exec +create table emptytable (i mediumint primary key, s text) +---- diff --git a/enginetest/scriptgen/setup/scripts/explode b/enginetest/scriptgen/setup/scripts/explode new file mode 100644 index 0000000000..fa00489e7d --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/explode @@ -0,0 +1,10 @@ +exec +create table explode (a bigint, b JSON, c text) +---- + +exec +insert into explode values + (1, '["a", "b"]', 'first'), + (2, '["c", "d"]', 'second'), + (3, '["e", "f"]', 'third') +---- diff --git a/enginetest/scriptgen/setup/scripts/fk_tbl b/enginetest/scriptgen/setup/scripts/fk_tbl new file mode 100644 index 0000000000..9c1015630d --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/fk_tbl @@ -0,0 +1,12 @@ +exec +CREATE TABLE `fk_tbl` ( + `pk` bigint NOT NULL, + `a` bigint, + `b` varchar(20), + PRIMARY KEY (`pk`) +) +---- + +exec +ALTER TABLE fk_tbl ADD CONSTRAINT fk1 FOREIGN KEY (a,b) REFERENCES mytable (i,s) ON DELETE CASCADE +---- diff --git a/enginetest/scriptgen/setup/scripts/floattable b/enginetest/scriptgen/setup/scripts/floattable new file mode 100644 index 0000000000..0219d4d6e5 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/floattable @@ -0,0 +1,22 @@ +exec +CREATE TABLE `floattable` ( + `i` bigint NOT NULL, + `f32` float NOT NULL, + `f64` double NOT NULL, + PRIMARY KEY (`i`) +) +---- + +exec +insert into floattable values + (1, 1.0, 1.0), + (2, 1.5, 1.5), + (3, 2.0, 2.0), + (4, 2.5, 2.5), + (-1, -1.0, -1.0), + (-2, -1.5, -1.5) +---- + +exec +create index floattable_f on floattable (f64) +---- diff --git a/enginetest/scriptgen/setup/scripts/foo b/enginetest/scriptgen/setup/scripts/foo new file mode 100644 index 0000000000..06d88ac508 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/foo @@ -0,0 +1,14 @@ +exec +create database if not exists foo +---- + +exec +create table foo.other_table (text text primary key, number mediumint) +---- + +exec +insert into foo.other_table values + ('a', 4), + ('b', 2), + ('c', 0) +---- diff --git a/enginetest/scriptgen/setup/scripts/graph_tables b/enginetest/scriptgen/setup/scripts/graph_tables new file mode 100644 index 0000000000..9bfb7f1caf --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/graph_tables @@ -0,0 +1,39 @@ +exec +CREATE TABLE `bus_routes` ( + `origin` text NOT NULL, + `dst` text NOT NULL, + PRIMARY KEY (`origin`,`dst`) +) +---- + +exec +insert into bus_routes values + ('New York', 'Boston'), + ('Boston', 'New York'), + ('New York', 'Washington'), + ('Washington', 'Boston'), + ('Washington', 'Raleigh') +---- + +exec +CREATE TABLE `parts` ( + `part` text NOT NULL, + `sub_part` text NOT NULL, + `quantity` bigint NOT NULL, + PRIMARY KEY (`part`,`sub_part`) +) +---- + +exec +insert into parts values + ('pie', 'crust', 1), + ('pie', 'filling', 2), + ('crust', 'flour', 20), + ('crust', 'sugar', 2), + ('crust', 'butter', 15), + ('crust', 'salt', 15), + ('filling', 'sugar', 5), + ('filling', 'fruit', 9), + ('filling', 'salt', 3), + ('filling', 'butter', 3) +---- diff --git a/enginetest/scriptgen/setup/scripts/invert_pk b/enginetest/scriptgen/setup/scripts/invert_pk new file mode 100644 index 0000000000..68fb32f10a --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/invert_pk @@ -0,0 +1,16 @@ + +exec +CREATE TABLE `invert_pk` ( + `x` bigint NOT NULL, + `y` bigint NOT NULL, + `z` bigint NOT NULL, + PRIMARY KEY (`y`,`z`,`x`) +) +---- + +exec +insert into invert_pk values + (0, 2, 2), + (1, 1, 0), + (2, 0, 1) +---- diff --git a/enginetest/scriptgen/setup/scripts/jsontable b/enginetest/scriptgen/setup/scripts/jsontable new file mode 100644 index 0000000000..8175466141 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/jsontable @@ -0,0 +1,11 @@ +exec +create table jsontable (pk smallint primary key, c1 text, c2 JSON, c3 JSON) +---- + +exec +insert into jsontable values + (1, 'row one', '[1,2]', '{"a": 2}'), + (2, 'row two', '[3,4]', '{"b": 2}'), + (3, 'row three', '[5,6]', '{"c": 2}'), + (4, 'row four', '[7,8]', '{"d": 2}') +---- diff --git a/enginetest/scriptgen/setup/scripts/keyless b/enginetest/scriptgen/setup/scripts/keyless new file mode 100644 index 0000000000..79d666070c --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/keyless @@ -0,0 +1,29 @@ + +exec +CREATE TABLE `unique_keyless` ( + `c0` bigint, + `c1` bigint +) +---- + +exec +insert into unique_keyless values + (0,0), + (1,1), + (2,2) +---- + +exec +CREATE TABLE `keyless` ( + `c0` bigint, + `c1` bigint +) +---- + +exec +insert into keyless values + (0,0), + (1,1), + (1,1), + (2,2) +---- diff --git a/enginetest/scriptgen/setup/scripts/loadtable b/enginetest/scriptgen/setup/scripts/loadtable new file mode 100644 index 0000000000..ad424e4c18 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/loadtable @@ -0,0 +1,3 @@ +exec +create table loadtable(pk int primary key) +---- diff --git a/enginetest/scriptgen/setup/scripts/mydb b/enginetest/scriptgen/setup/scripts/mydb new file mode 100644 index 0000000000..e65c37cadb --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/mydb @@ -0,0 +1,7 @@ +exec +create database if not exists mydb +---- + +exec +use mydb +---- diff --git a/enginetest/scriptgen/setup/scripts/myhistorytable b/enginetest/scriptgen/setup/scripts/myhistorytable new file mode 100644 index 0000000000..f5419c55ab --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/myhistorytable @@ -0,0 +1,13 @@ +exec +CREATE TABLE `myhistorytable` ( + `i` bigint NOT NULL, + `s` text NOT NULL, + `c` text NOT NULL, + PRIMARY KEY (`i`) +) +---- + +# TODO add history rows, and version the table +# exec +# insert into myhistorytable values +#---- diff --git a/enginetest/scriptgen/setup/scripts/mytable b/enginetest/scriptgen/setup/scripts/mytable new file mode 100644 index 0000000000..6941fd5102 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/mytable @@ -0,0 +1,22 @@ +exec +create table mytable (i bigint primary key, s varchar(20) comment 'column s' NOT NULL) +---- + +exec +insert into mytable values + (1, 'first row'), + (2, 'second row'), + (3, 'third row') +---- + +exec +create unique index mytable_s on mytable (s) +---- + +exec +create index mytable_i_s on mytable (i,s) +---- + +exec +create index `idx_si` on mytable (`s`,`i`) +---- diff --git a/enginetest/scriptgen/setup/scripts/mytable_del_idx b/enginetest/scriptgen/setup/scripts/mytable_del_idx new file mode 100644 index 0000000000..c386ac6d90 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/mytable_del_idx @@ -0,0 +1,11 @@ +exec +drop index mytable_s on mytable; +---- + +exec +drop index mytable_i_s on mytable; +---- + +exec +drop index idx_si on mytable; +---- \ No newline at end of file diff --git a/enginetest/scriptgen/setup/scripts/newlinetable b/enginetest/scriptgen/setup/scripts/newlinetable new file mode 100644 index 0000000000..ccb68dfffe --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/newlinetable @@ -0,0 +1,16 @@ +exec +CREATE TABLE `newlinetable` ( + `i` bigint NOT NULL, + `s` text NOT NULL, + PRIMARY KEY (`i`) +) +---- + +exec +insert into newlinetable values + (1, '\nthere is some text in here'), + (2, 'there is some\ntext in here'), + (3, 'there is some text\nin here'), + (4, 'there is some text in here\n'), + (5, 'there is some text in here') +---- diff --git a/enginetest/scriptgen/setup/scripts/niltable b/enginetest/scriptgen/setup/scripts/niltable new file mode 100644 index 0000000000..8ebe370c59 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/niltable @@ -0,0 +1,23 @@ +exec +CREATE TABLE `niltable` ( + `i` bigint NOT NULL, + `i2` bigint, + `b` tinyint, + `f` double, + PRIMARY KEY (`i`) +) +---- + +exec +insert into niltable values + (1,null,null,null), + (2,2,1,null), + (3,null,0,null), + (4,4,null,4.0), + (5,null,1,5.0), + (6,6,0,6.0) +---- + +exec +create index niltable_i2 on niltable (i2) +---- diff --git a/enginetest/scriptgen/setup/scripts/null_ranges b/enginetest/scriptgen/setup/scripts/null_ranges new file mode 100644 index 0000000000..15bd475d3e --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/null_ranges @@ -0,0 +1,16 @@ +exec +create table null_ranges (x int primary key, y int) +---- + +exec +create index idx1 on null_ranges (y); +---- + +exec +insert into null_ranges values + (0,0), + (1,1), + (2,2), + (3,null), + (4,null) +---- diff --git a/enginetest/scriptgen/setup/scripts/ordinals_ddl b/enginetest/scriptgen/setup/scripts/ordinals_ddl new file mode 100644 index 0000000000..debec3a46d --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/ordinals_ddl @@ -0,0 +1,18 @@ +exec +CREATE TABLE short_ord_pk (x int not null, y int not null, primary key (y,x)) +---- + +exec +CREATE TABLE long_ord_pk1 (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v)) +---- + +exec +CREATE TABLE long_ord_pk2 (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u)) +---- + +exec +CREATE TABLE long_ord_pk3 (u int, v int, w int, ww int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u)) +---- + +exec +CREATE TABLE ord_kl (u int, v int, w int, x int, y int, z int) diff --git a/enginetest/scriptgen/setup/scripts/othertable b/enginetest/scriptgen/setup/scripts/othertable new file mode 100644 index 0000000000..77abdb192f --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/othertable @@ -0,0 +1,18 @@ +exec +create table othertable (s2 text not null, i2 bigint primary key) +---- + +exec +insert into othertable values + ('first', 3), + ('second', 2), + ('third', 1) +---- + +exec +create index othertable_s2 on othertable (s2) +---- + +exec +create index othertable_s2_i2 on othertable (s2,i2) +---- diff --git a/enginetest/scriptgen/setup/scripts/othertable_del_idx b/enginetest/scriptgen/setup/scripts/othertable_del_idx new file mode 100644 index 0000000000..ad32652419 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/othertable_del_idx @@ -0,0 +1,7 @@ +exec +drop index othertable_s2 on othertable; +---- + +exec +drop index othertable_s2_i2 on othertable; +---- diff --git a/enginetest/scriptgen/setup/scripts/parent_child b/enginetest/scriptgen/setup/scripts/parent_child new file mode 100644 index 0000000000..6576653ebc --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/parent_child @@ -0,0 +1,15 @@ +exec +CREATE TABLE parent (id INT PRIMARY KEY, v1 INT, v2 INT) +---- + +exec +create index v1 on parent (v1) +---- + +exec +create index v2 on parent (v2) +---- + +exec +CREATE TABLE child (id INT PRIMARY KEY, v1 INT, v2 INT) +---- diff --git a/enginetest/scriptgen/setup/scripts/people b/enginetest/scriptgen/setup/scripts/people new file mode 100644 index 0000000000..3c90d969fb --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/people @@ -0,0 +1,24 @@ +exec +CREATE TABLE `people` ( + `dob` date NOT NULL, + `first_name` text NOT NULL, + `last_name` text NOT NULL, + `middle_name` text NOT NULL, + `height_inches` bigint NOT NULL, + `gender` bigint NOT NULL, + PRIMARY KEY (`dob`,`first_name`,`last_name`,`middle_name`) +) +---- + +exec +insert into people values + ('1970-12-1', 'jon', 'smith', '', 72, 0), + ('1980-1-11', 'jon', 'smith', '', 67, 0), + ('1990-2-21', 'jane', 'doe', '', 68, 1), + ('2000-12-31', 'frank', 'franklin', '', 70, 2), + ('2010-3-15', 'jane', 'doe', '', 69, 1) +---- + +exec +create index people_l_f on people (last_name,first_name) +---- diff --git a/enginetest/scriptgen/setup/scripts/pk_tables b/enginetest/scriptgen/setup/scripts/pk_tables new file mode 100644 index 0000000000..b096606bac --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/pk_tables @@ -0,0 +1,85 @@ +exec +create table one_pk (pk smallint primary key, c1 smallint, c2 smallint, c3 smallint, c4 smallint, c5 smallint) +---- + +exec +insert into one_pk values + (0,0,1,2,3,4), + (1,10,11,12,13,14), + (2,20,21,22,23,24), + (3,30,31,32,33,34) +---- + +exec +create table two_pk ( + pk1 tinyint, + pk2 tinyint, + c1 tinyint NOT NULL, + c2 tinyint NOT NULL, + c3 tinyint NOT NULL, + c4 tinyint NOT NULL, + c5 tinyint NOT NULL, + primary key (pk1, pk2) +) +---- + +exec +insert into two_pk values + (0,0,0,1,2,3,4), + (0,1,10,11,12,13,14), + (1,0,20,21,22,23,24), + (1,1,30,31,32,33,34) +---- + +exec +create table one_pk_two_idx ( + pk bigint primary key, + v1 bigint, + v2 bigint +) +---- + +exec +insert into one_pk_two_idx values + (0,0,0), + (1,1,1), + (2,2,2), + (3,3,3), + (4,4,4), + (5,5,5), + (6,6,6), + (7,7,7) +---- + +exec +create table one_pk_three_idx ( + pk bigint primary key, + v1 bigint, + v2 bigint, + v3 bigint +) +---- + +exec +insert into one_pk_three_idx values + (0,0,0,0), + (1,0,0,1), + (2,0,1,0), + (3,0,2,2), + (4,1,0,0), + (5,2,0,3), + (6,3,3,0), + (7,4,4,4) +---- + +exec +create index one_pk_two_idx_1 on one_pk_two_idx (v1) +---- + +exec +create index one_pk_two_idx_2 on one_pk_two_idx (v1, v2) +---- + +exec +create index one_pk_three_idx_idx on one_pk_three_idx (v1, v2, v3) +---- diff --git a/enginetest/scriptgen/setup/scripts/reserved_keywords b/enginetest/scriptgen/setup/scripts/reserved_keywords new file mode 100644 index 0000000000..b2c09b8920 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/reserved_keywords @@ -0,0 +1,14 @@ +exec +CREATE TABLE `reservedWordsTable` ( + `Timestamp` text NOT NULL, + `and` text, + `or` text, + `select` text, + PRIMARY KEY (`Timestamp`) +) +---- + +exec +insert into reservedWordsTable values + ('1', '1.1', 'aaa', 'create') +---- diff --git a/enginetest/scriptgen/setup/scripts/spatial b/enginetest/scriptgen/setup/scripts/spatial new file mode 100644 index 0000000000..87a3286ef1 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/spatial @@ -0,0 +1,53 @@ +exec +create table stringtogeojson_table (i bigint primary key, s blob) +---- + +exec +insert into stringtogeojson_table values + (0, '{"type": "Point", "coordinates": [1,2]}'), + (1, '{"type": "Point", "coordinates": [123.45,56.789]}'), + (2, '{"type": "LineString", "coordinates": [[1,2],[3,4]]}'), + (3, '{"type": "LineString", "coordinates": [[1.23,2.345],[3.56789,4.56]]}'), + (4, '{"type": "Polygon", "coordinates": [[[1.1,2.2],[3.3,4.4],[5.5,6.6],[1.1,2.2]]]}'), + (5, '{"type": "Polygon", "coordinates": [[[0,0],[1,1],[2,2],[0,0]]]}') +---- + +exec +create table geometry_table (i bigint primary key, g geometry NOT NULL) +---- + +exec +insert into geometry_table values + (1, ST_GeomFromText('Point(1 2)')), + (2, ST_GeomFromText('Linestring(1 2,3 4)')), + (3, ST_GeomFromText('POLYGON((0 0,0 1,1 1,0 0))')), + (4, ST_SRID(ST_GeomFromText('Point(1 2)'), 4326)), + (5, ST_SRID(ST_GeomFromText('Linestring(1 2,3 4)'), 4326)), + (6, ST_SRID(ST_GeomFromText('POLYGON((0 0,0 1,1 1,0 0))'), 4326)) +---- + +exec +create table point_table (i bigint primary key, p point NOT NULL); +---- + +exec +insert into point_table values (5, ST_GeomFromText('Point(1 2)')) +---- + +exec +create table line_table (i bigint primary key, l linestring NOT NULL); +---- + +exec +insert into line_table values + (0, ST_GeomFromText('Linestring(1 2,3 4)')), + (1, ST_GeomFromText('Linestring(1 2,3 4,5 6)')) +---- + +exec +create table polygon_table (i bigint primary key, p polygon NOT NULL); +---- + +exec +insert into polygon_table values (0, ST_GeomFromText('Polygon((0 0,0 1,1 1,0 0))')) +---- diff --git a/enginetest/scriptgen/setup/scripts/specialtable b/enginetest/scriptgen/setup/scripts/specialtable new file mode 100644 index 0000000000..02bdf1d486 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/specialtable @@ -0,0 +1,22 @@ +exec +create table specialtable (id bigint primary key, name varchar(20)) +---- + +exec +insert into specialtable values + (1, 'first_row'), + (2, 'second_row'), + (3, 'third_row'), + (4, '%'), + (5, '\''), + (6, '\"'), + (7, '\t'), + (8, '\n'), + (9, "\v"), + (10, 'test%test'), + (11, 'test\'test'), + (12, 'test\"test'), + (13, 'test\ttest'), + (14, 'test\ntest'), + (15, 'test\vtest') +---- diff --git a/enginetest/scriptgen/setup/scripts/stringandtable b/enginetest/scriptgen/setup/scripts/stringandtable new file mode 100644 index 0000000000..23b75f1a41 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/stringandtable @@ -0,0 +1,19 @@ +exec +CREATE TABLE `stringandtable` ( + `k` bigint NOT NULL, + `i` bigint, + `v` text, + PRIMARY KEY (`k`) +); +---- + +exec +insert into stringandtable values + (0, 0, '0'), + (1, 1, '1'), + (2, 2, ''), + (3, 3, 'true'), + (4, 4, 'false'), + (5, 5, null), + (6, null, '2'); +---- diff --git a/enginetest/scriptgen/setup/scripts/tabletest b/enginetest/scriptgen/setup/scripts/tabletest new file mode 100644 index 0000000000..0c270f7931 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/tabletest @@ -0,0 +1,13 @@ +exec +create table tabletest ( + i int primary key, + s text not null +) +---- + +exec +insert into tabletest values + (1, 'first row'), + (2, 'second row'), + (3, 'third row') +---- diff --git a/enginetest/scriptgen/setup/scripts/testdb b/enginetest/scriptgen/setup/scripts/testdb new file mode 100644 index 0000000000..6a68429700 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/testdb @@ -0,0 +1,3 @@ +exec +create database test; +---- diff --git a/enginetest/scriptgen/setup/scripts/typestable b/enginetest/scriptgen/setup/scripts/typestable new file mode 100644 index 0000000000..fe41c8d0ac --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/typestable @@ -0,0 +1,27 @@ +exec +CREATE TABLE `typestable` ( + `id` bigint NOT NULL, + `i8` tinyint, + `i16` smallint, + `i32` int, + `i64` bigint, + `u8` tinyint unsigned, + `u16` smallint unsigned, + `u32` int unsigned, + `u64` bigint unsigned, + `f32` float, + `f64` double, + `ti` timestamp, + `da` date, + `te` text, + `bo` tinyint, + `js` json, + `bl` blob, + PRIMARY KEY (`id`) +) +---- + +exec +insert into typestable values + (1,2,3,4,5,6,7,8,9,10.0,11.0,'2019-12-31T12:00:00Z','2019-12-31T00:00:00Z','fourteen', 0,null,null) +---- diff --git a/enginetest/scriptgen/setup/scripts/views b/enginetest/scriptgen/setup/scripts/views new file mode 100644 index 0000000000..d3b4df2c44 --- /dev/null +++ b/enginetest/scriptgen/setup/scripts/views @@ -0,0 +1,7 @@ +exec +CREATE VIEW myview1 AS SELECT * FROM myhistorytable +---- + +exec +CREATE VIEW myview2 AS SELECT * FROM myview WHERE i = 1 +---- diff --git a/enginetest/scriptgen/setup/setup_data.sg.go b/enginetest/scriptgen/setup/setup_data.sg.go new file mode 100644 index 0000000000..6dd51e3592 --- /dev/null +++ b/enginetest/scriptgen/setup/setup_data.sg.go @@ -0,0 +1,230 @@ +// Code generated by scriptgen; DO NOT EDIT. + +package setup + +var AutoincrementData = []SetupScript{{ + `drop table if exists auto_increment_tbl`, + "CREATE TABLE `auto_increment_tbl` ( `pk` bigint NOT NULL AUTO_INCREMENT, `c0` bigint, PRIMARY KEY (`pk`))", + `INSERT INTO auto_increment_tbl values (1, 11), (2, 22), (3, 33)`, +}} + +var BigtableData = []SetupScript{{ + `create table bigtable (t text primary key, n bigint)`, + `insert into bigtable values ('a', 1), ('s', 2), ('f', 3), ('g', 1), ('h', 2), ('j', 3), ('k', 1), ('l', 2), ('ñ', 4), ('z', 5), ('x', 6), ('c', 7), ('v', 8), ('b', 9)`, +}} + +var Check_constraintData = []SetupScript{{ + `CREATE TABLE checks (a INTEGER PRIMARY KEY, b INTEGER, c varchar(20))`, + `ALTER TABLE checks ADD CONSTRAINT chk1 CHECK (B > 0)`, + `ALTER TABLE checks ADD CONSTRAINT chk2 CHECK (b > 0) NOT ENFORCED`, + `ALTER TABLE checks ADD CONSTRAINT chk3 CHECK (B > 1)`, + `ALTER TABLE checks ADD CONSTRAINT chk4 CHECK (upper(C) = c)`, +}} + +var Comp_index_tablesData = []SetupScript{{ + `CREATE TABLE comp_index_t0 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT)`, + `create INDEX v_idx on comp_index_t0 (v1, v2)`, + `INSERT INTO comp_index_t0 VALUES (0,0,48),(1,0,52),(2,2,4),(3,2,10),(4,3,35),(5,5,36),(6,5,60),(7,6,1),(8,6,51),(9,6,60),(10,6,73),(11,9,44),(12,9,97),(13,13,44),(14,14,53),(15,14,57),(16,14,98),(17,16,19),(18,16,53),(19,16,95),(20,18,31),(21,19,48),(22,19,75),(23,19,97),(24,24,60),(25,25,14),(26,25,31),(27,27,9),(28,27,24),(29,28,24),(30,28,83),(31,31,14),(32,33,39),(33,34,22),(34,34,91),(35,35,89),(36,38,20),(37,38,66),(38,39,55),(39,39,86),(40,40,97),(41,42,0),(42,42,82),(43,43,63),(44,44,48),(45,44,67),(46,45,22),(47,45,31),(48,45,63),(49,45,86),(50,46,46),(51,47,5),(52,48,22),(53,49,0),(54,50,0),(55,50,14),(56,51,35),(57,54,38),(58,56,0),(59,56,60),(60,57,29),(61,57,49),(62,58,12),(63,58,32),(64,59,29),(65,59,45),(66,59,54),(67,60,66),(68,61,3),(69,61,34),(70,63,19),(71,63,69),(72,65,80),(73,65,97),(74,67,95),(75,68,11),(76,69,34),(77,72,52),(78,74,81),(79,76,39),(80,78,0),(81,78,90),(82,79,36),(83,80,61),(84,80,88),(85,81,4),(86,82,16),(87,83,30),(88,83,74),(89,84,9),(90,84,45),(91,86,56),(92,86,88),(93,87,51),(94,89,3),(95,93,19),(96,93,21),(97,93,96),(98,98,0),(99,98,51),(100,98,61);`, + `CREATE TABLE comp_index_t1 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT)`, + `create INDEX v_idx on comp_index_t1 (v1, v2, v3)`, + `INSERT INTO comp_index_t1 VALUES (0,0,3,16),(1,2,65,9),(2,3,38,37),(3,3,99,99),(4,5,17,42),(5,6,6,76),(6,6,81,33),(7,7,33,51),(8,7,37,42),(9,8,9,21),(10,8,37,90),(11,9,39,20),(12,9,71,82),(13,10,16,21),(14,10,32,46),(15,10,47,36),(16,12,44,84),(17,12,66,40),(18,13,47,30),(19,13,56,41),(20,14,38,24),(21,14,91,1),(22,15,2,69),(23,16,40,36),(24,20,29,93),(25,21,9,89),(26,21,42,76),(27,23,13,53),(28,23,28,68),(29,23,28,90),(30,23,30,44),(31,24,20,8),(32,25,49,88),(33,26,15,28),(34,27,35,12),(35,28,39,84),(36,29,7,38),(37,29,21,74),(38,29,27,48),(39,29,77,46),(40,31,47,21),(41,31,47,91),(42,32,40,76),(43,33,70,50),(44,34,27,58),(45,35,32,36),(46,36,4,36),(47,36,84,75),(48,37,27,32),(49,38,88,68),(50,41,17,68),(51,41,77,26),(52,42,80,85),(53,45,1,57),(54,46,58,8),(55,49,26,11),(56,50,49,20),(57,50,86,6),(58,54,13,78),(59,54,57,83),(60,55,45,46),(61,55,81,80),(62,56,0,97),(63,56,8,78),(64,56,58,4),(65,56,66,33),(66,57,7,52),(67,59,77,53),(68,60,8,70),(69,61,11,25),(70,63,85,23),(71,65,17,9),(72,66,46,46),(73,66,73,4),(74,67,55,27),(75,70,8,54),(76,70,58,33),(77,71,39,15),(78,72,65,64),(79,74,78,26),(80,75,91,35),(81,76,40,52),(82,76,44,87),(83,81,32,4),(84,82,11,6),(85,82,46,32),(86,84,40,8),(87,84,93,37),(88,85,53,50),(89,86,63,79),(90,87,22,34),(91,87,57,62),(92,88,88,42),(93,90,30,67),(94,91,15,15),(95,93,7,26),(96,94,92,38),(97,95,89,66),(98,97,63,19),(99,98,31,21),(100,98,42,22)`, + `CREATE TABLE comp_index_t2 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT, v4 BIGINT)`, + `create INDEX v_idx on comp_index_t2 (v1, v2, v3, v4)`, + `INSERT INTO comp_index_t2 VALUES (0,0,33,2,67),(1,0,55,14,32),(2,1,43,13,36),(3,1,72,29,21),(4,2,27,1,75),(5,3,31,22,81),(6,4,6,67,80),(7,4,10,53,69),(8,4,27,77,5),(9,5,17,52,13),(10,5,32,30,48),(11,5,76,70,46),(12,7,7,66,62),(13,7,21,75,70),(14,7,76,26,47),(15,8,54,46,87),(16,8,99,43,1),(17,9,7,74,92),(18,9,19,38,35),(19,10,36,27,5),(20,12,0,33,62),(21,12,42,15,31),(22,12,46,43,23),(23,15,42,17,60),(24,17,49,14,7),(25,17,75,86,18),(26,20,30,34,71),(27,21,21,32,8),(28,22,21,28,78),(29,22,98,22,21),(30,23,43,13,11),(31,24,26,69,25),(32,24,45,96,0),(33,29,72,97,93),(34,32,16,97,29),(35,33,29,69,6),(36,33,53,56,88),(37,33,86,12,22),(38,34,55,37,34),(39,34,87,13,51),(40,34,89,27,90),(41,35,6,86,74),(42,36,7,40,16),(43,37,35,6,44),(44,37,41,36,10),(45,38,71,22,37),(46,39,45,75,55),(47,41,1,85,9),(48,41,21,82,54),(49,43,23,15,0),(50,43,66,85,66),(51,45,9,76,9),(52,47,94,56,21),(53,48,3,11,18),(54,50,26,23,71),(55,50,36,73,58),(56,50,39,26,37),(57,50,79,10,12),(58,50,97,0,79),(59,51,97,39,36),(60,52,72,44,2),(61,53,6,53,89),(62,53,48,19,36),(63,55,31,29,92),(64,57,25,97,65),(65,63,50,20,43),(66,64,23,33,5),(67,64,26,77,97),(68,64,41,74,85),(69,64,77,41,17),(70,66,97,6,39),(71,67,39,87,15),(72,69,81,70,37),(73,70,40,19,5),(74,70,56,21,22),(75,71,3,49,55),(76,71,48,89,99),(77,73,10,2,0),(78,73,91,56,0),(79,74,22,42,16),(80,74,35,72,97),(81,76,74,97,18),(82,82,29,66,71),(83,82,31,22,99),(84,82,70,5,47),(85,83,37,36,16),(86,83,41,53,57),(87,84,56,78,18),(88,85,2,3,88),(89,86,7,57,96),(90,87,23,16,63),(91,87,66,8,22),(92,88,57,12,88),(93,89,1,27,50),(94,89,91,7,45),(95,90,25,0,17),(96,91,23,2,9),(97,93,56,71,53),(98,94,43,71,43),(99,94,79,53,73),(100,96,73,38,38)`, +}} + +var DatetimetableData = []SetupScript{{ + "CREATE TABLE `datetime_table` ( `i` bigint NOT NULL, `date_col` date, `datetime_col` datetime, `timestamp_col` timestamp, `time_col` time(6), PRIMARY KEY (`i`))", + `insert into datetime_table values (1, '2019-12-31T12:00:00Z', '2020-01-01T12:00:00Z', '2020-01-02T12:00:00Z', '03:10:0'), (2, '2020-01-03T12:00:00Z', '2020-01-04T12:00:00Z', '2020-01-05T12:00:00Z', '04:00:44'), (3, '2020-01-07T00:00:00Z', '2020-01-07T12:00:00Z', '2020-01-07T12:00:01Z', '15:00:00.005000')`, + `create index datetime_table_d on datetime_table (date_col)`, + `create index datetime_table_dt on datetime_table (datetime_col)`, + `create index datetime_table_ts on datetime_table (timestamp_col)`, +}} + +var EmptytableData = []SetupScript{{ + `create table emptytable (i mediumint primary key, s text)`, +}} + +var ExplodeData = []SetupScript{{ + `create table explode (a bigint, b JSON, c text)`, + `insert into explode values (1, '["a", "b"]', 'first'), (2, '["c", "d"]', 'second'), (3, '["e", "f"]', 'third')`, +}} + +var Fk_tblData = []SetupScript{{ + "CREATE TABLE `fk_tbl` ( `pk` bigint NOT NULL, `a` bigint, `b` varchar(20), PRIMARY KEY (`pk`))", + `ALTER TABLE fk_tbl ADD CONSTRAINT fk1 FOREIGN KEY (a,b) REFERENCES mytable (i,s) ON DELETE CASCADE`, +}} + +var FloattableData = []SetupScript{{ + "CREATE TABLE `floattable` ( `i` bigint NOT NULL, `f32` float NOT NULL, `f64` double NOT NULL, PRIMARY KEY (`i`))", + `insert into floattable values (1, 1.0, 1.0), (2, 1.5, 1.5), (3, 2.0, 2.0), (4, 2.5, 2.5), (-1, -1.0, -1.0), (-2, -1.5, -1.5)`, + `create index floattable_f on floattable (f64)`, +}} + +var FooData = []SetupScript{{ + `create database if not exists foo`, + `create table foo.other_table (text text primary key, number mediumint)`, + `insert into foo.other_table values ('a', 4), ('b', 2), ('c', 0)`, +}} + +var Graph_tablesData = []SetupScript{{ + "CREATE TABLE `bus_routes` ( `origin` text NOT NULL, `dst` text NOT NULL, PRIMARY KEY (`origin`,`dst`))", + `insert into bus_routes values ('New York', 'Boston'), ('Boston', 'New York'), ('New York', 'Washington'), ('Washington', 'Boston'), ('Washington', 'Raleigh')`, + "CREATE TABLE `parts` ( `part` text NOT NULL, `sub_part` text NOT NULL, `quantity` bigint NOT NULL, PRIMARY KEY (`part`,`sub_part`))", + `insert into parts values ('pie', 'crust', 1), ('pie', 'filling', 2), ('crust', 'flour', 20), ('crust', 'sugar', 2), ('crust', 'butter', 15), ('crust', 'salt', 15), ('filling', 'sugar', 5), ('filling', 'fruit', 9), ('filling', 'salt', 3), ('filling', 'butter', 3)`, +}} + +var Invert_pkData = []SetupScript{{ + "CREATE TABLE `invert_pk` ( `x` bigint NOT NULL, `y` bigint NOT NULL, `z` bigint NOT NULL, PRIMARY KEY (`y`,`z`,`x`))", + `insert into invert_pk values (0, 2, 2), (1, 1, 0), (2, 0, 1)`, +}} + +var JsontableData = []SetupScript{{ + `create table jsontable (pk smallint primary key, c1 text, c2 JSON, c3 JSON)`, + `insert into jsontable values (1, 'row one', '[1,2]', '{"a": 2}'), (2, 'row two', '[3,4]', '{"b": 2}'), (3, 'row three', '[5,6]', '{"c": 2}'), (4, 'row four', '[7,8]', '{"d": 2}')`, +}} + +var KeylessData = []SetupScript{{ + "CREATE TABLE `unique_keyless` ( `c0` bigint, `c1` bigint)", + `insert into unique_keyless values (0,0), (1,1), (2,2)`, + "CREATE TABLE `keyless` ( `c0` bigint, `c1` bigint)", + `insert into keyless values (0,0), (1,1), (1,1), (2,2)`, +}} + +var LoadtableData = []SetupScript{{ + `create table loadtable(pk int primary key)`, +}} + +var MydbData = []SetupScript{{ + `create database if not exists mydb`, + `use mydb`, +}} + +var MyhistorytableData = []SetupScript{{ + "CREATE TABLE `myhistorytable` ( `i` bigint NOT NULL, `s` text NOT NULL, `c` text NOT NULL, PRIMARY KEY (`i`))", +}} + +var MytableData = []SetupScript{{ + `create table mytable (i bigint primary key, s varchar(20) comment 'column s' NOT NULL)`, + `insert into mytable values (1, 'first row'), (2, 'second row'), (3, 'third row')`, + `create unique index mytable_s on mytable (s)`, + `create index mytable_i_s on mytable (i,s)`, + "create index `idx_si` on mytable (`s`,`i`)", +}} + +var Mytable_del_idxData = []SetupScript{{ + `drop index mytable_s on mytable;`, + `drop index mytable_i_s on mytable;`, + `drop index idx_si on mytable;`, +}} + +var NewlinetableData = []SetupScript{{ + "CREATE TABLE `newlinetable` ( `i` bigint NOT NULL, `s` text NOT NULL, PRIMARY KEY (`i`))", + `insert into newlinetable values (1, '\nthere is some text in here'), (2, 'there is some\ntext in here'), (3, 'there is some text\nin here'), (4, 'there is some text in here\n'), (5, 'there is some text in here')`, +}} + +var NiltableData = []SetupScript{{ + "CREATE TABLE `niltable` ( `i` bigint NOT NULL, `i2` bigint, `b` tinyint, `f` double, PRIMARY KEY (`i`))", + `insert into niltable values (1,null,null,null), (2,2,1,null), (3,null,0,null), (4,4,null,4.0), (5,null,1,5.0), (6,6,0,6.0)`, + `create index niltable_i2 on niltable (i2)`, +}} + +var Null_rangesData = []SetupScript{{ + `create table null_ranges (x int primary key, y int)`, + `create index idx1 on null_ranges (y);`, + `insert into null_ranges values (0,0), (1,1), (2,2), (3,null), (4,null)`, +}} + +var Ordinals_ddlData = []SetupScript{{ + `CREATE TABLE short_ord_pk (x int not null, y int not null, primary key (y,x))`, + `CREATE TABLE long_ord_pk1 (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v))`, + `CREATE TABLE long_ord_pk2 (u int, v int, w int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u))`, + `CREATE TABLE long_ord_pk3 (u int, v int, w int, ww int, x int, y int, z int, PRIMARY KEY (y,v,x,z,u))`, + `CREATE TABLE ord_kl (u int, v int, w int, x int, y int, z int)`, +}} + +var OthertableData = []SetupScript{{ + `create table othertable (s2 text not null, i2 bigint primary key)`, + `insert into othertable values ('first', 3), ('second', 2), ('third', 1)`, + `create index othertable_s2 on othertable (s2)`, + `create index othertable_s2_i2 on othertable (s2,i2)`, +}} + +var Othertable_del_idxData = []SetupScript{{ + `drop index othertable_s2 on othertable;`, + `drop index othertable_s2_i2 on othertable;`, +}} + +var Parent_childData = []SetupScript{{ + `CREATE TABLE parent (id INT PRIMARY KEY, v1 INT, v2 INT)`, + `create index v1 on parent (v1)`, + `create index v2 on parent (v2)`, + `CREATE TABLE child (id INT PRIMARY KEY, v1 INT, v2 INT)`, +}} + +var PeopleData = []SetupScript{{ + "CREATE TABLE `people` ( `dob` date NOT NULL, `first_name` text NOT NULL, `last_name` text NOT NULL, `middle_name` text NOT NULL, `height_inches` bigint NOT NULL, `gender` bigint NOT NULL, PRIMARY KEY (`dob`,`first_name`,`last_name`,`middle_name`))", + `insert into people values ('1970-12-1', 'jon', 'smith', '', 72, 0), ('1980-1-11', 'jon', 'smith', '', 67, 0), ('1990-2-21', 'jane', 'doe', '', 68, 1), ('2000-12-31', 'frank', 'franklin', '', 70, 2), ('2010-3-15', 'jane', 'doe', '', 69, 1)`, + `create index people_l_f on people (last_name,first_name)`, +}} + +var Pk_tablesData = []SetupScript{{ + `create table one_pk (pk smallint primary key, c1 smallint, c2 smallint, c3 smallint, c4 smallint, c5 smallint)`, + `insert into one_pk values (0,0,1,2,3,4), (1,10,11,12,13,14), (2,20,21,22,23,24), (3,30,31,32,33,34)`, + `create table two_pk ( pk1 tinyint, pk2 tinyint, c1 tinyint NOT NULL, c2 tinyint NOT NULL, c3 tinyint NOT NULL, c4 tinyint NOT NULL, c5 tinyint NOT NULL, primary key (pk1, pk2))`, + `insert into two_pk values (0,0,0,1,2,3,4), (0,1,10,11,12,13,14), (1,0,20,21,22,23,24), (1,1,30,31,32,33,34)`, + `create table one_pk_two_idx ( pk bigint primary key, v1 bigint, v2 bigint)`, + `insert into one_pk_two_idx values (0,0,0), (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5), (6,6,6), (7,7,7)`, + `create table one_pk_three_idx ( pk bigint primary key, v1 bigint, v2 bigint, v3 bigint)`, + `insert into one_pk_three_idx values (0,0,0,0), (1,0,0,1), (2,0,1,0), (3,0,2,2), (4,1,0,0), (5,2,0,3), (6,3,3,0), (7,4,4,4)`, + `create index one_pk_two_idx_1 on one_pk_two_idx (v1)`, + `create index one_pk_two_idx_2 on one_pk_two_idx (v1, v2)`, + `create index one_pk_three_idx_idx on one_pk_three_idx (v1, v2, v3)`, +}} + +var Reserved_keywordsData = []SetupScript{{ + "CREATE TABLE `reservedWordsTable` ( `Timestamp` text NOT NULL, `and` text, `or` text, `select` text, PRIMARY KEY (`Timestamp`))", + `insert into reservedWordsTable values ('1', '1.1', 'aaa', 'create')`, +}} + +var SpatialData = []SetupScript{{ + `create table stringtogeojson_table (i bigint primary key, s blob)`, + `insert into stringtogeojson_table values (0, '{"type": "Point", "coordinates": [1,2]}'), (1, '{"type": "Point", "coordinates": [123.45,56.789]}'), (2, '{"type": "LineString", "coordinates": [[1,2],[3,4]]}'), (3, '{"type": "LineString", "coordinates": [[1.23,2.345],[3.56789,4.56]]}'), (4, '{"type": "Polygon", "coordinates": [[[1.1,2.2],[3.3,4.4],[5.5,6.6],[1.1,2.2]]]}'), (5, '{"type": "Polygon", "coordinates": [[[0,0],[1,1],[2,2],[0,0]]]}')`, + `create table geometry_table (i bigint primary key, g geometry NOT NULL)`, + `insert into geometry_table values (1, ST_GeomFromText('Point(1 2)')), (2, ST_GeomFromText('Linestring(1 2,3 4)')), (3, ST_GeomFromText('POLYGON((0 0,0 1,1 1,0 0))')), (4, ST_SRID(ST_GeomFromText('Point(1 2)'), 4326)), (5, ST_SRID(ST_GeomFromText('Linestring(1 2,3 4)'), 4326)), (6, ST_SRID(ST_GeomFromText('POLYGON((0 0,0 1,1 1,0 0))'), 4326))`, + `create table point_table (i bigint primary key, p point NOT NULL);`, + `insert into point_table values (5, ST_GeomFromText('Point(1 2)'))`, + `create table line_table (i bigint primary key, l linestring NOT NULL);`, + `insert into line_table values (0, ST_GeomFromText('Linestring(1 2,3 4)')), (1, ST_GeomFromText('Linestring(1 2,3 4,5 6)'))`, + `create table polygon_table (i bigint primary key, p polygon NOT NULL);`, + `insert into polygon_table values (0, ST_GeomFromText('Polygon((0 0,0 1,1 1,0 0))'))`, +}} + +var SpecialtableData = []SetupScript{{ + `create table specialtable (id bigint primary key, name varchar(20))`, + `insert into specialtable values (1, 'first_row'), (2, 'second_row'), (3, 'third_row'), (4, '%'), (5, '\''), (6, '\"'), (7, '\t'), (8, '\n'), (9, "\v"), (10, 'test%test'), (11, 'test\'test'), (12, 'test\"test'), (13, 'test\ttest'), (14, 'test\ntest'), (15, 'test\vtest')`, +}} + +var StringandtableData = []SetupScript{{ + "CREATE TABLE `stringandtable` ( `k` bigint NOT NULL, `i` bigint, `v` text, PRIMARY KEY (`k`));", + `insert into stringandtable values (0, 0, '0'), (1, 1, '1'), (2, 2, ''), (3, 3, 'true'), (4, 4, 'false'), (5, 5, null), (6, null, '2');`, +}} + +var TabletestData = []SetupScript{{ + `create table tabletest ( i int primary key, s text not null)`, + `insert into tabletest values (1, 'first row'), (2, 'second row'), (3, 'third row')`, +}} + +var TestdbData = []SetupScript{{ + `create database test;`, +}} + +var TypestableData = []SetupScript{{ + "CREATE TABLE `typestable` ( `id` bigint NOT NULL, `i8` tinyint, `i16` smallint, `i32` int, `i64` bigint, `u8` tinyint unsigned, `u16` smallint unsigned, `u32` int unsigned, `u64` bigint unsigned, `f32` float, `f64` double, `ti` timestamp, `da` date, `te` text, `bo` tinyint, `js` json, `bl` blob, PRIMARY KEY (`id`))", + `insert into typestable values (1,2,3,4,5,6,7,8,9,10.0,11.0,'2019-12-31T12:00:00Z','2019-12-31T00:00:00Z','fourteen', 0,null,null)`, +}} + +var ViewsData = []SetupScript{{ + `CREATE VIEW myview1 AS SELECT * FROM myhistorytable`, + `CREATE VIEW myview2 AS SELECT * FROM myview WHERE i = 1`, +}} diff --git a/enginetest/test_writers_test.go b/enginetest/test_writers_test.go new file mode 100644 index 0000000000..03e258dbe0 --- /dev/null +++ b/enginetest/test_writers_test.go @@ -0,0 +1,192 @@ +package enginetest + +import ( + "bufio" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/dolthub/go-mysql-server/enginetest/queries" + "github.com/dolthub/go-mysql-server/enginetest/scriptgen/setup" + "github.com/dolthub/go-mysql-server/sql/parse" +) + +// This test will write a new set of query plan expected results to a file that you can copy and paste over the existing +// query plan results. Handy when you've made a large change to the analyzer or node formatting, and you want to examine +// how query plans have changed without a lot of manual copying and pasting. +func TestWriteQueryPlans(t *testing.T) { + t.Skip() + + harness := NewDefaultMemoryHarness() + engine := NewEngine(t, harness) + CreateIndexes(t, harness, engine) + + tmp, err := ioutil.TempDir("", "*") + if err != nil { + return + } + + outputPath := filepath.Join(tmp, "queryPlans.txt") + f, err := os.Create(outputPath) + require.NoError(t, err) + + w := bufio.NewWriter(f) + _, _ = w.WriteString("var PlanTests = []QueryPlanTest{\n") + for _, tt := range queries.PlanTests { + _, _ = w.WriteString("\t{\n") + ctx := NewContextWithEngine(harness, engine) + parsed, err := parse.Parse(ctx, tt.Query) + require.NoError(t, err) + + node, err := engine.Analyzer.Analyze(ctx, parsed, nil) + require.NoError(t, err) + planString := extractQueryNode(node).String() + + if strings.Contains(tt.Query, "`") { + _, _ = w.WriteString(fmt.Sprintf(`Query: "%s",`, tt.Query)) + } else { + _, _ = w.WriteString(fmt.Sprintf("Query: `%s`,", tt.Query)) + } + _, _ = w.WriteString("\n") + + _, _ = w.WriteString(`ExpectedPlan: `) + for i, line := range strings.Split(planString, "\n") { + if i > 0 { + _, _ = w.WriteString(" + \n") + } + if len(line) > 0 { + _, _ = w.WriteString(fmt.Sprintf(`"%s\n"`, strings.ReplaceAll(line, `"`, `\"`))) + } else { + // final line with comma + _, _ = w.WriteString("\"\",\n") + } + } + _, _ = w.WriteString("\t},\n") + } + _, _ = w.WriteString("}") + + _ = w.Flush() + + t.Logf("Query plans in %s", outputPath) +} + +func TestWriteIndexQueryPlans(t *testing.T) { + t.Skip() + + harness := NewDefaultMemoryHarness() + engine := NewEngine(t, harness) + + CreateIndexes(t, harness, engine) + + tmp, err := ioutil.TempDir("", "*") + if err != nil { + return + } + + outputPath := filepath.Join(tmp, "indexQueryPlans.txt") + f, err := os.Create(outputPath) + require.NoError(t, err) + + w := bufio.NewWriter(f) + _, _ = w.WriteString("var IndexPlanTests = []QueryPlanTest{\n") + for _, tt := range queries.IndexPlanTests { + _, _ = w.WriteString("\t{\n") + ctx := NewContextWithEngine(harness, engine) + parsed, err := parse.Parse(ctx, tt.Query) + require.NoError(t, err) + + node, err := engine.Analyzer.Analyze(ctx, parsed, nil) + require.NoError(t, err) + planString := extractQueryNode(node).String() + + if strings.Contains(tt.Query, "`") { + _, _ = w.WriteString(fmt.Sprintf(`Query: "%s",`, tt.Query)) + } else { + _, _ = w.WriteString(fmt.Sprintf("Query: `%s`,", tt.Query)) + } + _, _ = w.WriteString("\n") + + _, _ = w.WriteString(`ExpectedPlan: `) + for i, line := range strings.Split(planString, "\n") { + if i > 0 { + _, _ = w.WriteString(" + \n") + } + if len(line) > 0 { + _, _ = w.WriteString(fmt.Sprintf(`"%s\n"`, strings.ReplaceAll(line, `"`, `\"`))) + } else { + // final line with comma + _, _ = w.WriteString("\"\",\n") + } + } + _, _ = w.WriteString("\t},\n") + } + _, _ = w.WriteString("}") + + _ = w.Flush() + + t.Logf("Query plans in %s", outputPath) +} + +func TestWriteComplexIndexQueries(t *testing.T) { + t.Skip() + tmp, err := ioutil.TempDir("", "*") + if err != nil { + return + } + + outputPath := filepath.Join(tmp, "complex_index_queries.txt") + f, err := os.Create(outputPath) + require.NoError(t, err) + + w := bufio.NewWriter(f) + _, _ = w.WriteString("var ComplexIndexQueries = []QueryTest{\n") + for _, tt := range queries.ComplexIndexQueries { + w.WriteString(" {\n") + w.WriteString(fmt.Sprintf(" Query: `%s`,\n", tt.Query)) + w.WriteString(fmt.Sprintf(" Expected: %#v,\n", tt.Expected)) + w.WriteString(" },\n") + } + w.WriteString("}\n") + w.Flush() + t.Logf("Query tests in:\n %s", outputPath) +} + +func TestWriteCreateTableQueries(t *testing.T) { + //t.Skip() + tmp, err := ioutil.TempDir("", "*") + if err != nil { + return + } + + outputPath := filepath.Join(tmp, "create_table_queries.txt") + f, err := os.Create(outputPath) + require.NoError(t, err) + + harness := NewDefaultMemoryHarness() + harness.Setup(setup.MydbData, setup.MytableData, setup.FooData) + + w := bufio.NewWriter(f) + _, _ = w.WriteString("var CreateTableQueries = []WriteQueryTest{\n") + for _, tt := range queries.CreateTableQueries { + ctx := NewContext(harness) + engine := mustNewEngine(t, harness) + _ = MustQuery(ctx, engine, tt.WriteQuery) + res := MustQuery(ctx, engine, tt.SelectQuery) + + w.WriteString(" {\n") + w.WriteString(fmt.Sprintf(" WriteQuery:`%s`,\n", tt.WriteQuery)) + w.WriteString(fmt.Sprintf(" ExpectedWriteResult: %#v,\n", tt.ExpectedWriteResult)) + w.WriteString(fmt.Sprintf(" SelectQuery: \"%s\",\n", tt.SelectQuery)) + w.WriteString(fmt.Sprintf(" ExpectedSelect: %#v,\n", res)) + w.WriteString(" },\n") + } + w.WriteString("}\n") + w.Flush() + t.Logf("Query tests in:\n %s", outputPath) + +} diff --git a/memory/provider.go b/memory/provider.go index 7c29e45a2c..0bede53443 100644 --- a/memory/provider.go +++ b/memory/provider.go @@ -83,6 +83,7 @@ func (d memoryDBProvider) CreateDatabase(_ *sql.Context, name string) (err error defer d.mu.Unlock() db := NewDatabase(name) + db.EnablePrimaryKeyIndexes() d.dbs[strings.ToLower(db.Name())] = db return } diff --git a/memory/table.go b/memory/table.go index d9cddcce92..8c69b57027 100644 --- a/memory/table.go +++ b/memory/table.go @@ -123,7 +123,7 @@ func NewPartitionedTable(name string, schema sql.PrimaryKeySchema, fkColl *Forei } // Name implements the sql.Table interface. -func (t *Table) Name() string { +func (t Table) Name() string { return t.name } @@ -1224,7 +1224,7 @@ func (t *Table) CreatePrimaryKey(ctx *sql.Context, columns []sql.IndexColumn) er } pkSchema := sql.NewPrimaryKeySchema(potentialSchema, pkOrdinals...) - newTable, err := copyTable(t, pkSchema) + newTable, err := newTable(t, pkSchema) if err != nil { return err } @@ -1323,7 +1323,7 @@ func copyschema(sch sql.Schema) sql.Schema { return potentialSchema } -func copyTable(t *Table, newSch sql.PrimaryKeySchema) (*Table, error) { +func newTable(t *Table, newSch sql.PrimaryKeySchema) (*Table, error) { newTable := NewPartitionedTable(t.name, newSch, t.fkColl, len(t.partitions)) for _, partition := range t.partitions { for _, partitionRow := range partition { diff --git a/memory/table_editor.go b/memory/table_editor.go index 7acf9e24a6..ed2d169202 100644 --- a/memory/table_editor.go +++ b/memory/table_editor.go @@ -176,7 +176,7 @@ func (t *tableEditor) SetAutoIncrementValue(ctx *sql.Context, val uint64) error func (t *tableEditor) WithIndexLookup(lookup sql.IndexLookup) sql.Table { //TODO: optimize this, should create some a struct that encloses the tableEditor and filters based on the lookup if pkTea, ok := t.ea.(*pkTableEditAccumulator); ok { - newTable, err := copyTable(pkTea.table, pkTea.table.schema) + newTable, err := newTable(pkTea.table, pkTea.table.schema) if err != nil { panic(err) } @@ -203,7 +203,7 @@ func (t *tableEditor) WithIndexLookup(lookup sql.IndexLookup) sql.Table { return newTable.WithIndexLookup(memoryLookup) } else { nonPkTea := t.ea.(*keylessTableEditAccumulator) - newTable, err := copyTable(nonPkTea.table, nonPkTea.table.schema) + newTable, err := newTable(nonPkTea.table, nonPkTea.table.schema) if err != nil { panic(err) } diff --git a/sql/analyzer/analyzer.go b/sql/analyzer/analyzer.go index ba3a35f421..c1875f8401 100644 --- a/sql/analyzer/analyzer.go +++ b/sql/analyzer/analyzer.go @@ -340,7 +340,7 @@ func (a *Analyzer) LogDiff(prev, next sql.Node) { // PushDebugContext pushes the given context string onto the context stack, to use when logging debug messages. func (a *Analyzer) PushDebugContext(msg string) { - if a != nil { + if a != nil && a.Debug { a.contextStack = append(a.contextStack, msg) } } diff --git a/sql/analyzer/join_search.go b/sql/analyzer/join_search.go index f7206cb3ac..91aea8a6b8 100644 --- a/sql/analyzer/join_search.go +++ b/sql/analyzer/join_search.go @@ -44,25 +44,6 @@ func buildJoinTree( return found } -// Generates all permutations of the slice given. -func permutations(a []int) (res [][]int) { - var helper func(n int) - helper = func(n int) { - if n > len(a) { - res = append(res, append([]int(nil), a...)) - } else { - helper(n + 1) - for i := n + 1; i < len(a); i++ { - a[n], a[i] = a[i], a[n] - helper(n + 1) - a[i], a[n] = a[n], a[i] - } - } - } - helper(0) - return res -} - // assignConditions attempts to assign the conditions in |conditions| // to the search tree in |root|, such that every condition is on an // internal node, and all of the trees referenced in the condition diff --git a/sql/columndefault.go b/sql/columndefault.go index d39a9adc80..55401bb6a8 100644 --- a/sql/columndefault.go +++ b/sql/columndefault.go @@ -40,6 +40,14 @@ func NewColumnDefaultValue(expr Expression, outType Type, representsLiteral bool }, nil } +func MustNewNullDefault(expr Expression, outType Type, representsLiteral bool, mayReturnNil bool) *ColumnDefaultValue { + d, err := NewColumnDefaultValue(expr, outType, representsLiteral, mayReturnNil) + if err != nil { + panic(err) + } + return d +} + // NewUnresolvedColumnDefaultValue returns a column default func NewUnresolvedColumnDefaultValue(expr string) *ColumnDefaultValue { return &ColumnDefaultValue{ diff --git a/sql/information_schema/columns_table.go b/sql/information_schema/columns_table.go index a5986b61a6..9e0e2a0f0e 100644 --- a/sql/information_schema/columns_table.go +++ b/sql/information_schema/columns_table.go @@ -146,6 +146,10 @@ func columnsRowIter(ctx *sql.Context, cat sql.Catalog, columnNameToDefault map[s fullColumnName := db.Name() + "." + t.Name() + "." + c.Name colDefault = trimColumnDefaultOutput(columnNameToDefault[fullColumnName]) + columnKey := "" + if c.PrimaryKey { + columnKey = "PRI" + } rows = append(rows, sql.Row{ "def", // table_catalog @@ -164,7 +168,7 @@ func columnsRowIter(ctx *sql.Context, cat sql.Catalog, columnNameToDefault map[s charName, // character_set_name collName, // collation_name strings.ToLower(c.Type.String()), // column_type - "", // column_key + columnKey, // column_key c.Extra, // extra "select", // privileges c.Comment, // column_comment diff --git a/sql/information_schema/information_schema.go b/sql/information_schema/information_schema.go index ce159dbf32..fca78d3b46 100644 --- a/sql/information_schema/information_schema.go +++ b/sql/information_schema/information_schema.go @@ -1509,7 +1509,7 @@ func NewInformationSchemaDatabase() Database { rowIter: emptyRowIter, }, MysqlFirewallWhitelistTableName: &informationSchemaTable{ - name: MysqlFirewallUsersTableName, + name: MysqlFirewallWhitelistTableName, schema: mysqlFirewallWhitelistSchema, rowIter: emptyRowIter, }, @@ -1574,7 +1574,7 @@ func NewInformationSchemaDatabase() Database { rowIter: emptyRowIter, }, TableConstraintsExtensionsTableName: &informationSchemaTable{ - name: RoleColumnGrantsTableName, + name: TableConstraintsExtensionsTableName, schema: tableConstraintsExtensionsSchema, rowIter: emptyRowIter, }, @@ -1883,7 +1883,6 @@ func (t *informationSchemaTable) PartitionRows(ctx *Context, partition Partition if t.catalog == nil { return nil, fmt.Errorf("nil catalog for info schema table %s", t.name) } - return t.rowIter(ctx, t.catalog) } diff --git a/sql/plan/indexed_table_access.go b/sql/plan/indexed_table_access.go index b67279183d..6dbe58d492 100644 --- a/sql/plan/indexed_table_access.go +++ b/sql/plan/indexed_table_access.go @@ -100,6 +100,8 @@ func (i *IndexedTableAccess) Index() sql.Index { } func (i *IndexedTableAccess) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error) { + span, ctx := ctx.Span("plan.IndexedTableAccess") + resolvedTable, ok := i.ResolvedTable.Table.(sql.IndexAddressableTable) if !ok { return nil, ErrNoIndexableTable.New(i.ResolvedTable) @@ -116,7 +118,7 @@ func (i *IndexedTableAccess) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter return nil, err } - return sql.NewTableRowIter(ctx, indexedTable, partIter), nil + return sql.NewSpanIter(span, sql.NewTableRowIter(ctx, indexedTable, partIter)), nil } func (i *IndexedTableAccess) RowIter2(ctx *sql.Context, f *sql.RowFrame) (sql.RowIter2, error) {