Repository: vitessio/vitess
Pull request #8690 (2021-08-26 09:53:24)

Gen4: Add `TPC-C`, `TPC-H` and `OLTP` queries and schema to the planbuilder test suite
## Description

This pull request adds new plan tests to the `planbuilder` package. Those new tests aim to reproduce the three workloads we execute against Vitess in arewefastyet. The workloads are OLTP, TPC-C, and TPC-H; they are detailed in the following table.

**name** | **number of queries**
---- | ----
`OLTP` | 10
`TPC-C` | 40
`TPC-H` | 22

For each workload, a new vschema and `_cases.txt` file are created and used by the testing and benchmarking functions.

The microbenchmarks results of these workloads can be safely used as a reference considering that their inputs/queries are not supposed to be modified.

## Related Issue(s)

#7280 

## Known issue ⚠️

The test case `TPC-H query 5` is flaky. The reason behind this flakiness is the use of multi-column vindexes. When we render the map of join variable (_list of variables that need to be built from the LHS result before invoking the RHS subquery, more [here](https://github.com/vitessio/vitess/blob/bd91b42bcc06f0ca5a359187272c13f055ce79c5/go/vt/vtgate/engine/join.go#L48)_), the map contains two entries and cannot be sorted since it is a map. This issue will be fixed in a subsequent pull request.

## Checklist
- [x] Tests were added or are not required
- [x] Documentation was added or is not required



Patch:
diff --git a/go/vt/vtgate/planbuilder/builder.go b/go/vt/vtgate/planbuilder/builder.go
index 184f2f1baf..715fa046c9 100644
--- a/go/vt/vtgate/planbuilder/builder.go
+++ b/go/vt/vtgate/planbuilder/builder.go
@@ -82,6 +82,10 @@ const (
 	Gen4WithFallback = querypb.ExecuteOptions_Gen4WithFallback
 )
 
+var (
+	plannerVersions = []PlannerVersion{V3, Gen4, Gen4GreedyOnly, Gen4Left2Right, Gen4WithFallback}
+)
+
 type truncater interface {
 	SetTruncateColumnCount(int)
 }


Test patch:
diff --git a/go/vt/vtgate/planbuilder/plan_test.go b/go/vt/vtgate/planbuilder/plan_test.go
index 697a2c6ffd..0b3c400c37 100644
--- a/go/vt/vtgate/planbuilder/plan_test.go
+++ b/go/vt/vtgate/planbuilder/plan_test.go
@@ -218,6 +218,87 @@ func TestOne(t *testing.T) {
 	testFile(t, "onecase.txt", "", vschema, true)
 }
 
+func TestOLTP(t *testing.T) {
+	vschemaWrapper := &vschemaWrapper{
+		v:             loadSchema(t, "oltp_schema_test.json"),
+		sysVarEnabled: true,
+	}
+
+	testOutputTempDir, err := ioutil.TempDir("", "plan_test")
+	require.NoError(t, err)
+	defer func() {
+		if !t.Failed() {
+			os.RemoveAll(testOutputTempDir)
+		}
+	}()
+
+	testFile(t, "oltp_cases.txt", testOutputTempDir, vschemaWrapper, true)
+}
+
+func TestTPCC(t *testing.T) {
+	vschemaWrapper := &vschemaWrapper{
+		v:             loadSchema(t, "tpcc_schema_test.json"),
+		sysVarEnabled: true,
+	}
+
+	testOutputTempDir, err := ioutil.TempDir("", "plan_test")
+	require.NoError(t, err)
+	defer func() {
+		if !t.Failed() {
+			os.RemoveAll(testOutputTempDir)
+		}
+	}()
+
+	testFile(t, "tpcc_cases.txt", testOutputTempDir, vschemaWrapper, true)
+}
+
+func TestTPCH(t *testing.T) {
+	vschemaWrapper := &vschemaWrapper{
+		v:             loadSchema(t, "tpch_schema_test.json"),
+		sysVarEnabled: true,
+	}
+
+	testOutputTempDir, err := ioutil.TempDir("", "plan_test")
+	require.NoError(t, err)
+	defer func() {
+		if !t.Failed() {
+			os.RemoveAll(testOutputTempDir)
+		}
+	}()
+
+	testFile(t, "tpch_cases.txt", testOutputTempDir, vschemaWrapper, true)
+}
+
+func BenchmarkOLTP(b *testing.B) {
+	benchmarkWorkload(b, "oltp")
+}
+
+func BenchmarkTPCC(b *testing.B) {
+	benchmarkWorkload(b, "tpcc")
+}
+
+func BenchmarkTPCH(b *testing.B) {
+	benchmarkWorkload(b, "tpch")
+}
+
+func benchmarkWorkload(b *testing.B, name string) {
+	vschemaWrapper := &vschemaWrapper{
+		v:             loadSchema(b, name+"_schema_test.json"),
+		sysVarEnabled: true,
+	}
+
+	var testCases []testCase
+	for tc := range iterateExecFile(name + "_cases.txt") {
+		testCases = append(testCases, tc)
+	}
+	b.ResetTimer()
+	for _, version := range plannerVersions {
+		b.Run(version.String(), func(b *testing.B) {
+			benchmarkPlanner(b, version, testCases, vschemaWrapper)
+		})
+	}
+}
+
 func TestBypassPlanningShardTargetFromFile(t *testing.T) {
 	testOutputTempDir, err := ioutil.TempDir("", "plan_test")
 	require.NoError(t, err)
diff --git a/go/vt/vtgate/planbuilder/testdata/oltp_cases.txt b/go/vt/vtgate/planbuilder/testdata/oltp_cases.txt
new file mode 100644
index 0000000000..cf11eb98c6
--- /dev/null
+++ b/go/vt/vtgate/planbuilder/testdata/oltp_cases.txt
@@ -0,0 +1,253 @@
+# OLTP simple select
+"SELECT c FROM sbtest34 WHERE id=15"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c FROM sbtest34 WHERE id=15",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c from sbtest34 where 1 != 1",
+    "Query": "select c from sbtest34 where id = 15",
+    "Table": "sbtest34",
+    "Values": [
+      15
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# OLTP simple range select
+"SELECT c FROM sbtest12 WHERE id BETWEEN 1 AND 10"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c FROM sbtest12 WHERE id BETWEEN 1 AND 10",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectScatter",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c from sbtest12 where 1 != 1",
+    "Query": "select c from sbtest12 where id between 1 and 10",
+    "Table": "sbtest12"
+  }
+}
+Gen4 plan same as above
+
+# OLTP sum range select
+"SELECT SUM(k) FROM sbtest43 WHERE id BETWEEN 90 AND 990"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT SUM(k) FROM sbtest43 WHERE id BETWEEN 90 AND 990",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "Aggregates": "sum(0)",
+    "Inputs": [
+      {
+        "OperatorType": "Route",
+        "Variant": "SelectScatter",
+        "Keyspace": {
+          "Name": "main",
+          "Sharded": true
+        },
+        "FieldQuery": "select SUM(k) from sbtest43 where 1 != 1",
+        "Query": "select SUM(k) from sbtest43 where id between 90 and 990",
+        "Table": "sbtest43"
+      }
+    ]
+  }
+}
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT SUM(k) FROM sbtest43 WHERE id BETWEEN 90 AND 990",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "Aggregates": "sum(0) AS SUM(k)",
+    "Inputs": [
+      {
+        "OperatorType": "Route",
+        "Variant": "SelectScatter",
+        "Keyspace": {
+          "Name": "main",
+          "Sharded": true
+        },
+        "FieldQuery": "select SUM(k) from sbtest43 where 1 != 1",
+        "Query": "select SUM(k) from sbtest43 where id between 90 and 990",
+        "Table": "sbtest43"
+      }
+    ]
+  }
+}
+
+# OLTP order range select
+"SELECT c FROM sbtest1 WHERE id BETWEEN 50 AND 235 ORDER BY c"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c FROM sbtest1 WHERE id BETWEEN 50 AND 235 ORDER BY c",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectScatter",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c, weight_string(c) from sbtest1 where 1 != 1",
+    "OrderBy": "(0|1) ASC",
+    "Query": "select c, weight_string(c) from sbtest1 where id between 50 and 235 order by c asc",
+    "ResultColumns": 1,
+    "Table": "sbtest1"
+  }
+}
+Gen4 plan same as above
+
+# OLTP distinct range select
+"SELECT DISTINCT c FROM sbtest30 WHERE id BETWEEN 1 AND 10 ORDER BY c"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT DISTINCT c FROM sbtest30 WHERE id BETWEEN 1 AND 10 ORDER BY c",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "GroupBy": "1",
+    "ResultColumns": 1,
+    "Inputs": [
+      {
+        "OperatorType": "Route",
+        "Variant": "SelectScatter",
+        "Keyspace": {
+          "Name": "main",
+          "Sharded": true
+        },
+        "FieldQuery": "select c, weight_string(c) from sbtest30 where 1 != 1",
+        "OrderBy": "(0|1) ASC",
+        "Query": "select distinct c, weight_string(c) from sbtest30 where id between 1 and 10 order by c asc",
+        "ResultColumns": 2,
+        "Table": "sbtest30"
+      }
+    ]
+  }
+}
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT DISTINCT c FROM sbtest30 WHERE id BETWEEN 1 AND 10 ORDER BY c",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "GroupBy": "(0|1)",
+    "ResultColumns": 1,
+    "Inputs": [
+      {
+        "OperatorType": "Route",
+        "Variant": "SelectScatter",
+        "Keyspace": {
+          "Name": "main",
+          "Sharded": true
+        },
+        "FieldQuery": "select c, weight_string(c) from sbtest30 where 1 != 1",
+        "OrderBy": "(0|1) ASC, (0|1) ASC",
+        "Query": "select distinct c, weight_string(c) from sbtest30 where id between 1 and 10 order by c asc, c asc",
+        "Table": "sbtest30"
+      }
+    ]
+  }
+}
+
+# OLTP index udpate
+"UPDATE sbtest6 SET k=k+1 WHERE id=5"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE sbtest6 SET k=k+1 WHERE id=5",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update sbtest6 set k = k + 1 where id = 5",
+    "Table": "sbtest6",
+    "Values": [
+      5
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# OLTP non index update
+"UPDATE sbtest9 SET c=7 WHERE id=8"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE sbtest9 SET c=7 WHERE id=8",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update sbtest9 set c = 7 where id = 8",
+    "Table": "sbtest9",
+    "Values": [
+      8
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# OLTP delete
+"DELETE FROM sbtest15 WHERE id=7525"
+{
+  "QueryType": "DELETE",
+  "Original": "DELETE FROM sbtest15 WHERE id=7525",
+  "Instructions": {
+    "OperatorType": "Delete",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "delete from sbtest15 where id = 7525",
+    "Table": "sbtest15",
+    "Values": [
+      7525
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# OLTP insert
+"INSERT INTO sbtest16 (id, k, c, pad) VALUES (42, 1, 2, 50)"
+{
+  "QueryType": "INSERT",
+  "Original": "INSERT INTO sbtest16 (id, k, c, pad) VALUES (42, 1, 2, 50)",
+  "Instructions": {
+    "OperatorType": "Insert",
+    "Variant": "Sharded",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "insert into sbtest16(id, k, c, pad) values (:_id_0, 1, 2, 50)",
+    "TableName": "sbtest16"
+  }
+}
+Gen4 plan same as above
diff --git a/go/vt/vtgate/planbuilder/testdata/oltp_schema_test.json b/go/vt/vtgate/planbuilder/testdata/oltp_schema_test.json
new file mode 100644
index 0000000000..d002a61e81
--- /dev/null
+++ b/go/vt/vtgate/planbuilder/testdata/oltp_schema_test.json
@@ -0,0 +1,4514 @@
+{
+  "keyspaces": {
+    "main": {
+      "sharded": true,
+      "vindexes": {
+        "hash": {
+          "type": "hash"
+        }
+      },
+      "tables": {
+        "sbtest1":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest2":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest3":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest4":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest5":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest6":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest7":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest8":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest9":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest10":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest11":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest12":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest13":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest14":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest15":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest16":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest17":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest18":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest19":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest20":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest21":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest22":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest23":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest24":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest25":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest26":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest27":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest28":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest29":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest30":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest31":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest32":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest33":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest34":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest35":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest36":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest37":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest38":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest39":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest40":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest41":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest42":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest43":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest44":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest45":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest46":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest47":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest48":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest49":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest50":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest51":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest52":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest53":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest54":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest55":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest56":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest57":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest58":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest59":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest60":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest61":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest62":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest63":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest64":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest65":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest66":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest67":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest68":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest69":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest70":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest71":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest72":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest73":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest74":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest75":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest76":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest77":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest78":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest79":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest80":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest81":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest82":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest83":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest84":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest85":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest86":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest87":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest88":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest89":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest90":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest91":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest92":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest93":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest94":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest95":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest96":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest97":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest98":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest99":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest100":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest101":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest102":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest103":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest104":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest105":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest106":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest107":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest108":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest109":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest110":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest111":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest112":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest113":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest114":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest115":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest116":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest117":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest118":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest119":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest120":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest121":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest122":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest123":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest124":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest125":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest126":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest127":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest128":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest129":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest130":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest131":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest132":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest133":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest134":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest135":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest136":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest137":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest138":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest139":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest140":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest141":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest142":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest143":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest144":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest145":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest146":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest147":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest148":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest149":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest150":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest151":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest152":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest153":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest154":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest155":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest156":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest157":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest158":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest159":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest160":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest161":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest162":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest163":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest164":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest165":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest166":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest167":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest168":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest169":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest170":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest171":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest172":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest173":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest174":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest175":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest176":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest177":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest178":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest179":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest180":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest181":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest182":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest183":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest184":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest185":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest186":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest187":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest188":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest189":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest190":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest191":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest192":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest193":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest194":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest195":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest196":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest197":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest198":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest199":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest200":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest201":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest202":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest203":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest204":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest205":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest206":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest207":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest208":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest209":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest210":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest211":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest212":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest213":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest214":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest215":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest216":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest217":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest218":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest219":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest220":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest221":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest222":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest223":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest224":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest225":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest226":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest227":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest228":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest229":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest230":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest231":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest232":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest233":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest234":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest235":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest236":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest237":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest238":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest239":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest240":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest241":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest242":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest243":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest244":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest245":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest246":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest247":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest248":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest249":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        },
+        "sbtest250":  {
+          "column_vindexes": [
+            {
+              "column": "id",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c",
+              "type": "CHAR"
+            },
+            {
+              "name": "pad",
+              "type": "CHAR"
+            }
+          ]
+        }
+      }
+    }
+  }
+}
diff --git a/go/vt/vtgate/planbuilder/testdata/tpcc_cases.txt b/go/vt/vtgate/planbuilder/testdata/tpcc_cases.txt
new file mode 100644
index 0000000000..1cdc65a1b2
--- /dev/null
+++ b/go/vt/vtgate/planbuilder/testdata/tpcc_cases.txt
@@ -0,0 +1,985 @@
+# TPC-C select join customer1 and warehouse1
+"SELECT c_discount, c_last, c_credit, w_tax FROM customer1 AS c JOIN warehouse1 AS w ON c_w_id=w_id WHERE w_id = 1 AND c_d_id = 15 AND c_id = 10"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c_discount, c_last, c_credit, w_tax FROM customer1 AS c JOIN warehouse1 AS w ON c_w_id=w_id WHERE w_id = 1 AND c_d_id = 15 AND c_id = 10",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where 1 != 1",
+    "Query": "select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = 1 and c_d_id = 15 and c_id = 10",
+    "Table": "customer1, warehouse1",
+    "Values": [
+      1
+    ],
+    "Vindex": "hash"
+  }
+}
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c_discount, c_last, c_credit, w_tax FROM customer1 AS c JOIN warehouse1 AS w ON c_w_id=w_id WHERE w_id = 1 AND c_d_id = 15 AND c_id = 10",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c_discount, c_last, c_credit, w_tax from customer1 as c, warehouse1 as w where 1 != 1",
+    "Query": "select c_discount, c_last, c_credit, w_tax from customer1 as c, warehouse1 as w where c_d_id = 15 and c_id = 10 and w_id = 1 and c_w_id = w_id",
+    "Table": "customer1, warehouse1",
+    "Values": [
+      1
+    ],
+    "Vindex": "hash"
+  }
+}
+
+# TPC-C select district1 for update
+"SELECT d_next_o_id, d_tax FROM district1 WHERE d_w_id = 15 AND d_id = 95 FOR UPDATE"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT d_next_o_id, d_tax FROM district1 WHERE d_w_id = 15 AND d_id = 95 FOR UPDATE",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select d_next_o_id, d_tax from district1 where 1 != 1",
+    "Query": "select d_next_o_id, d_tax from district1 where d_w_id = 15 and d_id = 95 for update",
+    "Table": "district1",
+    "Values": [
+      15
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update district1 unique
+"UPDATE district1 SET d_next_o_id = 56 WHERE d_id = 9842 AND d_w_id= 8546"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE district1 SET d_next_o_id = 56 WHERE d_id = 9842 AND d_w_id= 8546",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update district1 set d_next_o_id = 56 where d_id = 9842 and d_w_id = 8546",
+    "Table": "district1",
+    "Values": [
+      8546
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C insert into orders1
+"INSERT INTO orders1 (o_id, o_d_id, o_w_id, o_c_id,  o_entry_d, o_ol_cnt, o_all_local) VALUES (334983,59896,99,156,NOW(),781038,'hello')"
+{
+  "QueryType": "INSERT",
+  "Original": "INSERT INTO orders1 (o_id, o_d_id, o_w_id, o_c_id,  o_entry_d, o_ol_cnt, o_all_local) VALUES (334983,59896,99,156,NOW(),781038,'hello')",
+  "Instructions": {
+    "OperatorType": "Insert",
+    "Variant": "Sharded",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "insert into orders1(o_id, o_d_id, o_w_id, o_c_id, o_entry_d, o_ol_cnt, o_all_local) values (334983, 59896, :_o_w_id_0, 156, NOW(), 781038, 'hello')",
+    "TableName": "orders1"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C insert into new_orders1
+"INSERT INTO new_orders1 (no_o_id, no_d_id, no_w_id) VALUES (8,9,48)"
+{
+  "QueryType": "INSERT",
+  "Original": "INSERT INTO new_orders1 (no_o_id, no_d_id, no_w_id) VALUES (8,9,48)",
+  "Instructions": {
+    "OperatorType": "Insert",
+    "Variant": "Sharded",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "insert into new_orders1(no_o_id, no_d_id, no_w_id) values (8, 9, :_no_w_id_0)",
+    "TableName": "new_orders1"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select unique item1
+"SELECT i_price, i_name, i_data FROM item1 WHERE i_id = 9654"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT i_price, i_name, i_data FROM item1 WHERE i_id = 9654",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select i_price, i_name, i_data from item1 where 1 != 1",
+    "Query": "select i_price, i_name, i_data from item1 where i_id = 9654",
+    "Table": "item1",
+    "Values": [
+      9654
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select stock1 for update
+"SELECT s_quantity, s_data, s_dist_01 s_dist FROM stock1 WHERE s_i_id = 2198 AND s_w_id = 89 FOR UPDATE"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT s_quantity, s_data, s_dist_01 s_dist FROM stock1 WHERE s_i_id = 2198 AND s_w_id = 89 FOR UPDATE",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select s_quantity, s_data, s_dist_01 as s_dist from stock1 where 1 != 1",
+    "Query": "select s_quantity, s_data, s_dist_01 as s_dist from stock1 where s_i_id = 2198 and s_w_id = 89 for update",
+    "Table": "stock1",
+    "Values": [
+      89
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update stock1
+"UPDATE stock1 SET s_quantity = 894 WHERE s_i_id = 156 AND s_w_id= 6"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE stock1 SET s_quantity = 894 WHERE s_i_id = 156 AND s_w_id= 6",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update stock1 set s_quantity = 894 where s_i_id = 156 and s_w_id = 6",
+    "Table": "stock1",
+    "Values": [
+      6
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C insert into order_line1
+"INSERT INTO order_line1 (ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info) VALUES (648,36812,3201,4946378,3,7,89,1,'info')"
+{
+  "QueryType": "INSERT",
+  "Original": "INSERT INTO order_line1 (ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info) VALUES (648,36812,3201,4946378,3,7,89,1,'info')",
+  "Instructions": {
+    "OperatorType": "Insert",
+    "Variant": "Sharded",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "insert into order_line1(ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info) values (648, 36812, :_ol_w_id_0, 4946378, 3, 7, 89, 1, 'info')",
+    "TableName": "order_line1"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update warehouse1 unique
+"UPDATE warehouse1 SET w_ytd = w_ytd + 946879 WHERE w_id = 3"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE warehouse1 SET w_ytd = w_ytd + 946879 WHERE w_id = 3",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update warehouse1 set w_ytd = w_ytd + 946879 where w_id = 3",
+    "Table": "warehouse1",
+    "Values": [
+      3
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select warehouse1 unique
+"SELECT w_street_1, w_street_2, w_city, w_state, w_zip, w_name FROM warehouse1 WHERE w_id = 998"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT w_street_1, w_street_2, w_city, w_state, w_zip, w_name FROM warehouse1 WHERE w_id = 998",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select w_street_1, w_street_2, w_city, w_state, w_zip, w_name from warehouse1 where 1 != 1",
+    "Query": "select w_street_1, w_street_2, w_city, w_state, w_zip, w_name from warehouse1 where w_id = 998",
+    "Table": "warehouse1",
+    "Values": [
+      998
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update district1 unique
+"UPDATE district1 SET d_ytd = d_ytd + 2 WHERE d_w_id = 89 AND d_id= 9"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE district1 SET d_ytd = d_ytd + 2 WHERE d_w_id = 89 AND d_id= 9",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update district1 set d_ytd = d_ytd + 2 where d_w_id = 89 and d_id = 9",
+    "Table": "district1",
+    "Values": [
+      89
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select district1 unique
+"SELECT d_street_1, d_street_2, d_city, d_state, d_zip, d_name FROM district1 WHERE d_w_id = 896 AND d_id = 9"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT d_street_1, d_street_2, d_city, d_state, d_zip, d_name FROM district1 WHERE d_w_id = 896 AND d_id = 9",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select d_street_1, d_street_2, d_city, d_state, d_zip, d_name from district1 where 1 != 1",
+    "Query": "select d_street_1, d_street_2, d_city, d_state, d_zip, d_name from district1 where d_w_id = 896 and d_id = 9",
+    "Table": "district1",
+    "Values": [
+      896
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select aggr from customer1
+"SELECT count(c_id) namecnt FROM customer1 WHERE c_w_id = 5 AND c_d_id= 1 AND c_last='last'"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT count(c_id) namecnt FROM customer1 WHERE c_w_id = 5 AND c_d_id= 1 AND c_last='last'",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select count(c_id) as namecnt from customer1 where 1 != 1",
+    "Query": "select count(c_id) as namecnt from customer1 where c_w_id = 5 and c_d_id = 1 and c_last = 'last'",
+    "Table": "customer1",
+    "Values": [
+      5
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select customer1 order by
+"SELECT c_id FROM customer1 WHERE c_w_id = 8 AND c_d_id = 5 AND c_last='item_last' ORDER BY c_first"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c_id FROM customer1 WHERE c_w_id = 8 AND c_d_id = 5 AND c_last='item_last' ORDER BY c_first",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c_id from customer1 where 1 != 1",
+    "Query": "select c_id from customer1 where c_w_id = 8 and c_d_id = 5 and c_last = 'item_last' order by c_first asc",
+    "Table": "customer1",
+    "Values": [
+      8
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select for update customer1 unique
+"SELECT c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since FROM customer1 WHERE c_w_id = 8965 AND c_d_id = 1 AND c_id = 9 FOR UPDATE"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since FROM customer1 WHERE c_w_id = 8965 AND c_d_id = 1 AND c_id = 9 FOR UPDATE",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where 1 != 1",
+    "Query": "select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = 8965 and c_d_id = 1 and c_id = 9 for update",
+    "Table": "customer1",
+    "Values": [
+      8965
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select customer1 unique
+"SELECT c_data FROM customer1 WHERE c_w_id = 32 AND c_d_id=68 AND c_id = 5"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c_data FROM customer1 WHERE c_w_id = 32 AND c_d_id=68 AND c_id = 5",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c_data from customer1 where 1 != 1",
+    "Query": "select c_data from customer1 where c_w_id = 32 and c_d_id = 68 and c_id = 5",
+    "Table": "customer1",
+    "Values": [
+      32
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update customer1 unique and float value
+"UPDATE customer1 SET c_balance=508.98, c_ytd_payment=48941.980301, c_data='i am data' WHERE c_w_id = 20  AND c_d_id=387 AND c_id=98"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE customer1 SET c_balance=508.98, c_ytd_payment=48941.980301, c_data='i am data' WHERE c_w_id = 20  AND c_d_id=387 AND c_id=98",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update customer1 set c_balance = 508.98, c_ytd_payment = 48941.980301, c_data = 'i am data' where c_w_id = 20 and c_d_id = 387 and c_id = 98",
+    "Table": "customer1",
+    "Values": [
+      20
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update customer1 unique and float value
+"UPDATE customer1 SET c_balance=508.98, c_ytd_payment=48941.980301 WHERE c_w_id = 20  AND c_d_id=387 AND c_id=98"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE customer1 SET c_balance=508.98, c_ytd_payment=48941.980301 WHERE c_w_id = 20  AND c_d_id=387 AND c_id=98",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update customer1 set c_balance = 508.98, c_ytd_payment = 48941.980301 where c_w_id = 20 and c_d_id = 387 and c_id = 98",
+    "Table": "customer1",
+    "Values": [
+      20
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C insert into history1
+"INSERT INTO history1 (h_c_d_id, h_c_w_id, h_c_id, h_d_id,  h_w_id, h_date, h_amount, h_data) VALUES (6809887,38748,8746,210,8,NOW(),8907,'data')"
+{
+  "QueryType": "INSERT",
+  "Original": "INSERT INTO history1 (h_c_d_id, h_c_w_id, h_c_id, h_d_id,  h_w_id, h_date, h_amount, h_data) VALUES (6809887,38748,8746,210,8,NOW(),8907,'data')",
+  "Instructions": {
+    "OperatorType": "Insert",
+    "Variant": "Sharded",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "insert into history1(h_c_d_id, h_c_w_id, h_c_id, h_d_id, h_w_id, h_date, h_amount, h_data) values (6809887, 38748, 8746, 210, :_h_w_id_0, NOW(), 8907, 'data')",
+    "TableName": "history1"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select aggr customer1
+"SELECT count(c_id) namecnt FROM customer1 WHERE c_w_id = 870 AND c_d_id= 780 AND c_last='last'"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT count(c_id) namecnt FROM customer1 WHERE c_w_id = 870 AND c_d_id= 780 AND c_last='last'",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select count(c_id) as namecnt from customer1 where 1 != 1",
+    "Query": "select count(c_id) as namecnt from customer1 where c_w_id = 870 and c_d_id = 780 and c_last = 'last'",
+    "Table": "customer1",
+    "Values": [
+      870
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select order by customer1
+"SELECT c_balance, c_first, c_middle, c_id FROM customer1 WHERE c_w_id = 840 AND c_d_id= 1 AND c_last='test' ORDER BY c_first"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c_balance, c_first, c_middle, c_id FROM customer1 WHERE c_w_id = 840 AND c_d_id= 1 AND c_last='test' ORDER BY c_first",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c_balance, c_first, c_middle, c_id from customer1 where 1 != 1",
+    "Query": "select c_balance, c_first, c_middle, c_id from customer1 where c_w_id = 840 and c_d_id = 1 and c_last = 'test' order by c_first asc",
+    "Table": "customer1",
+    "Values": [
+      840
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select unique customer1
+"SELECT c_balance, c_first, c_middle, c_last FROM customer1 WHERE c_w_id = 15 AND c_d_id=5169 AND c_id=1"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT c_balance, c_first, c_middle, c_last FROM customer1 WHERE c_w_id = 15 AND c_d_id=5169 AND c_id=1",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select c_balance, c_first, c_middle, c_last from customer1 where 1 != 1",
+    "Query": "select c_balance, c_first, c_middle, c_last from customer1 where c_w_id = 15 and c_d_id = 5169 and c_id = 1",
+    "Table": "customer1",
+    "Values": [
+      15
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select order by orders1
+"SELECT o_id, o_carrier_id, o_entry_d FROM orders1 WHERE o_w_id = 9894 AND o_d_id = 3 AND o_c_id = 159 ORDER BY o_id DESC"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT o_id, o_carrier_id, o_entry_d FROM orders1 WHERE o_w_id = 9894 AND o_d_id = 3 AND o_c_id = 159 ORDER BY o_id DESC",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select o_id, o_carrier_id, o_entry_d from orders1 where 1 != 1",
+    "Query": "select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = 9894 and o_d_id = 3 and o_c_id = 159 order by o_id desc",
+    "Table": "orders1",
+    "Values": [
+      9894
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select order_line1
+"SELECT ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d FROM order_line1 WHERE ol_w_id = 92 AND ol_d_id = 5  AND ol_o_id = 1"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d FROM order_line1 WHERE ol_w_id = 92 AND ol_d_id = 5  AND ol_o_id = 1",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d from order_line1 where 1 != 1",
+    "Query": "select ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d from order_line1 where ol_w_id = 92 and ol_d_id = 5 and ol_o_id = 1",
+    "Table": "order_line1",
+    "Values": [
+      92
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select for update new_orders1
+"SELECT no_o_id FROM new_orders1 WHERE no_d_id = 689 AND no_w_id = 15 ORDER BY no_o_id ASC LIMIT 1 FOR UPDATE"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT no_o_id FROM new_orders1 WHERE no_d_id = 689 AND no_w_id = 15 ORDER BY no_o_id ASC LIMIT 1 FOR UPDATE",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select no_o_id from new_orders1 where 1 != 1",
+    "Query": "select no_o_id from new_orders1 where no_d_id = 689 and no_w_id = 15 order by no_o_id asc limit 1 for update",
+    "Table": "new_orders1",
+    "Values": [
+      15
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C delete new_orders1
+"DELETE FROM new_orders1 WHERE no_o_id = 2218 AND no_d_id = 358 AND no_w_id = 98465"
+{
+  "QueryType": "DELETE",
+  "Original": "DELETE FROM new_orders1 WHERE no_o_id = 2218 AND no_d_id = 358 AND no_w_id = 98465",
+  "Instructions": {
+    "OperatorType": "Delete",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "delete from new_orders1 where no_o_id = 2218 and no_d_id = 358 and no_w_id = 98465",
+    "Table": "new_orders1",
+    "Values": [
+      98465
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select unique orders1
+"SELECT o_c_id FROM orders1 WHERE o_id = 6 AND o_d_id = 1983 AND o_w_id = 894605"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT o_c_id FROM orders1 WHERE o_id = 6 AND o_d_id = 1983 AND o_w_id = 894605",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select o_c_id from orders1 where 1 != 1",
+    "Query": "select o_c_id from orders1 where o_id = 6 and o_d_id = 1983 and o_w_id = 894605",
+    "Table": "orders1",
+    "Values": [
+      894605
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update orders1 unique
+"UPDATE orders1 SET o_carrier_id = 9 WHERE o_id = 56 AND o_d_id = 98 AND o_w_id = 897"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE orders1 SET o_carrier_id = 9 WHERE o_id = 56 AND o_d_id = 98 AND o_w_id = 897",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update orders1 set o_carrier_id = 9 where o_id = 56 and o_d_id = 98 and o_w_id = 897",
+    "Table": "orders1",
+    "Values": [
+      897
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update order_line1
+"UPDATE order_line1 SET ol_delivery_d = NOW() WHERE ol_o_id = 235 AND ol_d_id = 315 AND ol_w_id = 8"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE order_line1 SET ol_delivery_d = NOW() WHERE ol_o_id = 235 AND ol_d_id = 315 AND ol_w_id = 8",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update order_line1 set ol_delivery_d = NOW() where ol_o_id = 235 and ol_d_id = 315 and ol_w_id = 8",
+    "Table": "order_line1",
+    "Values": [
+      8
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select sum order_line1
+"SELECT SUM(ol_amount) sm FROM order_line1 WHERE ol_o_id = 680 AND ol_d_id = 201 AND ol_w_id = 87"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT SUM(ol_amount) sm FROM order_line1 WHERE ol_o_id = 680 AND ol_d_id = 201 AND ol_w_id = 87",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select SUM(ol_amount) as sm from order_line1 where 1 != 1",
+    "Query": "select SUM(ol_amount) as sm from order_line1 where ol_o_id = 680 and ol_d_id = 201 and ol_w_id = 87",
+    "Table": "order_line1",
+    "Values": [
+      87
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C update customer1
+"UPDATE customer1 SET c_balance = c_balance + 988.01, c_delivery_cnt = c_delivery_cnt + 1 WHERE c_id = 6 AND c_d_id = 5 AND c_w_id = 160"
+{
+  "QueryType": "UPDATE",
+  "Original": "UPDATE customer1 SET c_balance = c_balance + 988.01, c_delivery_cnt = c_delivery_cnt + 1 WHERE c_id = 6 AND c_d_id = 5 AND c_w_id = 160",
+  "Instructions": {
+    "OperatorType": "Update",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "update customer1 set c_balance = c_balance + 988.01, c_delivery_cnt = c_delivery_cnt + 1 where c_id = 6 and c_d_id = 5 and c_w_id = 160",
+    "Table": "customer1",
+    "Values": [
+      160
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select unique district1
+"SELECT d_next_o_id FROM district1 WHERE d_id = 6 AND d_w_id= 21"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT d_next_o_id FROM district1 WHERE d_id = 6 AND d_w_id= 21",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select d_next_o_id from district1 where 1 != 1",
+    "Query": "select d_next_o_id from district1 where d_id = 6 and d_w_id = 21",
+    "Table": "district1",
+    "Values": [
+      21
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select count distinct stock1 join order_line1
+"SELECT COUNT(DISTINCT(s.s_i_id)) FROM stock1 AS s JOIN order_line1 AS ol ON ol.ol_w_id=s.s_w_id AND ol.ol_i_id=s.s_i_id WHERE ol.ol_w_id = 12 AND ol.ol_d_id = 1908 AND ol.ol_o_id < 30 AND ol.ol_o_id >= 15 AND s.s_w_id= 12 AND s.s_quantity < 10"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT COUNT(DISTINCT(s.s_i_id)) FROM stock1 AS s JOIN order_line1 AS ol ON ol.ol_w_id=s.s_w_id AND ol.ol_i_id=s.s_i_id WHERE ol.ol_w_id = 12 AND ol.ol_d_id = 1908 AND ol.ol_o_id \u003c 30 AND ol.ol_o_id \u003e= 15 AND s.s_w_id= 12 AND s.s_quantity \u003c 10",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select COUNT(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where 1 != 1",
+    "Query": "select COUNT(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where ol.ol_w_id = 12 and ol.ol_d_id = 1908 and ol.ol_o_id \u003c 30 and ol.ol_o_id \u003e= 15 and s.s_w_id = 12 and s.s_quantity \u003c 10",
+    "Table": "stock1, order_line1",
+    "Values": [
+      12
+    ],
+    "Vindex": "hash"
+  }
+}
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT COUNT(DISTINCT(s.s_i_id)) FROM stock1 AS s JOIN order_line1 AS ol ON ol.ol_w_id=s.s_w_id AND ol.ol_i_id=s.s_i_id WHERE ol.ol_w_id = 12 AND ol.ol_d_id = 1908 AND ol.ol_o_id \u003c 30 AND ol.ol_o_id \u003e= 15 AND s.s_w_id= 12 AND s.s_quantity \u003c 10",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select COUNT(distinct s.s_i_id) from stock1 as s, order_line1 as ol where 1 != 1",
+    "Query": "select COUNT(distinct s.s_i_id) from stock1 as s, order_line1 as ol where s.s_w_id = 12 and s.s_quantity \u003c 10 and ol.ol_w_id = 12 and ol.ol_d_id = 1908 and ol.ol_o_id \u003c 30 and ol.ol_o_id \u003e= 15 and ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id",
+    "Table": "order_line1, stock1",
+    "Values": [
+      12
+    ],
+    "Vindex": "hash"
+  }
+}
+
+# TPC-C select distinct order_line1
+"SELECT DISTINCT ol_i_id FROM order_line1 WHERE ol_w_id = 1 AND ol_d_id = 156 AND ol_o_id < 500 AND ol_o_id >= 56"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT DISTINCT ol_i_id FROM order_line1 WHERE ol_w_id = 1 AND ol_d_id = 156 AND ol_o_id \u003c 500 AND ol_o_id \u003e= 56",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select ol_i_id from order_line1 where 1 != 1",
+    "Query": "select distinct ol_i_id from order_line1 where ol_w_id = 1 and ol_d_id = 156 and ol_o_id \u003c 500 and ol_o_id \u003e= 56",
+    "Table": "order_line1",
+    "Values": [
+      1
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C
+"SELECT count(*) FROM stock1 WHERE s_w_id = 1 AND s_i_id = 8 AND s_quantity < 1000"
+{
+  "QueryType": "SELECT",
+  "Original": "SELECT count(*) FROM stock1 WHERE s_w_id = 1 AND s_i_id = 8 AND s_quantity \u003c 1000",
+  "Instructions": {
+    "OperatorType": "Route",
+    "Variant": "SelectEqualUnique",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "FieldQuery": "select count(*) from stock1 where 1 != 1",
+    "Query": "select count(*) from stock1 where s_w_id = 1 and s_i_id = 8 and s_quantity \u003c 1000",
+    "Table": "stock1",
+    "Values": [
+      1
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C select with subquery,aggr,distinct,having,limit
+"select o.o_id,o.o_d_id from orders1 o, (select o_c_id,o_w_id,o_d_id,count(distinct o_w_id),o_id from orders1 where o_w_id=1  and o_id > 2100 and o_id < 11153 group by o_c_id,o_d_id,o_w_id having count( distinct o_id) > 1 limit 1) t where t.o_w_id=o.o_w_id and t.o_d_id=o.o_d_id and t.o_c_id=o.o_c_id limit 1"
+{
+  "QueryType": "SELECT",
+  "Original": "select o.o_id,o.o_d_id from orders1 o, (select o_c_id,o_w_id,o_d_id,count(distinct o_w_id),o_id from orders1 where o_w_id=1  and o_id \u003e 2100 and o_id \u003c 11153 group by o_c_id,o_d_id,o_w_id having count( distinct o_id) \u003e 1 limit 1) t where t.o_w_id=o.o_w_id and t.o_d_id=o.o_d_id and t.o_c_id=o.o_c_id limit 1",
+  "Instructions": {
+    "OperatorType": "Limit",
+    "Count": 1,
+    "Inputs": [
+      {
+        "OperatorType": "Join",
+        "Variant": "Join",
+        "JoinColumnIndexes": "-1,-2",
+        "JoinVars": {
+          "o_o_c_id": 3,
+          "o_o_d_id": 1,
+          "o_o_w_id": 2
+        },
+        "TableName": "orders1_orders1",
+        "Inputs": [
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectScatter",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select o.o_id, o.o_d_id, o.o_w_id, o.o_c_id from orders1 as o where 1 != 1",
+            "Query": "select o.o_id, o.o_d_id, o.o_w_id, o.o_c_id from orders1 as o",
+            "Table": "orders1"
+          },
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectEqualUnique",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select 1 from (select o_c_id, o_w_id, o_d_id, count(distinct o_w_id), o_id from orders1 where 1 != 1 group by o_c_id, o_d_id, o_w_id) as t where 1 != 1",
+            "Query": "select 1 from (select o_c_id, o_w_id, o_d_id, count(distinct o_w_id), o_id from orders1 where o_w_id = 1 and o_id \u003e 2100 and o_id \u003c 11153 group by o_c_id, o_d_id, o_w_id having count(distinct o_id) \u003e 1 limit 1) as t where t.o_w_id = :o_o_w_id and t.o_d_id = :o_o_d_id and t.o_c_id = :o_o_c_id",
+            "Table": "orders1",
+            "Values": [
+              1
+            ],
+            "Vindex": "hash"
+          }
+        ]
+      }
+    ]
+  }
+}
+
+# TPC-C delete order_line1
+"DELETE FROM order_line1 where ol_w_id=178 AND ol_d_id=1 AND ol_o_id=84"
+{
+  "QueryType": "DELETE",
+  "Original": "DELETE FROM order_line1 where ol_w_id=178 AND ol_d_id=1 AND ol_o_id=84",
+  "Instructions": {
+    "OperatorType": "Delete",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "delete from order_line1 where ol_w_id = 178 and ol_d_id = 1 and ol_o_id = 84",
+    "Table": "order_line1",
+    "Values": [
+      178
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C delete orders1
+"DELETE FROM orders1 where o_w_id=1 AND o_d_id=3 and o_id=384"
+{
+  "QueryType": "DELETE",
+  "Original": "DELETE FROM orders1 where o_w_id=1 AND o_d_id=3 and o_id=384",
+  "Instructions": {
+    "OperatorType": "Delete",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "delete from orders1 where o_w_id = 1 and o_d_id = 3 and o_id = 384",
+    "Table": "orders1",
+    "Values": [
+      1
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
+
+# TPC-C delete history1
+"DELETE FROM history1 where h_w_id=75 AND h_d_id=102 LIMIT 10"
+{
+  "QueryType": "DELETE",
+  "Original": "DELETE FROM history1 where h_w_id=75 AND h_d_id=102 LIMIT 10",
+  "Instructions": {
+    "OperatorType": "Delete",
+    "Variant": "Equal",
+    "Keyspace": {
+      "Name": "main",
+      "Sharded": true
+    },
+    "TargetTabletType": "PRIMARY",
+    "MultiShardAutocommit": false,
+    "Query": "delete from history1 where h_w_id = 75 and h_d_id = 102 limit 10",
+    "Table": "history1",
+    "Values": [
+      75
+    ],
+    "Vindex": "hash"
+  }
+}
+Gen4 plan same as above
diff --git a/go/vt/vtgate/planbuilder/testdata/tpcc_schema_test.json b/go/vt/vtgate/planbuilder/testdata/tpcc_schema_test.json
new file mode 100644
index 0000000000..5dd36ea25d
--- /dev/null
+++ b/go/vt/vtgate/planbuilder/testdata/tpcc_schema_test.json
@@ -0,0 +1,86 @@
+{
+  "keyspaces": {
+    "main": {
+      "sharded": true,
+      "vindexes": {
+        "hash": {
+          "type": "hash"
+        }
+      },
+      "tables": {
+        "customer1": {
+          "column_vindexes": [
+            {
+              "column": "c_w_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "district1": {
+          "column_vindexes": [
+            {
+              "column": "d_w_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "history1": {
+          "column_vindexes": [
+            {
+              "column": "h_w_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "item1": {
+          "column_vindexes": [
+            {
+              "column": "i_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "new_orders1": {
+          "column_vindexes": [
+            {
+              "column": "no_w_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "order_line1": {
+          "column_vindexes": [
+            {
+              "column": "ol_w_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "orders1": {
+          "column_vindexes": [
+            {
+              "column": "o_w_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "stock1": {
+          "column_vindexes": [
+            {
+              "column": "s_w_id",
+              "name": "hash"
+            }
+          ]
+        },
+        "warehouse1": {
+          "column_vindexes": [
+            {
+              "column": "w_id",
+              "name": "hash"
+            }
+          ]
+        }
+      }
+    }
+  }
+}
diff --git a/go/vt/vtgate/planbuilder/testdata/tpch_cases.txt b/go/vt/vtgate/planbuilder/testdata/tpch_cases.txt
new file mode 100644
index 0000000000..8621c197ff
--- /dev/null
+++ b/go/vt/vtgate/planbuilder/testdata/tpch_cases.txt
@@ -0,0 +1,963 @@
+# TPC-H query 1
+"select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedprice) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_quantity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_disc, count(*) as count_order from lineitem where l_shipdate <= '1998-12-01' - interval '108' day group by l_returnflag, l_linestatus order by l_returnflag, l_linestatus"
+"unsupported: in scatter query: complex aggregate expression"
+Gen4 plan same as above
+
+# TPC-H query 2
+"select s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment from part, supplier, partsupp, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and p_size = 15 and p_type like '%BRASS' and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'EUROPE' and ps_supplycost = ( select min(ps_supplycost) from partsupp, supplier, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'EUROPE' ) order by s_acctbal desc, n_name, s_name, p_partkey limit 10"
+"symbol p_partkey not found"
+{
+  "QueryType": "SELECT",
+  "Original": "select s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment from part, supplier, partsupp, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and p_size = 15 and p_type like '%BRASS' and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'EUROPE' and ps_supplycost = ( select min(ps_supplycost) from partsupp, supplier, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'EUROPE' ) order by s_acctbal desc, n_name, s_name, p_partkey limit 10",
+  "Instructions": {
+    "OperatorType": "Limit",
+    "Count": 10,
+    "Inputs": [
+      {
+        "OperatorType": "Subquery",
+        "Variant": "PulloutValue",
+        "Inputs": [
+          {
+            "OperatorType": "Aggregate",
+            "Variant": "Ordered",
+            "Aggregates": "min(0) AS min(ps_supplycost)",
+            "Inputs": [
+              {
+                "OperatorType": "Join",
+                "Variant": "Join",
+                "JoinColumnIndexes": "-2",
+                "JoinVars": {
+                  "s_nationkey": 0
+                },
+                "TableName": "partsupp_supplier_nation_region",
+                "Inputs": [
+                  {
+                    "OperatorType": "Join",
+                    "Variant": "Join",
+                    "JoinColumnIndexes": "1,-2",
+                    "JoinVars": {
+                      "ps_suppkey": 0
+                    },
+                    "TableName": "partsupp_supplier",
+                    "Inputs": [
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectScatter",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select ps_suppkey, min(ps_supplycost) from partsupp where 1 != 1",
+                        "Query": "select ps_suppkey, min(ps_supplycost) from partsupp",
+                        "Table": "partsupp"
+                      },
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectEqualUnique",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select s_nationkey from supplier where 1 != 1",
+                        "Query": "select s_nationkey from supplier where s_suppkey = :ps_suppkey",
+                        "Table": "supplier",
+                        "Values": [
+                          ":ps_suppkey"
+                        ],
+                        "Vindex": "hash"
+                      }
+                    ]
+                  },
+                  {
+                    "OperatorType": "Join",
+                    "Variant": "Join",
+                    "JoinVars": {
+                      "n_nationkey": 0,
+                      "n_regionkey": 0
+                    },
+                    "TableName": "nation_region",
+                    "Inputs": [
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectScatter",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select n_regionkey, n_nationkey from nation where 1 != 1",
+                        "Query": "select n_regionkey, n_nationkey from nation",
+                        "Table": "nation"
+                      },
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectEqualUnique",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select 1 from region where 1 != 1",
+                        "Query": "select 1 from region where r_name = 'EUROPE' and r_regionkey = :n_regionkey and :s_nationkey = :n_nationkey",
+                        "Table": "region",
+                        "Values": [
+                          ":n_regionkey"
+                        ],
+                        "Vindex": "hash"
+                      }
+                    ]
+                  }
+                ]
+              }
+            ]
+          },
+          {
+            "OperatorType": "Sort",
+            "Variant": "Memory",
+            "OrderBy": "(0|8) DESC, (2|9) ASC, (1|10) ASC, (3|11) ASC",
+            "ResultColumns": 8,
+            "Inputs": [
+              {
+                "OperatorType": "Join",
+                "Variant": "Join",
+                "JoinColumnIndexes": "1,2,3,-2,-3,4,5,6,7,8,9,-4",
+                "JoinVars": {
+                  "ps_suppkey": 0
+                },
+                "TableName": "part_partsupp_supplier_nation_region",
+                "Inputs": [
+                  {
+                    "OperatorType": "Join",
+                    "Variant": "Join",
+                    "JoinColumnIndexes": "1,-1,-2,-3",
+                    "JoinVars": {
+                      "p_partkey": 0
+                    },
+                    "TableName": "part_partsupp",
+                    "Inputs": [
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectScatter",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select p_partkey, p_mfgr, weight_string(p_partkey) from part where 1 != 1",
+                        "Query": "select p_partkey, p_mfgr, weight_string(p_partkey) from part where p_size = 15 and p_type like '%BRASS'",
+                        "Table": "part"
+                      },
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectEqualUnique",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select ps_suppkey from partsupp where 1 != 1",
+                        "Query": "select ps_suppkey from partsupp where ps_supplycost = :__sq1 and ps_partkey = :p_partkey",
+                        "Table": "partsupp",
+                        "Values": [
+                          ":p_partkey"
+                        ],
+                        "Vindex": "partsupp_map"
+                      }
+                    ]
+                  },
+                  {
+                    "OperatorType": "Join",
+                    "Variant": "Join",
+                    "JoinColumnIndexes": "-2,-3,-4,-5,-6,-7,-8,-9,-10",
+                    "JoinVars": {
+                      "n_regionkey": 0,
+                      "s_suppkey": 0
+                    },
+                    "TableName": "supplier_nation_region",
+                    "Inputs": [
+                      {
+                        "OperatorType": "Join",
+                        "Variant": "Join",
+                        "JoinColumnIndexes": "-2,-3,-4,2,-5,-6,-7,-8,3,-9",
+                        "JoinVars": {
+                          "s_nationkey": 0,
+                          "s_suppkey": 0
+                        },
+                        "TableName": "supplier_nation",
+                        "Inputs": [
+                          {
+                            "OperatorType": "Route",
+                            "Variant": "SelectScatter",
+                            "Keyspace": {
+                              "Name": "main",
+                              "Sharded": true
+                            },
+                            "FieldQuery": "select s_nationkey, s_suppkey, s_acctbal, s_name, s_address, s_phone, s_comment, weight_string(s_acctbal), weight_string(s_name) from supplier where 1 != 1",
+                            "Query": "select s_nationkey, s_suppkey, s_acctbal, s_name, s_address, s_phone, s_comment, weight_string(s_acctbal), weight_string(s_name) from supplier",
+                            "Table": "supplier"
+                          },
+                          {
+                            "OperatorType": "Route",
+                            "Variant": "SelectEqualUnique",
+                            "Keyspace": {
+                              "Name": "main",
+                              "Sharded": true
+                            },
+                            "FieldQuery": "select n_regionkey, n_name, weight_string(n_name) from nation where 1 != 1",
+                            "Query": "select n_regionkey, n_name, weight_string(n_name) from nation where n_nationkey = :s_nationkey",
+                            "Table": "nation",
+                            "Values": [
+                              ":s_nationkey"
+                            ],
+                            "Vindex": "hash"
+                          }
+                        ]
+                      },
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectEqualUnique",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select 1 from region where 1 != 1",
+                        "Query": "select 1 from region where r_name = 'EUROPE' and r_regionkey = :n_regionkey and :s_suppkey = :ps_suppkey",
+                        "Table": "region",
+                        "Values": [
+                          ":n_regionkey"
+                        ],
+                        "Vindex": "hash"
+                      }
+                    ]
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+}
+
+# TPC-H query 3
+"select l_orderkey, sum(l_extendedprice * (1 - l_discount)) as revenue, o_orderdate, o_shippriority from customer, orders, lineitem where c_mktsegment = 'BUILDING' and c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate < date('1995-03-15') and l_shipdate > date('1995-03-15') group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10"
+"unsupported: cross-shard query with aggregates"
+{
+  "QueryType": "SELECT",
+  "Original": "select l_orderkey, sum(l_extendedprice * (1 - l_discount)) as revenue, o_orderdate, o_shippriority from customer, orders, lineitem where c_mktsegment = 'BUILDING' and c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate \u003c date('1995-03-15') and l_shipdate \u003e date('1995-03-15') group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10",
+  "Instructions": {
+    "OperatorType": "Limit",
+    "Count": 10,
+    "Inputs": [
+      {
+        "OperatorType": "Sort",
+        "Variant": "Memory",
+        "OrderBy": "1 DESC, (2|5) ASC",
+        "ResultColumns": 4,
+        "Inputs": [
+          {
+            "OperatorType": "Aggregate",
+            "Variant": "Ordered",
+            "Aggregates": "sum(1) AS revenue",
+            "GroupBy": "(0|4), (2|5), (3|6)",
+            "Inputs": [
+              {
+                "OperatorType": "Sort",
+                "Variant": "Memory",
+                "OrderBy": "(0|4) ASC, (2|5) ASC, (3|6) ASC",
+                "Inputs": [
+                  {
+                    "OperatorType": "Join",
+                    "Variant": "Join",
+                    "JoinColumnIndexes": "1,2,-2,-3,3,-4,-5",
+                    "JoinVars": {
+                      "o_orderkey": 0
+                    },
+                    "TableName": "orders_customer_lineitem",
+                    "Inputs": [
+                      {
+                        "OperatorType": "Join",
+                        "Variant": "Join",
+                        "JoinColumnIndexes": "-2,-3,-4,-5,-6",
+                        "JoinVars": {
+                          "o_custkey": 0,
+                          "o_orderkey": 0
+                        },
+                        "TableName": "orders_customer",
+                        "Inputs": [
+                          {
+                            "OperatorType": "Route",
+                            "Variant": "SelectScatter",
+                            "Keyspace": {
+                              "Name": "main",
+                              "Sharded": true
+                            },
+                            "FieldQuery": "select o_custkey, o_orderkey, o_orderdate, o_shippriority, weight_string(o_orderdate), weight_string(o_shippriority) from orders where 1 != 1",
+                            "Query": "select o_custkey, o_orderkey, o_orderdate, o_shippriority, weight_string(o_orderdate), weight_string(o_shippriority) from orders where o_orderdate \u003c date('1995-03-15')",
+                            "Table": "orders"
+                          },
+                          {
+                            "OperatorType": "Route",
+                            "Variant": "SelectEqualUnique",
+                            "Keyspace": {
+                              "Name": "main",
+                              "Sharded": true
+                            },
+                            "FieldQuery": "select 1 from customer where 1 != 1",
+                            "Query": "select 1 from customer where c_mktsegment = 'BUILDING' and c_custkey = :o_custkey",
+                            "Table": "customer",
+                            "Values": [
+                              ":o_custkey"
+                            ],
+                            "Vindex": "hash"
+                          }
+                        ]
+                      },
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectEqualUnique",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select l_orderkey, sum(l_extendedprice * (1 - l_discount)) as revenue, weight_string(l_orderkey) from lineitem where 1 != 1",
+                        "Query": "select l_orderkey, sum(l_extendedprice * (1 - l_discount)) as revenue, weight_string(l_orderkey) from lineitem where l_shipdate \u003e date('1995-03-15') and l_orderkey = :o_orderkey",
+                        "Table": "lineitem",
+                        "Values": [
+                          ":o_orderkey"
+                        ],
+                        "Vindex": "lineitem_map"
+                      }
+                    ]
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+}
+
+# TPC-H query 4
+"select o_orderpriority, count(*) as order_count from orders where o_orderdate >= date('1993-07-01') and o_orderdate < date('1993-07-01') + interval '3' month and exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate ) group by o_orderpriority order by o_orderpriority"
+"unsupported: cross-shard query with aggregates"
+"gen4 does not yet support: *sqlparser.StarExpr in select list"
+
+# TPC-H query 5
+"select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue from customer, orders, lineitem, supplier, nation, region where c_custkey = o_custkey and l_orderkey = o_orderkey and l_suppkey = s_suppkey and c_nationkey = s_nationkey and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'ASIA' and o_orderdate >= date('1994-01-01') and o_orderdate < date('1994-01-01') + interval '1' year group by n_name order by revenue desc"
+"unsupported: cross-shard query with aggregates"
+# Gen4 output was commented out, using two joinVars introduces flakiness
+# {
+#   "QueryType": "SELECT",
+#   "Original": "select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue from customer, orders, lineitem, supplier, nation, region where c_custkey = o_custkey and l_orderkey = o_orderkey and l_suppkey = s_suppkey and c_nationkey = s_nationkey and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'ASIA' and o_orderdate \u003e= date('1994-01-01') and o_orderdate \u003c date('1994-01-01') + interval '1' year group by n_name order by revenue desc",
+#   "Instructions": {
+#     "OperatorType": "Sort",
+#     "Variant": "Memory",
+#     "OrderBy": "1 DESC",
+#     "ResultColumns": 2,
+#     "Inputs": [
+#       {
+#         "OperatorType": "Aggregate",
+#         "Variant": "Ordered",
+#         "Aggregates": "sum(1) AS revenue",
+#         "GroupBy": "(0|2)",
+#         "Inputs": [
+#           {
+#             "OperatorType": "Join",
+#             "Variant": "Join",
+#             "JoinColumnIndexes": "-2,1,-3",
+#             "JoinVars": {
+#               "n_nationkey": 0
+#             },
+#             "TableName": "nation_region_orders_customer_lineitem_supplier",
+#             "Inputs": [
+#               {
+#                 "OperatorType": "Join",
+#                 "Variant": "Join",
+#                 "JoinColumnIndexes": "-2,-3,-4",
+#                 "JoinVars": {
+#                   "n_nationkey": 0,
+#                   "n_regionkey": 0
+#                 },
+#                 "TableName": "nation_region",
+#                 "Inputs": [
+#                   {
+#                     "OperatorType": "Route",
+#                     "Variant": "SelectScatter",
+#                     "Keyspace": {
+#                       "Name": "main",
+#                       "Sharded": true
+#                     },
+#                     "FieldQuery": "select n_regionkey, n_nationkey, n_name, weight_string(n_name) from nation where 1 != 1",
+#                     "OrderBy": "(2|3) ASC",
+#                     "Query": "select n_regionkey, n_nationkey, n_name, weight_string(n_name) from nation order by n_name asc",
+#                     "Table": "nation"
+#                   },
+#                   {
+#                     "OperatorType": "Route",
+#                     "Variant": "SelectEqualUnique",
+#                     "Keyspace": {
+#                       "Name": "main",
+#                       "Sharded": true
+#                     },
+#                     "FieldQuery": "select 1 from region where 1 != 1",
+#                     "Query": "select 1 from region where r_name = 'ASIA' and r_regionkey = :n_regionkey",
+#                     "Table": "region",
+#                     "Values": [
+#                       ":n_regionkey"
+#                     ],
+#                     "Vindex": "hash"
+#                   }
+#                 ]
+#               },
+#               {
+#                 "OperatorType": "Join",
+#                 "Variant": "Join",
+#                 "JoinColumnIndexes": "1",
+#                 "JoinVars": {
+#                   "c_nationkey": 1,
+#                   "o_orderkey": 0
+#                 },
+#                 "TableName": "orders_customer_lineitem_supplier",
+#                 "Inputs": [
+#                   {
+#                     "OperatorType": "Join",
+#                     "Variant": "Join",
+#                     "JoinVars": {
+#                       "o_custkey": 0,
+#                       "o_orderkey": 0
+#                     },
+#                     "TableName": "orders_customer",
+#                     "Inputs": [
+#                       {
+#                         "OperatorType": "Route",
+#                         "Variant": "SelectScatter",
+#                         "Keyspace": {
+#                           "Name": "main",
+#                           "Sharded": true
+#                         },
+#                         "FieldQuery": "select o_custkey, o_orderkey from orders where 1 != 1",
+#                         "Query": "select o_custkey, o_orderkey from orders where o_orderdate \u003e= date('1994-01-01') and o_orderdate \u003c date('1994-01-01') + interval '1' year",
+#                         "Table": "orders"
+#                       },
+#                       {
+#                         "OperatorType": "Route",
+#                         "Variant": "SelectEqualUnique",
+#                         "Keyspace": {
+#                           "Name": "main",
+#                           "Sharded": true
+#                         },
+#                         "FieldQuery": "select c_nationkey from customer where 1 != 1",
+#                         "Query": "select c_nationkey from customer where c_custkey = :o_custkey",
+#                         "Table": "customer",
+#                         "Values": [
+#                           ":o_custkey"
+#                         ],
+#                         "Vindex": "hash"
+#                       }
+#                     ]
+#                   },
+#                   {
+#                     "OperatorType": "Join",
+#                     "Variant": "Join",
+#                     "JoinColumnIndexes": "-3",
+#                     "JoinVars": {
+#                       "l_orderkey": 0,
+#                       "l_suppkey": 0
+#                     },
+#                     "TableName": "lineitem_supplier",
+#                     "Inputs": [
+#                       {
+#                         "OperatorType": "Route",
+#                         "Variant": "SelectScatter",
+#                         "Keyspace": {
+#                           "Name": "main",
+#                           "Sharded": true
+#                         },
+#                         "FieldQuery": "select l_suppkey, l_orderkey, sum(l_extendedprice * (1 - l_discount)) as revenue from lineitem where 1 != 1",
+#                         "Query": "select l_suppkey, l_orderkey, sum(l_extendedprice * (1 - l_discount)) as revenue from lineitem",
+#                         "Table": "lineitem"
+#                       },
+#                       {
+#                         "OperatorType": "Route",
+#                         "Variant": "SelectEqualUnique",
+#                         "Keyspace": {
+#                           "Name": "main",
+#                           "Sharded": true
+#                         },
+#                         "FieldQuery": "select 1 from supplier where 1 != 1",
+#                         "Query": "select 1 from supplier where s_suppkey = :l_suppkey and :l_orderkey = :o_orderkey and s_nationkey = :c_nationkey and s_nationkey = :n_nationkey",
+#                         "Table": "supplier",
+#                         "Values": [
+#                           ":l_suppkey"
+#                         ],
+#                         "Vindex": "hash"
+#                       }
+#                     ]
+#                   }
+#                 ]
+#               }
+#             ]
+#           }
+#         ]
+#       }
+#     ]
+#   }
+# }
+
+# TPC-H query 6
+"select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate >= date('1994-01-01') and l_shipdate < date('1994-01-01') + interval '1' year and l_discount between 0.06 - 0.01 and 0.06 + 0.01 and l_quantity < 24"
+{
+  "QueryType": "SELECT",
+  "Original": "select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate \u003e= date('1994-01-01') and l_shipdate \u003c date('1994-01-01') + interval '1' year and l_discount between 0.06 - 0.01 and 0.06 + 0.01 and l_quantity \u003c 24",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "Aggregates": "sum(0)",
+    "Inputs": [
+      {
+        "OperatorType": "Route",
+        "Variant": "SelectScatter",
+        "Keyspace": {
+          "Name": "main",
+          "Sharded": true
+        },
+        "FieldQuery": "select sum(l_extendedprice * l_discount) as revenue from lineitem where 1 != 1",
+        "Query": "select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate \u003e= date('1994-01-01') and l_shipdate \u003c date('1994-01-01') + interval '1' year and l_discount between 0.06 - 0.01 and 0.06 + 0.01 and l_quantity \u003c 24",
+        "Table": "lineitem"
+      }
+    ]
+  }
+}
+{
+  "QueryType": "SELECT",
+  "Original": "select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate \u003e= date('1994-01-01') and l_shipdate \u003c date('1994-01-01') + interval '1' year and l_discount between 0.06 - 0.01 and 0.06 + 0.01 and l_quantity \u003c 24",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "Aggregates": "sum(0) AS revenue",
+    "Inputs": [
+      {
+        "OperatorType": "Route",
+        "Variant": "SelectScatter",
+        "Keyspace": {
+          "Name": "main",
+          "Sharded": true
+        },
+        "FieldQuery": "select sum(l_extendedprice * l_discount) as revenue from lineitem where 1 != 1",
+        "Query": "select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate \u003e= date('1994-01-01') and l_shipdate \u003c date('1994-01-01') + interval '1' year and l_discount between 0.06 - 0.01 and 0.06 + 0.01 and l_quantity \u003c 24",
+        "Table": "lineitem"
+      }
+    ]
+  }
+}
+
+# TPC-H query 7
+"select supp_nation, cust_nation, l_year, sum(volume) as revenue from (select n1.n_name as supp_nation, n2.n_name as cust_nation, extract(year from l_shipdate) as l_year, l_extendedprice * (1 - l_discount) as volume from supplier, lineitem, orders, customer, nation n1, nation n2 where s_suppkey = l_suppkey and o_orderkey = l_orderkey and c_custkey = o_custkey and s_nationkey = n1.n_nationkey and c_nationkey = n2.n_nationkey and ((n1.n_name = 'FRANCE' and n2.n_name = 'GERMANY') or (n1.n_name = 'GERMANY' and n2.n_name = 'FRANCE')) and l_shipdate between date('1995-01-01') and date('1996-12-31')) as shipping group by supp_nation, cust_nation, l_year order by supp_nation, cust_nation, l_year"
+"syntax error at position 147 near 'from'"
+Gen4 plan same as above
+
+# TPC-H query 8
+"select o_year, sum(case when nation = 'BRAZIL' then volume else 0 end) / sum(volume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier, lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_partkey and s_suppkey = l_suppkey and l_orderkey = o_orderkey and o_custkey = c_custkey and c_nationkey = n1.n_nationkey and n1.n_regionkey = r_regionkey and r_name = 'AMERICA' and s_nationkey = n2.n_nationkey and o_orderdate between date '1995-01-01' and date('1996-12-31') and p_type = 'ECONOMY ANODIZED STEEL' ) as all_nations group by o_year order by o_year"
+"syntax error at position 130 near 'from'"
+Gen4 plan same as above
+
+# TPC-H query 9
+"select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation, extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, orders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partkey = l_partkey and p_partkey = l_partkey and o_orderkey = l_orderkey and s_nationkey = n_nationkey and p_name like '%green%' ) as profit group by nation, o_year order by nation, o_year desc"
+"syntax error at position 99 near 'from'"
+Gen4 plan same as above
+
+# TPC-H query 10
+"select c_custkey, c_name, sum(l_extendedprice * (1 - l_discount)) as revenue, c_acctbal, n_name, c_address, c_phone, c_comment from customer, orders, lineitem, nation where c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate >= date('1993-10-01') and o_orderdate < date('1993-10-01') + interval '3' month and l_returnflag = 'R' and c_nationkey = n_nationkey group by c_custkey, c_name, c_acctbal, c_phone, n_name, c_address, c_comment order by revenue desc limit 20"
+"unsupported: cross-shard query with aggregates"
+{
+  "QueryType": "SELECT",
+  "Original": "select c_custkey, c_name, sum(l_extendedprice * (1 - l_discount)) as revenue, c_acctbal, n_name, c_address, c_phone, c_comment from customer, orders, lineitem, nation where c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate \u003e= date('1993-10-01') and o_orderdate \u003c date('1993-10-01') + interval '3' month and l_returnflag = 'R' and c_nationkey = n_nationkey group by c_custkey, c_name, c_acctbal, c_phone, n_name, c_address, c_comment order by revenue desc limit 20",
+  "Instructions": {
+    "OperatorType": "Limit",
+    "Count": 20,
+    "Inputs": [
+      {
+        "OperatorType": "Sort",
+        "Variant": "Memory",
+        "OrderBy": "2 DESC",
+        "ResultColumns": 8,
+        "Inputs": [
+          {
+            "OperatorType": "Aggregate",
+            "Variant": "Ordered",
+            "Aggregates": "sum(2) AS revenue",
+            "GroupBy": "(0|8), (1|9), (3|10), (6|11), (4|12), (5|13), (7|14)",
+            "Inputs": [
+              {
+                "OperatorType": "Join",
+                "Variant": "Join",
+                "JoinColumnIndexes": "-1,-2,1,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14",
+                "JoinVars": {
+                  "c_custkey": 0
+                },
+                "TableName": "customer_nation_orders_lineitem",
+                "Inputs": [
+                  {
+                    "OperatorType": "Sort",
+                    "Variant": "Memory",
+                    "OrderBy": "(0|7) ASC, (1|8) ASC, (2|9) ASC, (5|10) ASC, (3|11) ASC, (4|12) ASC, (6|13) ASC",
+                    "Inputs": [
+                      {
+                        "OperatorType": "Join",
+                        "Variant": "Join",
+                        "JoinColumnIndexes": "-2,-3,-4,1,-5,-6,-7,-8,-9,-10,-11,2,-12,-13",
+                        "JoinVars": {
+                          "c_custkey": 0,
+                          "c_nationkey": 0
+                        },
+                        "TableName": "customer_nation",
+                        "Inputs": [
+                          {
+                            "OperatorType": "Route",
+                            "Variant": "SelectScatter",
+                            "Keyspace": {
+                              "Name": "main",
+                              "Sharded": true
+                            },
+                            "FieldQuery": "select c_nationkey, c_custkey, c_name, c_acctbal, c_address, c_phone, c_comment, weight_string(c_custkey), weight_string(c_name), weight_string(c_acctbal), weight_string(c_phone), weight_string(c_address), weight_string(c_comment) from customer where 1 != 1",
+                            "Query": "select c_nationkey, c_custkey, c_name, c_acctbal, c_address, c_phone, c_comment, weight_string(c_custkey), weight_string(c_name), weight_string(c_acctbal), weight_string(c_phone), weight_string(c_address), weight_string(c_comment) from customer",
+                            "Table": "customer"
+                          },
+                          {
+                            "OperatorType": "Route",
+                            "Variant": "SelectEqualUnique",
+                            "Keyspace": {
+                              "Name": "main",
+                              "Sharded": true
+                            },
+                            "FieldQuery": "select n_name, weight_string(n_name) from nation where 1 != 1",
+                            "Query": "select n_name, weight_string(n_name) from nation where n_nationkey = :c_nationkey",
+                            "Table": "nation",
+                            "Values": [
+                              ":c_nationkey"
+                            ],
+                            "Vindex": "hash"
+                          }
+                        ]
+                      }
+                    ]
+                  },
+                  {
+                    "OperatorType": "Join",
+                    "Variant": "Join",
+                    "JoinColumnIndexes": "1",
+                    "JoinVars": {
+                      "o_custkey": 0,
+                      "o_orderkey": 0
+                    },
+                    "TableName": "orders_lineitem",
+                    "Inputs": [
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectScatter",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select o_orderkey, o_custkey from orders where 1 != 1",
+                        "Query": "select o_orderkey, o_custkey from orders where o_orderdate \u003e= date('1993-10-01') and o_orderdate \u003c date('1993-10-01') + interval '3' month",
+                        "Table": "orders"
+                      },
+                      {
+                        "OperatorType": "Route",
+                        "Variant": "SelectEqualUnique",
+                        "Keyspace": {
+                          "Name": "main",
+                          "Sharded": true
+                        },
+                        "FieldQuery": "select sum(l_extendedprice * (1 - l_discount)) as revenue from lineitem where 1 != 1",
+                        "Query": "select sum(l_extendedprice * (1 - l_discount)) as revenue from lineitem where l_returnflag = 'R' and l_orderkey = :o_orderkey and :c_custkey = :o_custkey",
+                        "Table": "lineitem",
+                        "Values": [
+                          ":o_orderkey"
+                        ],
+                        "Vindex": "lineitem_map"
+                      }
+                    ]
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+}
+
+# TPC-H query 11
+"select ps_partkey, sum(ps_supplycost * ps_availqty) as value from partsupp, supplier, nation where ps_suppkey = s_suppkey and s_nationkey = n_nationkey and n_name = 'GERMANY' group by ps_partkey  having sum(ps_supplycost * ps_availqty) > ( select sum(ps_supplycost * ps_availqty) * 0.00001000000 from partsupp, supplier, nation where ps_suppkey = s_suppkey and s_nationkey = n_nationkey and n_name = 'GERMANY' ) order by value desc"
+"unsupported: cross-shard query with aggregates"
+"gen4 does not yet support: HAVING"
+
+# TPC-H query 12
+"select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end) as low_line_count from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('MAIL', 'SHIP') and l_commitdate < l_receiptdate and l_shipdate < l_commitdate and l_receiptdate >= date('1994-01-01') and l_receiptdate < date('1994-01-01') + interval '1' year group by l_shipmode order by l_shipmode"
+"unsupported: cross-shard query with aggregates"
+{
+  "QueryType": "SELECT",
+  "Original": "select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority \u003c\u003e '1-URGENT' and o_orderpriority \u003c\u003e '2-HIGH' then 1 else 0 end) as low_line_count from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('MAIL', 'SHIP') and l_commitdate \u003c l_receiptdate and l_shipdate \u003c l_commitdate and l_receiptdate \u003e= date('1994-01-01') and l_receiptdate \u003c date('1994-01-01') + interval '1' year group by l_shipmode order by l_shipmode",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "Aggregates": "sum(1) AS high_line_count, sum(2) AS low_line_count",
+    "GroupBy": "(0|3)",
+    "ResultColumns": 3,
+    "Inputs": [
+      {
+        "OperatorType": "Sort",
+        "Variant": "Memory",
+        "OrderBy": "(0|3) ASC",
+        "Inputs": [
+          {
+            "OperatorType": "Join",
+            "Variant": "Join",
+            "JoinColumnIndexes": "1,-2,-3,2",
+            "JoinVars": {
+              "o_orderkey": 0
+            },
+            "TableName": "orders_lineitem",
+            "Inputs": [
+              {
+                "OperatorType": "Route",
+                "Variant": "SelectScatter",
+                "Keyspace": {
+                  "Name": "main",
+                  "Sharded": true
+                },
+                "FieldQuery": "select o_orderkey, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority != '1-URGENT' and o_orderpriority != '2-HIGH' then 1 else 0 end) as low_line_count from orders where 1 != 1",
+                "Query": "select o_orderkey, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority != '1-URGENT' and o_orderpriority != '2-HIGH' then 1 else 0 end) as low_line_count from orders",
+                "Table": "orders"
+              },
+              {
+                "OperatorType": "Route",
+                "Variant": "SelectEqualUnique",
+                "Keyspace": {
+                  "Name": "main",
+                  "Sharded": true
+                },
+                "FieldQuery": "select l_shipmode, weight_string(l_shipmode) from lineitem where 1 != 1",
+                "Query": "select l_shipmode, weight_string(l_shipmode) from lineitem where l_shipmode in ('MAIL', 'SHIP') and l_commitdate \u003c l_receiptdate and l_shipdate \u003c l_commitdate and l_receiptdate \u003e= date('1994-01-01') and l_receiptdate \u003c date('1994-01-01') + interval '1' year and l_orderkey = :o_orderkey",
+                "Table": "lineitem",
+                "Values": [
+                  ":o_orderkey"
+                ],
+                "Vindex": "lineitem_map"
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+}
+
+# TPC-H query 13
+"select c_count, count(*) as custdist from ( select c_custkey, count(o_orderkey) from customer left outer join orders on c_custkey = o_custkey and o_comment not like '%special%requests%' group by c_custkey ) as c_orders(c_custkey, c_count) group by c_count order by custdist desc, c_count desc"
+"syntax error at position 220"
+Gen4 plan same as above
+
+# TPC-H query 14
+"select 100.00 * sum(case when p_type like 'PROMO%' then l_extendedprice * (1 - l_discount) else 0 end) /  sum(l_extendedprice * (1 - l_discount)) as promo_revenue from lineitem, part where l_partkey = p_partkey and l_shipdate >= date('1995-09-01') and l_shipdate < date('1995-09-01') + interval '1' month"
+"unsupported: cross-shard query with aggregates"
+Gen4 error: unsupported: in scatter query: complex aggregate expression
+
+# TPC-H query 15 view
+"with revenue0(supplier_no, total_revenue) as (select l_suppkey, sum(l_extendedprice * (1 - l_discount))  from lineitem where l_shipdate >= date('1996-01-01') and l_shipdate < date('1996-01-01') + interval '3' month group by l_suppkey )"
+"syntax error at position 5 near 'with'"
+Gen4 plan same as above
+
+# TPC-H query 15
+"select s_suppkey, s_name, s_address, s_phone, total_revenue from supplier, revenue0 where s_suppkey = supplier_no and total_revenue = ( select max(total_revenue) from revenue0 ) order by s_suppkey"
+{
+  "QueryType": "SELECT",
+  "Original": "select s_suppkey, s_name, s_address, s_phone, total_revenue from supplier, revenue0 where s_suppkey = supplier_no and total_revenue = ( select max(total_revenue) from revenue0 ) order by s_suppkey",
+  "Instructions": {
+    "OperatorType": "Subquery",
+    "Variant": "PulloutValue",
+    "Inputs": [
+      {
+        "OperatorType": "Aggregate",
+        "Variant": "Ordered",
+        "Aggregates": "max(0)",
+        "Inputs": [
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectScatter",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select max(total_revenue) from revenue0 where 1 != 1",
+            "Query": "select max(total_revenue) from revenue0",
+            "Table": "revenue0"
+          }
+        ]
+      },
+      {
+        "OperatorType": "Join",
+        "Variant": "Join",
+        "JoinColumnIndexes": "-1,-2,-3,-4,1",
+        "JoinVars": {
+          "s_suppkey": 0
+        },
+        "TableName": "supplier_revenue0",
+        "Inputs": [
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectScatter",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select s_suppkey, s_name, s_address, s_phone, weight_string(s_suppkey) from supplier where 1 != 1",
+            "OrderBy": "(0|4) ASC",
+            "Query": "select s_suppkey, s_name, s_address, s_phone, weight_string(s_suppkey) from supplier order by s_suppkey asc",
+            "ResultColumns": 4,
+            "Table": "supplier"
+          },
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectEqualUnique",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select total_revenue from revenue0 where 1 != 1",
+            "Query": "select total_revenue from revenue0 where supplier_no = :s_suppkey and total_revenue = :__sq1",
+            "Table": "revenue0",
+            "Values": [
+              ":s_suppkey"
+            ],
+            "Vindex": "hash"
+          }
+        ]
+      }
+    ]
+  }
+}
+{
+  "QueryType": "SELECT",
+  "Original": "select s_suppkey, s_name, s_address, s_phone, total_revenue from supplier, revenue0 where s_suppkey = supplier_no and total_revenue = ( select max(total_revenue) from revenue0 ) order by s_suppkey",
+  "Instructions": {
+    "OperatorType": "Subquery",
+    "Variant": "PulloutValue",
+    "Inputs": [
+      {
+        "OperatorType": "Aggregate",
+        "Variant": "Ordered",
+        "Aggregates": "max(0) AS max(total_revenue)",
+        "Inputs": [
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectScatter",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select max(total_revenue) from revenue0 where 1 != 1",
+            "Query": "select max(total_revenue) from revenue0",
+            "Table": "revenue0"
+          }
+        ]
+      },
+      {
+        "OperatorType": "Route",
+        "Variant": "SelectScatter",
+        "Keyspace": {
+          "Name": "main",
+          "Sharded": true
+        },
+        "FieldQuery": "select s_suppkey, s_name, s_address, s_phone, total_revenue, weight_string(s_suppkey) from supplier, revenue0 where 1 != 1",
+        "OrderBy": "(0|5) ASC",
+        "Query": "select s_suppkey, s_name, s_address, s_phone, total_revenue, weight_string(s_suppkey) from supplier, revenue0 where total_revenue = :__sq1 and s_suppkey = supplier_no order by s_suppkey asc",
+        "ResultColumns": 5,
+        "Table": "revenue0, supplier"
+      }
+    ]
+  }
+}
+
+# TPC-H query 16
+"select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt from partsupp, part where p_partkey = ps_partkey and p_brand <> 'Brand#45' and p_type not like 'MEDIUM POLISHED%' and p_size in (49, 14, 23, 45, 19, 3, 36, 9) and ps_suppkey not in ( select s_suppkey from supplier where s_comment like '%Customer%Complaints%' ) group by p_brand, p_type, p_size order by supplier_cnt desc, p_brand, p_type, p_size"
+"unsupported: cross-shard query with aggregates"
+"gen4 does not yet support: group by on: *planbuilder.pulloutSubquery"
+
+# TPC-H query 17
+"select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#23' and p_container = 'MED BOX' and l_quantity < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey )"
+"unsupported: in scatter query: complex aggregate expression"
+Gen4 plan same as above
+
+# TPC-H query 18
+"select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) from customer, orders, lineitem where o_orderkey in ( select l_orderkey from lineitem group by l_orderkey having sum(l_quantity) > 300 ) and c_custkey = o_custkey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice order by o_totalprice desc, o_orderdate limit 100"
+"unsupported: cross-shard query with aggregates"
+
+# TPC-H query 19
+"select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part where ( p_partkey = l_partkey and p_brand = 'Brand#12' and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity >= 1 and l_quantity <= 1 + 10 and p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruct = 'DELIVER IN PERSON' ) or ( p_partkey = l_partkey and p_brand = 'Brand#23' and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') and l_quantity >= 10 and l_quantity <= 10 + 10 and p_size between 1 and 10 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruct = 'DELIVER IN PERSON' ) or ( p_partkey = l_partkey and p_brand = 'Brand#34' and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') and l_quantity >= 20 and l_quantity <= 20 + 10 and p_size between 1 and 15 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruct = 'DELIVER IN PERSON' )"
+"unsupported: cross-shard query with aggregates"
+{
+  "QueryType": "SELECT",
+  "Original": "select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part where ( p_partkey = l_partkey and p_brand = 'Brand#12' and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity \u003e= 1 and l_quantity \u003c= 1 + 10 and p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruct = 'DELIVER IN PERSON' ) or ( p_partkey = l_partkey and p_brand = 'Brand#23' and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') and l_quantity \u003e= 10 and l_quantity \u003c= 10 + 10 and p_size between 1 and 10 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruct = 'DELIVER IN PERSON' ) or ( p_partkey = l_partkey and p_brand = 'Brand#34' and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') and l_quantity \u003e= 20 and l_quantity \u003c= 20 + 10 and p_size between 1 and 15 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruct = 'DELIVER IN PERSON' )",
+  "Instructions": {
+    "OperatorType": "Aggregate",
+    "Variant": "Ordered",
+    "Aggregates": "sum(0) AS revenue",
+    "Inputs": [
+      {
+        "OperatorType": "Join",
+        "Variant": "Join",
+        "JoinColumnIndexes": "-5",
+        "JoinVars": {
+          "l_partkey": 10,
+          "l_quantity": 12,
+          "l_shipinstruct": 14,
+          "l_shipmode": 13
+        },
+        "TableName": "lineitem_part",
+        "Inputs": [
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectScatter",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select l_partkey, l_quantity, l_shipmode, l_shipinstruct, sum(l_extendedprice * (1 - l_discount)) as revenue from lineitem where 1 != 1",
+            "Query": "select l_partkey, l_quantity, l_shipmode, l_shipinstruct, sum(l_extendedprice * (1 - l_discount)) as revenue from lineitem",
+            "Table": "lineitem"
+          },
+          {
+            "OperatorType": "Route",
+            "Variant": "SelectScatter",
+            "Keyspace": {
+              "Name": "main",
+              "Sharded": true
+            },
+            "FieldQuery": "select 1 from part where 1 != 1",
+            "Query": "select 1 from part where p_partkey = :l_partkey and p_brand = 'Brand#12' and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') and :l_quantity \u003e= 1 and :l_quantity \u003c= 1 + 10 and p_size between 1 and 5 and :l_shipmode in ('AIR', 'AIR REG') and :l_shipinstruct = 'DELIVER IN PERSON' or p_partkey = :l_partkey and p_brand = 'Brand#23' and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') and :l_quantity \u003e= 10 and :l_quantity \u003c= 10 + 10 and p_size between 1 and 10 and :l_shipmode in ('AIR', 'AIR REG') and :l_shipinstruct = 'DELIVER IN PERSON' or p_partkey = :l_partkey and p_brand = 'Brand#34' and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') and :l_quantity \u003e= 20 and :l_quantity \u003c= 20 + 10 and p_size between 1 and 15 and :l_shipmode in ('AIR', 'AIR REG') and :l_shipinstruct = 'DELIVER IN PERSON'",
+            "Table": "part"
+          }
+        ]
+      }
+    ]
+  }
+}
+
+# TPC-H query 20
+"select s_name, s_address from supplier, nation where s_suppkey in ( select ps_suppkey from partsupp where ps_partkey in ( select p_partkey from part where p_name like 'forest%' ) and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem where l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date('1994-01-01') and l_shipdate < date('1994-01-01') + interval '1' year ) ) and s_nationkey = n_nationkey and n_name = 'CANADA' order by s_name"
+"unsupported: in scatter query: complex aggregate expression"
+Gen4 plan same as above
+
+# TPC-H query 21
+"select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation where s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus = 'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey ) and not exists ( select * from lineitem l3 where l3.l_orderkey = l1.l_orderkey and l3.l_suppkey <> l1.l_suppkey and l3.l_receiptdate > l3.l_commitdate ) and s_nationkey = n_nationkey and n_name = 'SAUDI ARABIA' group by s_name order by numwait desc, s_name limit 100"
+"unsupported: cross-shard query with aggregates"
+"gen4 does not yet support: *sqlparser.StarExpr in select list"
+
+# TPC-H query 22
+"select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal from ( select substring(c_phone from 1 for 2) as cntrycode, c_acctbal from customer where substring(c_phone from 1 for 2) in ('13', '31', '23', '29', '30', '18', '17') and c_acctbal > ( select avg(c_acctbal) from customer where c_acctbal > 0.00 and substring(c_phone from 1 for 2) in ('13', '31', '23', '29', '30', '18', '17') ) and not exists ( select * from orders where o_custkey = c_custkey ) ) as custsale group by cntrycode order by cntrycode"
+"unsupported: in scatter query: complex aggregate expression"
+"gen4 does not yet support: *sqlparser.StarExpr in select list"
diff --git a/go/vt/vtgate/planbuilder/testdata/tpch_schema_test.json b/go/vt/vtgate/planbuilder/testdata/tpch_schema_test.json
new file mode 100644
index 0000000000..6f8887d849
--- /dev/null
+++ b/go/vt/vtgate/planbuilder/testdata/tpch_schema_test.json
@@ -0,0 +1,330 @@
+{
+  "keyspaces": {
+    "main": {
+      "sharded": true,
+      "vindexes": {
+        "hash": {
+          "type": "hash"
+        },
+        "partsupp_map": {
+          "type": "lookup_hash_unique",
+          "owner": "partsupp_map",
+          "params": {
+            "table": "partsupp_map",
+            "from": "ps_partkey",
+            "to": "ps_suppkey"
+          }
+        },
+        "lineitem_map": {
+          "type": "lookup_hash_unique",
+          "owner": "lineitem_map",
+          "params": {
+            "table": "lineitem_map",
+            "from": "l_orderkey",
+            "to": "l_linenumber"
+          }
+        },
+        "md5": {
+          "type": "unicode_loose_md5"
+        }
+      },
+      "tables": {
+        "nation": {
+          "column_vindexes": [
+            {
+              "column": "n_nationkey",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "n_nationkey"
+            },
+            {
+              "name": "n_name"
+            },
+            {
+              "name": "n_regionkey"
+            },
+            {
+              "name": "n_comment"
+            }
+          ]
+        },
+        "region": {
+          "column_vindexes": [
+            {
+              "column": "r_regionkey",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "r_regionkey"
+            },
+            {
+              "name": "r_name"
+            },
+            {
+              "name": "r_comment"
+            }
+          ]
+        },
+        "part": {
+          "column_vindexes": [
+            {
+              "column": "p_partkey",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "p_partkey"
+            },
+            {
+              "name": "p_name"
+            },
+            {
+              "name": "p_mfgr"
+            },
+            {
+              "name": "p_brand"
+            },
+            {
+              "name": "p_type"
+            },
+            {
+              "name": "p_size"
+            },
+            {
+              "name": "p_container"
+            },
+            {
+              "name": "p_retailprice"
+            },
+            {
+              "name": "p_comment"
+            }
+          ]
+        },
+        "supplier": {
+          "column_vindexes": [
+            {
+              "column": "s_suppkey",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "s_suppkey"
+            },
+            {
+              "name": "s_name"
+            },
+            {
+              "name": "s_address"
+            },
+            {
+              "name": "s_nationkey"
+            },
+            {
+              "name": "s_phone"
+            },
+            {
+              "name": "s_acctbal"
+            },
+            {
+              "name": "s_comment"
+            }
+          ]
+        },
+        "partsupp": {
+          "column_vindexes": [
+            {
+              "column": "ps_partkey",
+              "name": "partsupp_map"
+            }
+          ],
+          "columns": [
+            {
+              "name": "ps_partkey"
+            },
+            {
+              "name": "ps_suppkey"
+            },
+            {
+              "name": "ps_availqty"
+            },
+            {
+              "name": "ps_supplycost"
+            },
+            {
+              "name": "ps_comment"
+            }
+          ]
+        },
+        "partsupp_map": {
+          "column_vindexes": [
+            {
+              "column": "ps_partkey",
+              "name": "md5"
+            }
+          ]
+        },
+        "customer": {
+          "column_vindexes": [
+            {
+              "column": "c_custkey",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "c_custkey"
+            },
+            {
+              "name": "c_name"
+            },
+            {
+              "name": "c_address"
+            },
+            {
+              "name": "c_nationkey"
+            },
+            {
+              "name": "c_phone"
+            },
+            {
+              "name": "c_acctbal"
+            },
+            {
+              "name": "c_mktsegment"
+            },
+            {
+              "name": "c_comment"
+            }
+          ]
+        },
+        "orders": {
+          "column_vindexes": [
+            {
+              "column": "o_orderkey",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "o_orderkey"
+            },
+            {
+              "name": "o_custkey"
+            },
+            {
+              "name": "o_orderstatus"
+            },
+            {
+              "name": "o_totalprice"
+            },
+            {
+              "name": "o_orderdate"
+            },
+            {
+              "name": "o_orderpriority"
+            },
+            {
+              "name": "o_clerk"
+            },
+            {
+              "name": "o_shippriority"
+            },
+            {
+              "name": "o_comment"
+            }
+          ]
+        },
+        "lineitem": {
+          "column_vindexes": [
+            {
+              "column": "l_orderkey",
+              "name": "lineitem_map"
+            }
+          ],
+          "columns": [
+            {
+              "name": "l_orderkey"
+            },
+            {
+              "name": "l_partkey"
+            },
+            {
+              "name": "l_suppkey"
+            },
+            {
+              "name": "l_linenumber"
+            },
+            {
+              "name": "l_quantity"
+            },
+            {
+              "name": "l_extendedprice"
+            },
+            {
+              "name": "l_discount"
+            },
+            {
+              "name": "l_tax"
+            },
+            {
+              "name": "l_returnflag"
+            },
+            {
+              "name": "l_linestatus"
+            },
+            {
+              "name": "l_shipdate"
+            },
+            {
+              "name": "l_commitdate"
+            },
+            {
+              "name": "l_receiptdate"
+            },
+            {
+              "name": "l_shipinstruct"
+            },
+            {
+              "name": "l_shipmode"
+            },
+            {
+              "name": "l_comment"
+            }
+          ]
+        },
+        "lineitem_map": {
+          "column_vindexes": [
+            {
+              "column": "l_orderkey",
+              "name": "md5"
+            }
+          ]
+        },
+        "revenue0": {
+          "column_vindexes": [
+            {
+              "column": "supplier_no",
+              "name": "hash"
+            }
+          ],
+          "columns": [
+            {
+              "name": "supplier_no"
+            },
+            {
+              "name": "total_revenue"
+            }
+          ]
+        }
+      }
+    }
+  }
+}