diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 2f638ec..f7a6162 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -42,6 +42,44 @@ To do so, run `yarn dev-server` inside the `standalone-app` folder and connect t Changes inside the `query-graphs` directory are not immediately picked up by the `standalone-app`. For your changes to take effect, you will have to re-run `yarn build` inside the `query-graphs` folder. +## Testing with Hyper Query Plans + +When making changes to the query plan visualization (e.g., supporting a new plan format), follow these steps to verify everything works end-to-end. + +### 1. Dump fresh plans from Hyper + +The `plan-dumper/dump-plans.py` script runs SQL queries against a Hyper instance and writes the resulting `EXPLAIN` output as JSON files into `standalone-app/examples/`. + +**Prerequisites:** + +```shell +pip3 install tableauhyperapi +``` + +**Running with the default (pip-installed) Hyper:** + +```shell +cd plan-dumper +python3 dump-plans.py +``` + +**Running with a custom Hyper build:** + +```shell +cd plan-dumper +python3 dump-plans.py --hyper-path ~/workspace/hyper-db/bazel-bin/hyper/tools/hyperd +``` + +The `--hyper-path` argument should point to the directory containing the `hyperd` binary. +When omitted, the script uses the `hyperd` bundled with the pip-installed `tableauhyperapi` package. + +If you also have a Postgres instance running on port 5433, install `psycopg2` to dump Postgres plans as well. Otherwise, the Postgres section is skipped automatically. + +### 2. Visually verify plans in the local server + +Build and start the app (if not already running). +Then open [localhost:8080/examples.html](http://localhost:8080/examples.html) in your browser. This page lists all example plans. Click through the Hyper plans to verify they render correctly. + ## Linting We use eslint as our code linter. diff --git a/plan-dumper/dump-plans.py b/plan-dumper/dump-plans.py index bfc2d7b..39acda3 100644 --- a/plan-dumper/dump-plans.py +++ b/plan-dumper/dump-plans.py @@ -1,5 +1,9 @@ from tableauhyperapi import HyperProcess, Telemetry, Connection -import psycopg2 +try: + import psycopg2 +except ImportError: + psycopg2 = None +import argparse import shutil import os import json @@ -51,38 +55,47 @@ def dump_plans(name, exec_stmt, get_plan): # Postgres -with psycopg2.connect("port=5433") as conn: - def exec_postgres(sql): - with conn.cursor() as cur: - if sql.strip() != "": - cur.execute(sql) - - def get_postgres_plan(sql, mode): - if mode == "steps": - return None - elif mode == "analyze": - explain = "EXPLAIN (VERBOSE, ANALYZE, FORMAT JSON) " - elif mode is None: - explain = "EXPLAIN (VERBOSE, FORMAT JSON) " - else: - return None - with conn.cursor() as cur: - cur.execute(explain + sql) - records = cur.fetchall() - return json.dumps(records[0][0]) - - dump_plans("postgres", exec_postgres, get_postgres_plan) +if psycopg2 is not None: + with psycopg2.connect("port=5433") as conn: + def exec_postgres(sql): + with conn.cursor() as cur: + if sql.strip() != "": + cur.execute(sql) + + def get_postgres_plan(sql, mode): + if mode == "steps": + return None + elif mode == "analyze": + explain = "EXPLAIN (VERBOSE, ANALYZE, FORMAT JSON) " + elif mode is None: + explain = "EXPLAIN (VERBOSE, FORMAT JSON) " + else: + return None + with conn.cursor() as cur: + cur.execute(explain + sql) + records = cur.fetchall() + return json.dumps(records[0][0]) + + dump_plans("postgres", exec_postgres, get_postgres_plan) +else: + print("Skipping Postgres: psycopg2 not installed") + +parser = argparse.ArgumentParser() +parser.add_argument("--hyper-path", type=Path, default=None, + help="Path to a directory containing the hyperd binary. " + "Uses the pip-installed Hyper by default.") +args = parser.parse_args() # Hyper -with HyperProcess(telemetry=Telemetry.SEND_USAGE_DATA_TO_TABLEAU, parameters=hyper_params) as hyper: +with HyperProcess(telemetry=Telemetry.SEND_USAGE_DATA_TO_TABLEAU, parameters=hyper_params, hyper_path=args.hyper_path) as hyper: with Connection(endpoint=hyper.endpoint) as connection: def exec_hyper(sql): connection.execute_command(sql) def get_hyper_plan(sql, mode): if mode == "steps": - explain = "EXPLAIN (FORMAT JSON, OPTIMIZERSTEPS) " + explain = "EXPLAIN (FORMAT JSON, OPTIMIZE STEPS) " elif mode == "analyze": explain = "EXPLAIN (FORMAT JSON, ANALYZE) " elif mode is None: diff --git a/query-graphs/src/hyper.ts b/query-graphs/src/hyper.ts index b15645c..b9c8c6f 100644 --- a/query-graphs/src/hyper.ts +++ b/query-graphs/src/hyper.ts @@ -152,7 +152,7 @@ function convertHyperNode(rawNode: Json, parentKey, conversionState: ConversionS // Determine the order in which other keys are displayed. // For some keys, we enforce a specific order here (e.g., "left" comes before "right"). // For all other keys, we use alphabetic order. - const fixedChildOrder = ["input", "left", "right", "value", "valueForComparison"]; + const fixedChildOrder = ["inputs", "input", "left", "right", "value", "valueForComparison"]; const orderedKeys = Object.getOwnPropertyNames(rawNode) .filter((k) => { // `propertyKeys` and `operator`/`expression` were already handled diff --git a/standalone-app/examples/hyper/cte-recursive.plan.json b/standalone-app/examples/hyper/cte-recursive.plan.json index 3a8977d..fef92a3 100644 --- a/standalone-app/examples/hyper/cte-recursive.plan.json +++ b/standalone-app/examples/hyper/cte-recursive.plan.json @@ -3,45 +3,46 @@ "operatorId": 1, "cardinality": 11, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}], + "output": [{"expression": "iuref", "iu": ["map", ["Integer"]]}], "outputNames": ["i"], - "input": { + "inputs": [{ "operator": "iteration", "operatorId": 2, "cardinality": 11, - "resultIUs": [["v", ["Integer"]]], - "leftValues": [{"expression": "iuref", "iu": ["v2", ["Integer"]]}], - "rightValues": [{"expression": "iuref", "iu": ["v3", ["Integer"]]}], + "resultIUs": [["map", ["Integer"]]], + "leftValues": [{"expression": "iuref", "iu": ["map2", ["Integer"]]}], + "rightValues": [{"expression": "iuref", "iu": ["map3", ["Integer"]]}], "unionAll": true, - "left": { + "inputs": [{ "operator": "tableconstruction", "operatorId": 3, "cardinality": 1, - "output": [["v2", ["Integer"]]], - "values": [[{"expression": "const", "value": {"type": ["Integer"], "value": 1}}]] - }, - "right": { + "output": [["map2", ["Integer"]]], + "values": [[{"expression": "const", "value": {"type": ["Integer"], "value": 1}}]], + "inputs": [] + }, { "operator": "map", "operatorId": 4, "sqlpos": [[85, 90]], "cardinality": 1, - "input": { - "operator": "select", + "inputs": [{ + "operator": "filter", "operatorId": 5, "sqlpos": [[104, 111]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "iterationincrement", "operatorId": 6, "sqlpos": [[96, 97]], "cardinality": 1, - "values": [["v4", ["Integer"]]], + "values": [["map_increment", ["Integer"]]], "source": 2 - }, - "condition": {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 100}}} - }, - "values": [{"iu": ["v3", ["Integer"]], "value": {"expression": "add", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 1}}}}] - }, - "collates": [null] - } + }], + "condition": {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "map_increment"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 100}}} + }], + "values": [{"iu": ["map3", ["Integer"]], "value": {"expression": "add", "left": {"expression": "iuref", "iu": "map_increment"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 1}}}}] + }], + "collates": [null], + "algorithm": "materializing" + }] } diff --git a/standalone-app/examples/hyper/cte.plan.json b/standalone-app/examples/hyper/cte.plan.json index 05612ed..dec1ec4 100644 --- a/standalone-app/examples/hyper/cte.plan.json +++ b/standalone-app/examples/hyper/cte.plan.json @@ -3,49 +3,51 @@ "operatorId": 1, "cardinality": 200, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigInt"]]}, {"expression": "iuref", "iu": ["v3", ["Numeric", 16, 6]]}], + "output": [{"expression": "iuref", "iu": ["union", ["Integer"]]}, {"expression": "iuref", "iu": ["union2", ["BigInt"]]}, {"expression": "iuref", "iu": ["union3", ["Numeric", 16, 6]]}], "outputNames": ["a1", "sum", "avg"], - "input": { + "inputs": [{ "operator": "unionall", "operatorId": 2, "sqlpos": [[109, 118]], "cardinality": 200, - "input": [{ + "inputs": [{ "operator": "explicitscan", "operatorId": 3, "cardinality": 100, - "mapping": [{"source": {"expression": "iuref", "iu": ["v4", ["Integer"]]}, "target": ["v5", ["Integer"]]}, {"source": {"expression": "iuref", "iu": ["v6", ["Numeric", 16, 6]]}, "target": ["v7", ["Numeric", 16, 6]]}, {"source": {"expression": "iuref", "iu": ["v8", ["BigInt"]]}, "target": ["v9", ["BigInt"]]}], + "mapping": [{"source": {"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, "target": ["GroupByKey2", ["Integer"]]}, {"source": {"expression": "iuref", "iu": ["avg", ["Numeric", 16, 6]]}, "target": ["avg2", ["Numeric", 16, 6]]}, {"source": {"expression": "iuref", "iu": ["sum", ["BigInt"]]}, "target": ["sum2", ["BigInt"]]}], "input": { "operator": "groupby", "operatorId": 4, "sqlpos": [[77, 88], [46, 53], [55, 62]], "cardinality": 100, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 5, "sqlpos": [[71, 73]], "cardinality": 2000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v12", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a1", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b1", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c1", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, "selectivity": 1 - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v10"}}, "iu": ["v4", ["Integer"]]}], + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_a1"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v11"}}, {"value": {"expression": "iuref", "iu": "v12"}}], - "aggregates": [{"source": 1, "operation": {"aggregate": "avg"}, "iu": ["v6", ["Numeric", 16, 6]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v8", ["BigInt"]]}] + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_b1"}}, {"value": {"expression": "iuref", "iu": "scan_c1"}}], + "aggregates": [{"source": 1, "operation": {"aggregate": "avg"}, "iu": ["avg", ["Numeric", 16, 6]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigInt"]]}] } }, { "operator": "explicitscan", "operatorId": 6, "cardinality": 100, - "mapping": [{"source": {"expression": "iuref", "iu": "v4"}, "target": ["v13", ["Integer"]]}, {"source": {"expression": "iuref", "iu": "v6"}, "target": ["v14", ["Numeric", 16, 6]]}, {"source": {"expression": "iuref", "iu": "v8"}, "target": ["v15", ["BigInt"]]}], + "mapping": [{"source": {"expression": "iuref", "iu": "GroupByKey"}, "target": ["GroupByKey3", ["Integer"]]}, {"source": {"expression": "iuref", "iu": "avg"}, "target": ["avg3", ["Numeric", 16, 6]]}, {"source": {"expression": "iuref", "iu": "sum"}, "target": ["sum3", ["BigInt"]]}], "input": 4 }], - "ius": [["v", ["Integer"]], ["v2", ["BigInt"]], ["v3", ["Numeric", 16, 6]]], - "values": [[{"expression": "iuref", "iu": "v5"}, {"expression": "iuref", "iu": "v9"}, {"expression": "iuref", "iu": "v7"}], [{"expression": "iuref", "iu": "v13"}, {"expression": "iuref", "iu": "v15"}, {"expression": "iuref", "iu": "v14"}]], + "ius": [["union", ["Integer"]], ["union2", ["BigInt"]], ["union3", ["Numeric", 16, 6]]], + "values": [[{"expression": "iuref", "iu": "GroupByKey2"}, {"expression": "iuref", "iu": "sum2"}, {"expression": "iuref", "iu": "avg2"}], [{"expression": "iuref", "iu": "GroupByKey3"}, {"expression": "iuref", "iu": "sum3"}, {"expression": "iuref", "iu": "avg3"}]], "collates": [null, null, null] - } + }] } diff --git a/standalone-app/examples/hyper/groupby.plan.json b/standalone-app/examples/hyper/groupby.plan.json index 4b21b13..72006c3 100644 --- a/standalone-app/examples/hyper/groupby.plan.json +++ b/standalone-app/examples/hyper/groupby.plan.json @@ -3,28 +3,30 @@ "operatorId": 1, "cardinality": 100, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigInt"]]}, {"expression": "iuref", "iu": ["v3", ["Numeric", 16, 6]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigInt"]]}, {"expression": "iuref", "iu": ["avg", ["Numeric", 16, 6]]}], "outputNames": ["a1", "sum", "avg"], - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 2, "sqlpos": [[58, 69], [33, 40], [42, 49]], "cardinality": 100, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 3, "sqlpos": [[55, 57]], "cardinality": 2000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v6", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a1", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b1", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c1", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, "selectivity": 1 - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v4"}}, "iu": ["v", ["Integer"]]}], + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_a1"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v5"}}, {"value": {"expression": "iuref", "iu": "v6"}}], - "aggregates": [{"source": 1, "operation": {"aggregate": "avg"}, "iu": ["v3", ["Numeric", 16, 6]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigInt"]]}] - } + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_b1"}}, {"value": {"expression": "iuref", "iu": "scan_c1"}}], + "aggregates": [{"source": 1, "operation": {"aggregate": "avg"}, "iu": ["avg", ["Numeric", 16, 6]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigInt"]]}] + }] } diff --git a/standalone-app/examples/hyper/insert.plan.json b/standalone-app/examples/hyper/insert.plan.json index b43c822..f55d5aa 100644 --- a/standalone-app/examples/hyper/insert.plan.json +++ b/standalone-app/examples/hyper/insert.plan.json @@ -5,50 +5,53 @@ "producesRows": false, "output": [], "outputNames": [], - "input": { + "inputs": [{ "operator": "insert", "operatorId": 2, "cardinality": 4000, + "volatility": "volatile", "relationId": 1, "schema": {"type":"sessionschema"}, - "output": [["v", ["Integer", "nullable"]], ["v2", ["Integer", "nullable"]], ["v3", ["Integer", "nullable"]]], - "values": [{"expression": "cast", "value": {"expression": "iuref", "iu": ["v4", ["Integer"]]}, "type": ["Integer", "nullable"], "errorHandling": "trap"}, {"expression": "cast", "value": {"expression": "iuref", "iu": ["v5", ["Integer"]]}, "type": ["Integer", "nullable"], "errorHandling": "trap"}, {"expression": "cast", "value": {"expression": "iuref", "iu": ["v6", ["Integer"]]}, "type": ["Integer", "nullable"], "errorHandling": "trap"}], - "input": { + "output": [["cast", ["Integer", "nullable"]], ["cast2", ["Integer", "nullable"]], ["cast3", ["Integer", "nullable"]]], + "values": [{"expression": "cast", "value": {"expression": "iuref", "iu": ["map", ["Integer"]]}, "type": ["Integer", "nullable"], "errorHandling": "trap", "allowTrustedCasts": false}, {"expression": "cast", "value": {"expression": "iuref", "iu": ["map2", ["Integer"]]}, "type": ["Integer", "nullable"], "errorHandling": "trap", "allowTrustedCasts": false}, {"expression": "cast", "value": {"expression": "iuref", "iu": ["map3", ["Integer"]]}, "type": ["Integer", "nullable"], "errorHandling": "trap", "allowTrustedCasts": false}], + "inputs": [{ "operator": "map", "operatorId": 3, "sqlpos": [[44, 48]], "cardinality": 4000, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 4000, "method": "bnl", - "left": { + "inputs": [{ "operator": "tableconstruction", "operatorId": 5, "sqlpos": [[71, 80]], "cardinality": 2, - "output": [["v7", ["Integer"]]], - "values": [[{"expression": "const", "value": {"type": ["Integer"], "value": 1}}], [{"expression": "const", "value": {"type": ["Integer"], "value": 2}}]] - }, - "right": { + "output": [["tableconstruction", ["Integer"]]], + "values": [[{"expression": "const", "value": {"type": ["Integer"], "value": 1}}], [{"expression": "const", "value": {"type": ["Integer"], "value": 2}}]], + "inputs": [] + }, { "operator": "tablescan", "operatorId": 6, "sqlpos": [[66, 68]], "cardinality": 2000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v10", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a1", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b1", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c1", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "values": [{"iu": ["v4", ["Integer"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v8"}, "right": {"expression": "iuref", "iu": "v7"}}}, {"iu": ["v5", ["Integer"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v7"}}}, {"iu": ["v6", ["Integer"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "iuref", "iu": "v7"}}}] - }, - "tid": ["v11", ["Numeric", 18]], - "tableOid": ["v12", ["RegClass"]], - "tupleFlags": ["v13", ["BigInt"]], + }], + "values": [{"iu": ["map", ["Integer"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_a1"}, "right": {"expression": "iuref", "iu": "tableconstruction"}}}, {"iu": ["map2", ["Integer"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_b1"}, "right": {"expression": "iuref", "iu": "tableconstruction"}}}, {"iu": ["map3", ["Integer"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_c1"}, "right": {"expression": "iuref", "iu": "tableconstruction"}}}] + }], + "tid": ["tid", ["Numeric", 18]], + "tableOid": ["tableOid", ["RegClass"]], + "tupleFlags": ["tupleFlags", ["BigInt"]], "bulkInsert": false - } + }] } diff --git a/standalone-app/examples/hyper/magicunnesting.plan.json b/standalone-app/examples/hyper/magicunnesting.plan.json index 6396415..b5011ce 100644 --- a/standalone-app/examples/hyper/magicunnesting.plan.json +++ b/standalone-app/examples/hyper/magicunnesting.plan.json @@ -3,69 +3,72 @@ "operatorId": 1, "cardinality": 2732.06, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigInt", "nullable"]]}], + "output": [{"expression": "iuref", "iu": ["scan_a1", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigInt", "nullable"]]}], "outputNames": ["a1", "2"], - "input": { + "inputs": [{ "operator": "leftouterjoin", "operatorId": 2, "cardinality": 2732.06, "method": "hash", - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 3, "sqlpos": [[77, 79]], "cardinality": 2000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": null}, {"name": "c1", "type": ["Integer"], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a1", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, "selectivity": 1 - }, - "right": { + }, { "operator": "groupby", "operatorId": 4, "sqlpos": [[41, 48]], "cardinality": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 100000, "method": "bnl", - "left": { + "inputs": [{ "operator": "explicitscan", "operatorId": 6, "cardinality": 100, - "mapping": [{"source": {"expression": "iuref", "iu": ["v3", ["Integer"]]}, "target": ["v4", ["Integer"]]}], + "mapping": [{"source": {"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, "target": ["GroupByKey2", ["Integer"]]}], "input": { "operator": "groupby", "operatorId": 7, "cardinality": 100, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v"}}, "iu": ["v3", ["Integer"]]}], + "inputs": [], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_a1"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": null, "behavior": "regular"}], "emptyGroups": false, "aggregates": [] } - }, - "right": { + }, { "operator": "tablescan", "operatorId": 8, "sqlpos": [[54, 56]], "cardinality": 2000, + "volatility": "stable", "relationId": 1, "schema": {"type":"sessionschema"}, - "values": [{"name": "a2", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "b2", "type": ["Integer"], "iu": null}, {"name": "c2", "type": ["Integer"], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a2", "type": ["Integer"], "iu": ["scan_a2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t2"}, "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "v5"}, "right": {"expression": "iuref", "iu": "v4"}} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v4"}}, "iu": ["v6", ["Integer"]]}], + }], + "condition": {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "scan_a2"}, "right": {"expression": "iuref", "iu": "GroupByKey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "GroupByKey2"}}, "iu": ["GroupByKey3", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v5"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigInt", "nullable"]]}] - }, - "condition": {"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "v"}, "right": {"expression": "iuref", "iu": "v6"}}, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_a2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigInt", "nullable"]]}] + }], + "condition": {"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "scan_a1"}, "right": {"expression": "iuref", "iu": "GroupByKey3"}}, "magic": 7 - } + }] } diff --git a/standalone-app/examples/hyper/markjoin.plan.json b/standalone-app/examples/hyper/markjoin.plan.json index fab067f..9273f08 100644 --- a/standalone-app/examples/hyper/markjoin.plan.json +++ b/standalone-app/examples/hyper/markjoin.plan.json @@ -3,36 +3,39 @@ "operatorId": 1, "cardinality": 2000, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["Integer"]]}, {"expression": "iuref", "iu": ["v3", ["Integer"]]}, {"expression": "iuref", "iu": ["v4", ["Bool"]]}], + "output": [{"expression": "iuref", "iu": ["scan_a1", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_b1", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_c1", ["Integer"]]}, {"expression": "iuref", "iu": ["joinMarker", ["Bool"]]}], "outputNames": ["a1", "b1", "c1", "2"], - "input": { + "inputs": [{ "operator": "leftmarkjoin", "operatorId": 2, "cardinality": 2000, "method": "hash", - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 3, "sqlpos": [[89, 91]], "cardinality": 2000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v2", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v3", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a1", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b1", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c1", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, "selectivity": 1 - }, - "right": { + }, { "operator": "tablescan", "operatorId": 4, "sqlpos": [[54, 56]], "cardinality": 2000, + "volatility": "stable", "relationId": 1, "schema": {"type":"sessionschema"}, - "values": [{"name": "a2", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "b2", "type": ["Integer"], "iu": ["v6", ["Integer"]]}, {"name": "c2", "type": ["Integer"], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a2", "type": ["Integer"], "iu": ["scan_a2", ["Integer"]]},{"colId": 1, "name": "b2", "type": ["Integer"], "iu": ["scan_b2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t2"}, "selectivity": 1 - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v"}, "right": {"expression": "iuref", "iu": "v5"}}, {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "iuref", "iu": "v6"}}]}, - "marker": ["v4", ["Bool"]] - } + }], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_a1"}, "right": {"expression": "iuref", "iu": "scan_a2"}}, {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "scan_b1"}, "right": {"expression": "iuref", "iu": "scan_b2"}}]}, + "marker": ["joinMarker", ["Bool"]] + }] } diff --git a/standalone-app/examples/hyper/metadata-describe-table.plan.json b/standalone-app/examples/hyper/metadata-describe-table.plan.json index cff44ac..9a5b682 100644 --- a/standalone-app/examples/hyper/metadata-describe-table.plan.json +++ b/standalone-app/examples/hyper/metadata-describe-table.plan.json @@ -3,49 +3,47 @@ "operatorId": 1, "cardinality": 1.36603, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["SmallInt"]]}, {"expression": "iuref", "iu": ["v2", ["Char1"]]}, {"expression": "iuref", "iu": ["v3", ["Bool"]]}, {"expression": "iuref", "iu": ["v4", ["Bool"]]}, {"expression": "iuref", "iu": ["v5", ["Bool"]]}, {"expression": "const", "value": {"type": ["Bool"], "value": false}}, {"expression": "iuref", "iu": ["v6", ["Oid"]]}, {"expression": "iuref", "iu": ["v7", ["Varchar"]]}, {"expression": "iuref", "iu": ["v8", ["Char1"]]}], + "output": [{"expression": "iuref", "iu": ["c.relcheck", ["SmallInt"]]}, {"expression": "iuref", "iu": ["c.relkind", ["Char1"]]}, {"expression": "iuref", "iu": ["c.relhasin", ["Bool"]]}, {"expression": "iuref", "iu": ["c.relhasru", ["Bool"]]}, {"expression": "iuref", "iu": ["c.relhastr", ["Bool"]]}, {"expression": "const", "value": {"type": ["Bool"], "value": false}}, {"expression": "iuref", "iu": ["c.reltable", ["Oid"]]}, {"expression": "iuref", "iu": ["map", ["Varchar"]]}, {"expression": "iuref", "iu": ["c.relpersi", ["Char1"]]}], "outputNames": ["relchecks", "relkind", "relhasindex", "relhasrules", "relhastriggers", "relispartition", "reltablespace", "case", "relpersistence"], - "input": { + "inputs": [{ "operator": "map", "operatorId": 2, "sqlpos": [[29, 40]], "cardinality": 1.36603, - "input": { + "inputs": [{ "operator": "leftouterjoin", "operatorId": 3, "cardinality": 1.36603, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "virtualtable", "operatorId": 4, "sqlpos": [[279, 298]], "cardinality": 1, - "debugName": {"classification": "nonsensitive", "value": "pg_class"}, - "restrictions": [{"attribute": 0, "mode": "=", "value": {"expression": "const", "value": {"type": ["Oid"], "value": 12}}}], + "volatility": "volatile", + "attributeCount": 27, + "attributes": [{"colId": 0, "name": "oid", "type": ["Oid"], "iu": ["c.oid", ["Oid"]]},{"colId": 4, "name": "reloftype", "type": ["Oid"], "iu": ["c.reloftyp", ["Oid"]]},{"colId": 8, "name": "reltablespace", "type": ["Oid"], "iu": ["c.reltable", ["Oid"]]},{"colId": 11, "name": "reltoastrelid", "type": ["Oid"], "iu": ["c.reltoast", ["Oid"]]},{"colId": 13, "name": "relhasindex", "type": ["Bool"], "iu": ["c.relhasin", ["Bool"]]},{"colId": 15, "name": "relpersistence", "type": ["Char1"], "iu": ["c.relpersi", ["Char1"]]},{"colId": 16, "name": "relkind", "type": ["Char1"], "iu": ["c.relkind", ["Char1"]]},{"colId": 18, "name": "relchecks", "type": ["SmallInt"], "iu": ["c.relcheck", ["SmallInt"]]},{"colId": 21, "name": "relhasrules", "type": ["Bool"], "iu": ["c.relhasru", ["Bool"]]},{"colId": 22, "name": "relhastriggers", "type": ["Bool"], "iu": ["c.relhastr", ["Bool"]]}], + "debugName": {"classification": "nonsensitive", "value": "c"}, + "restrictions": [{"attribute": 0, "mode": "=", "selectivity": 0.01, "value": {"expression": "const", "value": {"type": ["Oid"], "value": 12}}}], "schema": {"type":"builtinschema"}, - "id": 1259, - "values": [{"name": "oid", "type": ["Oid"], "iu": ["v9", ["Oid"]]}, {"name": "relname", "type": ["Varchar"], "iu": null}, {"name": "relnamespace", "type": ["Oid"], "iu": null}, {"name": "reltype", "type": ["Oid"], "iu": null}, {"name": "reloftype", "type": ["Oid"], "iu": ["v10", ["Oid"]]}, {"name": "relowner", "type": ["Oid"], "iu": null}, {"name": "relam", "type": ["Oid"], "iu": null}, {"name": "relfilenode", "type": ["Oid"], "iu": null}, {"name": "reltablespace", "type": ["Oid"], "iu": ["v6", ["Oid"]]}, {"name": "relpages", "type": ["Integer"], "iu": null}, {"name": "reltuples", "type": ["Double"], "iu": null}, {"name": "reltoastrelid", "type": ["Oid"], "iu": ["v11", ["Oid"]]}, {"name": "reltoastidxid", "type": ["Oid"], "iu": null}, {"name": "relhasindex", "type": ["Bool"], "iu": ["v3", ["Bool"]]}, {"name": "relisshared", "type": ["Bool"], "iu": null}, {"name": "relpersistence", "type": ["Char1"], "iu": ["v8", ["Char1"]]}, {"name": "relkind", "type": ["Char1"], "iu": ["v2", ["Char1"]]}, {"name": "relnatts", "type": ["SmallInt"], "iu": null}, {"name": "relchecks", "type": ["SmallInt"], "iu": ["v", ["SmallInt"]]}, {"name": "relhasoids", "type": ["Bool"], "iu": null}, {"name": "relhaspkey", "type": ["Bool"], "iu": null}, {"name": "relhasrules", "type": ["Bool"], "iu": ["v4", ["Bool"]]}, {"name": "relhastriggers", "type": ["Bool"], "iu": ["v5", ["Bool"]]}, {"name": "relhassubclass", "type": ["Bool"], "iu": null}, {"name": "relfrozenxid", "type": ["BigInt"], "iu": null}, {"name": "relacl", "type": ["AclItem-array", "nullable", "innerNullable"], "iu": null}, {"name": "reloptions", "type": ["Varchar-array", "nullable", "innerNullable"], "iu": null}], - "tid": null, - "tableOid": null, - "tupleFlags": null - }, - "right": { + "id": 1259 + }, { "operator": "virtualtable", "operatorId": 5, "sqlpos": [[311, 330]], "cardinality": 100, - "debugName": {"classification": "nonsensitive", "value": "pg_class"}, - "earlyProbes": [{"builder": 3, "attributes": [0], "type": "lookup"}], + "volatility": "volatile", + "attributeCount": 27, + "attributes": [{"colId": 0, "name": "oid", "type": ["Oid"], "iu": ["tc.oid", ["Oid", "nullable"]]}], + "debugName": {"classification": "nonsensitive", "value": "tc"}, + "earlyProbes": [{"builder": 3, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.01], "type": "hashprobe", "passOnNulls": false}], "schema": {"type":"builtinschema"}, - "id": 1259, - "values": [{"name": "oid", "type": ["Oid"], "iu": ["v12", ["Oid", "nullable"]]}, {"name": "relname", "type": ["Varchar"], "iu": null}, {"name": "relnamespace", "type": ["Oid"], "iu": null}, {"name": "reltype", "type": ["Oid"], "iu": null}, {"name": "reloftype", "type": ["Oid"], "iu": null}, {"name": "relowner", "type": ["Oid"], "iu": null}, {"name": "relam", "type": ["Oid"], "iu": null}, {"name": "relfilenode", "type": ["Oid"], "iu": null}, {"name": "reltablespace", "type": ["Oid"], "iu": null}, {"name": "relpages", "type": ["Integer"], "iu": null}, {"name": "reltuples", "type": ["Double"], "iu": null}, {"name": "reltoastrelid", "type": ["Oid"], "iu": null}, {"name": "reltoastidxid", "type": ["Oid"], "iu": null}, {"name": "relhasindex", "type": ["Bool"], "iu": null}, {"name": "relisshared", "type": ["Bool"], "iu": null}, {"name": "relpersistence", "type": ["Char1"], "iu": null}, {"name": "relkind", "type": ["Char1"], "iu": null}, {"name": "relnatts", "type": ["SmallInt"], "iu": null}, {"name": "relchecks", "type": ["SmallInt"], "iu": null}, {"name": "relhasoids", "type": ["Bool"], "iu": null}, {"name": "relhaspkey", "type": ["Bool"], "iu": null}, {"name": "relhasrules", "type": ["Bool"], "iu": null}, {"name": "relhastriggers", "type": ["Bool"], "iu": null}, {"name": "relhassubclass", "type": ["Bool"], "iu": null}, {"name": "relfrozenxid", "type": ["BigInt"], "iu": null}, {"name": "relacl", "type": ["AclItem-array", "nullable", "innerNullable"], "iu": null}, {"name": "reloptions", "type": ["Varchar-array", "nullable", "innerNullable"], "iu": null}], - "tid": null, - "tableOid": null, - "tupleFlags": null - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v12"}} - }, - "values": [{"iu": ["v7", ["Varchar"]], "value": {"expression": "simplecase", "value": {"expression": "iuref", "iu": "v10"}, "cases": [{"cases": [{"expression": "const", "value": {"type": ["Integer"], "value": 0}}], "value": {"expression": "const", "value": {"type": ["Varchar"], "value": ""}}}], "else": {"expression": "cast", "value": {"expression": "cast", "value": {"expression": "iuref", "iu": "v10"}, "type": ["RegType"], "errorHandling": "trap"}, "type": ["Varchar"], "errorHandling": "trap"}}}] - } + "id": 1259 + }], + "earlyProbedBy": [5], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "c.reltoast"}, "right": {"expression": "iuref", "iu": "tc.oid"}} + }], + "values": [{"iu": ["map", ["Varchar"]], "value": {"expression": "simplecase", "value": {"expression": "iuref", "iu": "c.reloftyp"}, "cases": [{"cases": [{"expression": "const", "value": {"type": ["Integer"], "value": 0}}], "value": {"expression": "const", "value": {"type": ["Varchar"], "value": ""}}}], "else": {"expression": "cast", "value": {"expression": "cast", "value": {"expression": "iuref", "iu": "c.reloftyp"}, "type": ["RegType"], "errorHandling": "trap", "allowTrustedCasts": false}, "type": ["Varchar"], "errorHandling": "trap", "allowTrustedCasts": false}}}] + }] } diff --git a/standalone-app/examples/hyper/setoperation.plan.json b/standalone-app/examples/hyper/setoperation.plan.json index 07843f2..9219454 100644 --- a/standalone-app/examples/hyper/setoperation.plan.json +++ b/standalone-app/examples/hyper/setoperation.plan.json @@ -3,21 +3,23 @@ "operatorId": 1, "cardinality": 4008.5, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["Integer"]]}], + "output": [{"expression": "iuref", "iu": ["union", ["Integer"]]}, {"expression": "iuref", "iu": ["union2", ["Integer"]]}], "outputNames": ["a2", "b2"], - "input": { + "inputs": [{ "operator": "unionall", "operatorId": 2, "sqlpos": [[76, 85], [44, 53]], "cardinality": 4008.5, - "input": [{ + "inputs": [{ "operator": "tablescan", "operatorId": 3, "sqlpos": [[41, 43]], "cardinality": 2000, + "volatility": "stable", "relationId": 1, "schema": {"type":"sessionschema"}, - "values": [{"name": "a2", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "b2", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "c2", "type": ["Integer"], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a2", "type": ["Integer"], "iu": ["scan_a2", ["Integer"]]},{"colId": 1, "name": "b2", "type": ["Integer"], "iu": ["scan_b2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t2"}, "selectivity": 1 }, { @@ -25,9 +27,11 @@ "operatorId": 4, "sqlpos": [[73, 75]], "cardinality": 2000, + "volatility": "stable", "relationId": 1, "schema": {"type":"sessionschema"}, - "values": [{"name": "a2", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "b2", "type": ["Integer"], "iu": null}, {"name": "c2", "type": ["Integer"], "iu": ["v6", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a2", "type": ["Integer"], "iu": ["scan_a22", ["Integer"]]},{"colId": 2, "name": "c2", "type": ["Integer"], "iu": ["scan_c2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t2"}, "selectivity": 1 }, { @@ -35,55 +39,61 @@ "operatorId": 5, "sqlpos": [[190, 200]], "cardinality": 8.50385, - "input": [{ + "inputs": [{ "operator": "intersectall", "operatorId": 6, "sqlpos": [[132, 145]], "cardinality": 900, - "input": [{ + "inputs": [{ "operator": "tablescan", "operatorId": 7, "sqlpos": [[110, 112]], "cardinality": 1000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v9", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a1", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b1", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c1", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, - "restrictions": [{"attribute": 0, "mode": "<", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}], + "restrictions": [{"attribute": 0, "mode": "<", "selectivity": 0.5, "value": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}], "selectivity": 0.5 }, { "operator": "tablescan", "operatorId": 8, "sqlpos": [[168, 170]], "cardinality": 1000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v12", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a12", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b12", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c12", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, - "restrictions": [{"attribute": 0, "mode": ">", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}], + "restrictions": [{"attribute": 0, "mode": ">", "selectivity": 0.5, "value": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}], "selectivity": 0.5 }], - "ius": [["v13", ["Integer"]], ["v14", ["Integer"]]], - "values": [[{"expression": "iuref", "iu": "v8"}, {"expression": "iuref", "iu": "v9"}], [{"expression": "iuref", "iu": "v11"}, {"expression": "iuref", "iu": "v12"}]], + "ius": [["union3", ["Integer"]], ["union4", ["Integer"]]], + "values": [[{"expression": "iuref", "iu": "scan_b1"}, {"expression": "iuref", "iu": "scan_c1"}], [{"expression": "iuref", "iu": "scan_b12"}, {"expression": "iuref", "iu": "scan_c12"}]], "collates": [null, null] }, { "operator": "tablescan", "operatorId": 9, "sqlpos": [[223, 225]], "cardinality": 1000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v17", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a13", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b13", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c13", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, - "restrictions": [{"attribute": 0, "mode": ">", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}], + "restrictions": [{"attribute": 0, "mode": ">", "selectivity": 0.5, "value": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}], "selectivity": 0.5 }], - "ius": [["v18", ["Integer"]], ["v19", ["Integer"]]], - "values": [[{"expression": "iuref", "iu": "v13"}, {"expression": "iuref", "iu": "v14"}], [{"expression": "iuref", "iu": "v16"}, {"expression": "iuref", "iu": "v17"}]], + "ius": [["union5", ["Integer"]], ["union6", ["Integer"]]], + "values": [[{"expression": "iuref", "iu": "union3"}, {"expression": "iuref", "iu": "union4"}], [{"expression": "iuref", "iu": "scan_b13"}, {"expression": "iuref", "iu": "scan_c13"}]], "collates": [null, null] }], - "ius": [["v", ["Integer"]], ["v2", ["Integer"]]], - "values": [[{"expression": "iuref", "iu": "v3"}, {"expression": "iuref", "iu": "v4"}], [{"expression": "iuref", "iu": "v5"}, {"expression": "iuref", "iu": "v6"}], [{"expression": "iuref", "iu": "v18"}, {"expression": "iuref", "iu": "v19"}]], + "ius": [["union", ["Integer"]], ["union2", ["Integer"]]], + "values": [[{"expression": "iuref", "iu": "scan_a2"}, {"expression": "iuref", "iu": "scan_b2"}], [{"expression": "iuref", "iu": "scan_a22"}, {"expression": "iuref", "iu": "scan_c2"}], [{"expression": "iuref", "iu": "union5"}, {"expression": "iuref", "iu": "union6"}]], "collates": [null, null] - } + }] } diff --git a/standalone-app/examples/hyper/tableconstruction.plan.json b/standalone-app/examples/hyper/tableconstruction.plan.json index 49361f3..e4a8106 100644 --- a/standalone-app/examples/hyper/tableconstruction.plan.json +++ b/standalone-app/examples/hyper/tableconstruction.plan.json @@ -3,14 +3,15 @@ "operatorId": 1, "cardinality": 2, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Varchar"]]}, {"expression": "iuref", "iu": ["v2", ["Varchar"]]}], + "output": [{"expression": "iuref", "iu": ["tableconstruction", ["Varchar"]]}, {"expression": "iuref", "iu": ["tableconstruction2", ["Varchar"]]}], "outputNames": ["column1", "column2"], - "input": { + "inputs": [{ "operator": "tableconstruction", "operatorId": 2, "sqlpos": [[22, 38]], "cardinality": 2, - "output": [["v", ["Varchar"]], ["v2", ["Varchar"]]], - "values": [[{"expression": "const", "value": {"type": ["Varchar"], "value": "a"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "b"}}], [{"expression": "const", "value": {"type": ["Varchar"], "value": "c"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "d"}}]] - } + "output": [["tableconstruction", ["Varchar"]], ["tableconstruction2", ["Varchar"]]], + "values": [[{"expression": "const", "value": {"type": ["Varchar"], "value": "a"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "b"}}], [{"expression": "const", "value": {"type": ["Varchar"], "value": "c"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "d"}}]], + "inputs": [] + }] } diff --git a/standalone-app/examples/hyper/tablefunction.plan.json b/standalone-app/examples/hyper/tablefunction.plan.json index ae31249..3912cfd 100644 --- a/standalone-app/examples/hyper/tablefunction.plan.json +++ b/standalone-app/examples/hyper/tablefunction.plan.json @@ -3,22 +3,24 @@ "operatorId": 1, "cardinality": 10, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}], + "output": [{"expression": "iuref", "iu": ["sequence", ["Integer"]]}], "outputNames": ["generate_series"], - "input": { + "inputs": [{ "operator": "tablefunction", "operatorId": 2, "sqlpos": [[36, 51]], "cardinality": 10, - "input": { + "inputs": [{ "operator": "tableconstruction", "operatorId": 3, "cardinality": 1, "output": [], - "values": [[]] - }, + "values": [[]], + "inputs": [] + }], "function": "sequence", "args": [{"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 10}}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}], - "ius": [["v", ["Integer"]]] - } + "ius": [["sequence", ["Integer"]]], + "ordinality": ["ordinality", ["BigInt"]] + }] } diff --git a/standalone-app/examples/hyper/tablescan.plan.json b/standalone-app/examples/hyper/tablescan.plan.json index 58a0646..e97e77a 100644 --- a/standalone-app/examples/hyper/tablescan.plan.json +++ b/standalone-app/examples/hyper/tablescan.plan.json @@ -3,17 +3,19 @@ "operatorId": 1, "cardinality": 5, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 25]]}], + "output": [{"expression": "iuref", "iu": ["scan_r_name", ["Char", 25]]}], "outputNames": ["r_name"], - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 2, "sqlpos": [[41, 47]], "cardinality": 5, + "volatility": "stable", "relationId": 9, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": null}, {"name": "r_name", "type": ["Char", 25], "iu": ["v", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "region"}, "selectivity": 1 - } + }] } diff --git a/standalone-app/examples/hyper/tpch-q11-error-analyze.plan.json b/standalone-app/examples/hyper/tpch-q11-error-analyze.plan.json index ea58f8c..8eb2702 100644 --- a/standalone-app/examples/hyper/tpch-q11-error-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch-q11-error-analyze.plan.json @@ -1,172 +1,182 @@ { - "sql": "EXPLAIN (FORMAT JSON, ANALYZE)\n-- This query is derived from TPC-H query 11\n-- THE TPC SOFTWARE IS AVAILABLE WITHOUT CHARGE FROM TPC.\n-- The query was modified so that errors out during execution.\n-- We use it to test reporting of errors when running `ANALYZE`.\n\nselect\n ps_partkey,\n sum(ps_supplycost * ps_availqty) as \"value\"\nfrom\n partsupp,\n supplier,\n nation\nwhere\n ps_suppkey = s_suppkey\n and s_nationkey = n_nationkey\n and n_name = 'GERMANY'\ngroup by\n ps_partkey having\n sum(ps_supplycost * ps_availqty) > (\n select\n sum(ps_supplycost * ps_availqty) * 0.0001\n from\n partsupp,\n supplier,\n nation\n where\n ps_suppkey = s_suppkey\n and s_nationkey = n_nationkey\n and n_name = 'GERMANY'\n ) / 0\norder by\n \"value\" desc\n", "operator": "executiontarget", "operatorId": 1, "cardinality": 10.74, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigNumeric", 38, 2]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 2]]}], "outputNames": ["ps_partkey", "value"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1090, 1102]], "cardinality": 10.74, - "criterion": [{"value": {"expression": "iuref", "iu": "v2"}, "descending": true, "nullFirst": true}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "sum"}, "descending": true, "nullFirst": true}], + "inputs": [{ "operator": "join", "operatorId": 3, "cardinality": 10.74, "method": "hash", "singleMatch": true, - "left": { + "inputs": [{ "operator": "map", "operatorId": 4, "sqlpos": [[655, 696]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 5, "sqlpos": [[655, 687]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "join", "operatorId": 6, "cardinality": 21.48, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 7, "cardinality": 20.72, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 8, "sqlpos": [[842, 848]], "cardinality": 1, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v4", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}], "selectivity": 0.04, - "analyze": {"pipeline": 5, "cpu-cycles": 4527, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 1, "cpu-cycles": 655, "processed-rows": 25, "running": false, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 9, "sqlpos": [[800, 808]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v6", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 7, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 798, "running": false, "tuple-count": 19} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v3"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 19} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 401, "processed-rows": 518, "running": false, "tuple-count": 19} + }], + "earlyProbedBy": [9], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 4, "column-count": 1, "memory-bytes": 18552, "tuple-count": 19} + }, { "operator": "tablescan", "operatorId": 10, "sqlpos": [[758, 766]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": null}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v9", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 2, "name": "ps_availqty", "type": ["Integer"], "iu": ["scan_availqty", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 6, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 1158, "running": false, "tuple-count": 58} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v5"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 21} - }, + "analyze": {"pipeline": 3, "column-count": 3, "cpu-cycles": 408, "processed-rows": 537, "running": false, "tuple-count": 58} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey2"}, "right": {"expression": "iuref", "iu": "scan_suppkey"}}, + "analyze": {"pipeline": 3, "column-count": 2, "memory-bytes": 18552, "tuple-count": 21} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v8"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v10", ["BigNumeric", 38, 2, "nullable"]]}], - "analyze": {"pipeline": 2, "cpu-cycles": 17, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "values": [{"iu": ["v11", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 4], "value": 1}}}}], - "analyze": {"pipeline": 2, "tuple-count": 1} - }, - "right": { + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_supplyco"}, "right": {"expression": "iuref", "iu": "scan_availqty"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigNumeric", 38, 2, "nullable"]]}], + "analyze": {"pipeline": 2, "column-count": 1, "cpu-cycles": 1207, "memory-bytes": 0, "running": true, "tuple-count": 1} + }], + "values": [{"iu": ["map", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "sum2"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 4], "value": 1}}}}], + "analyze": {"pipeline": 2, "column-count": 1, "tuple-count": 1} + }, { "operator": "groupby", "operatorId": 11, "sqlpos": [[504, 531], [555, 587], [298, 330]], "cardinality": 21.48, - "input": { + "inputs": [{ "operator": "join", "operatorId": 12, "cardinality": 21.48, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 13, "cardinality": 20.72, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 14, "sqlpos": [[391, 397]], "cardinality": 1, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v13", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name2", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}], "selectivity": 0.04, - "analyze": {"pipeline": 8, "cpu-cycles": 46, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 8, "column-count": 1, "cpu-cycles": 0, "processed-rows": 0, "running": false, "tuple-count": 0} + }, { "operator": "tablescan", "operatorId": 15, "sqlpos": [[373, 381]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 13, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 13, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 7, "cpu-cycles": 148, "running": false, "tuple-count": 19} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v12"}}, - "analyze": {"pipeline": 7, "memory-bytes": 18432, "tuple-count": 19} - }, - "right": { + "analyze": {"pipeline": 7, "column-count": 2, "cpu-cycles": 0, "processed-rows": 0, "running": false, "tuple-count": 0} + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke4"}, "right": {"expression": "iuref", "iu": "scan_nationke3"}}, + "analyze": {"pipeline": 7, "column-count": 1, "memory-bytes": 0, "tuple-count": 0} + }, { "operator": "tablescan", "operatorId": 16, "sqlpos": [[355, 363]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v17", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v19", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 2, "name": "ps_availqty", "type": ["Integer"], "iu": ["scan_availqty2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 12, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 12, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 839, "running": false, "tuple-count": 58} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v14"}}, - "analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 21} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v16"}}, "iu": ["v", ["Integer"]]}], + "analyze": {"pipeline": 6, "column-count": 4, "cpu-cycles": 0, "processed-rows": 0, "running": false, "tuple-count": 0} + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}}, + "analyze": {"pipeline": 6, "column-count": 3, "memory-bytes": 0, "tuple-count": 0} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v18"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigNumeric", 38, 2]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 0, "memory-bytes": 18432, "running": true, "tuple-count": 0} - }, - "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "div", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 0}}}}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 0} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 0, "memory-bytes": 0, "running": false, "tuple-count": 0} - }, - "analyze": {"error": {"code": "22012", "message": {"original": "division by zero", "translation": "division by zero"}, "detail": null, "internalDetail": null, "hint": null}, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "scan_availqty2"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 2]]}], + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 0, "memory-bytes": 0, "running": false, "tuple-count": 0} + }], + "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "sum"}, "right": {"expression": "div", "left": {"expression": "iuref", "iu": "map"}, "right": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 0}}}}, + "analyze": {"pipeline": 1, "column-count": 2, "memory-bytes": 0, "tuple-count": 0} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 0, "memory-bytes": 0, "running": false, "tuple-count": 0} + }], + "analyze": {"error": {"code": "22012", "message": {"original": "division by zero", "translation": "division by zero"}, "detail": null, "internalDetail": null, "hint": null, "source": "User"}, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q1-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q1-analyze.plan.json index df9c34e..1602cb3 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q1-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q1-analyze.plan.json @@ -3,40 +3,42 @@ "operatorId": 1, "cardinality": 4, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char1"]]}, {"expression": "iuref", "iu": ["v2", ["Char1"]]}, {"expression": "iuref", "iu": ["v3", ["BigNumeric", 38, 2]]}, {"expression": "iuref", "iu": ["v4", ["BigNumeric", 38, 2]]}, {"expression": "iuref", "iu": ["v5", ["BigNumeric", 38, 4]]}, {"expression": "iuref", "iu": ["v6", ["BigNumeric", 38, 6]]}, {"expression": "iuref", "iu": ["v7", ["Numeric", 16, 6]]}, {"expression": "iuref", "iu": ["v8", ["Numeric", 16, 6]]}, {"expression": "iuref", "iu": ["v9", ["Numeric", 16, 6]]}, {"expression": "iuref", "iu": ["v10", ["BigInt"]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char1"]]}, {"expression": "iuref", "iu": ["GroupByKey2", ["Char1"]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 2]]}, {"expression": "iuref", "iu": ["sum2", ["BigNumeric", 38, 2]]}, {"expression": "iuref", "iu": ["sum3", ["BigNumeric", 38, 4]]}, {"expression": "iuref", "iu": ["sum4", ["BigNumeric", 38, 6]]}, {"expression": "iuref", "iu": ["avg", ["Numeric", 16, 6]]}, {"expression": "iuref", "iu": ["avg2", ["Numeric", 16, 6]]}, {"expression": "iuref", "iu": ["avg3", ["Numeric", 16, 6]]}, {"expression": "iuref", "iu": ["count", ["BigInt"]]}], "outputNames": ["l_returnflag", "l_linestatus", "sum_qty", "sum_base_price", "sum_disc_price", "sum_charge", "avg_qty", "avg_price", "avg_disc", "count_order"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[718, 730]], "cardinality": 4, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "GroupByKey2"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "groupby", "operatorId": 3, "sqlpos": [[649, 700], [193, 208], [229, 249], [277, 316], [344, 397], [421, 436], [457, 477], [500, 515], [537, 545]], "cardinality": 4, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 4, "sqlpos": [[574, 582]], "cardinality": 568, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v11", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v12", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v13", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": ["v14", ["Numeric", 12, 2]]}, {"name": "l_returnflag", "type": ["Char1"], "iu": ["v15", ["Char1"]]}, {"name": "l_linestatus", "type": ["Char1"], "iu": ["v16", ["Char1"]]}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v17", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity", ["Numeric", 12, 2]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 7, "name": "l_tax", "type": ["Numeric", 12, 2], "iu": ["scan_l_tax", ["Numeric", 12, 2]]},{"colId": 8, "name": "l_returnflag", "type": ["Char1"], "iu": ["scan_returnfl", ["Char1"]]},{"colId": 9, "name": "l_linestatus", "type": ["Char1"], "iu": ["scan_linestat", ["Char1"]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "restrictions": [{"attribute": 10, "mode": "<=", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2451059}}}], "selectivity": 0.993007, - "analyze": {"pipeline": 2, "cpu-cycles": 2717, "running": false, "tuple-count": 568} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v15"}}, "iu": ["v", ["Char1"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v16"}}, "iu": ["v2", ["Char1"]]}], + "analyze": {"pipeline": 2, "column-count": 6, "cpu-cycles": 1794, "processed-rows": 572, "running": false, "tuple-count": 568} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_returnfl"}}, "iu": ["GroupByKey", ["Char1"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_linestat"}}, "iu": ["GroupByKey2", ["Char1"]]}], "groupingSets": [{"keyIndices": [0, 1], "coreIndices": [0, 1], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v11"}}, {"value": {"expression": "iuref", "iu": "v12"}}, {"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v13"}}, "right": {"expression": "iuref", "iu": "v12"}}}, {"value": {"expression": "mul", "left": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v13"}}, "right": {"expression": "iuref", "iu": "v12"}}, "right": {"expression": "add", "left": {"expression": "iuref", "iu": "v14"}, "right": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}}}}, {"value": {"expression": "iuref", "iu": "v13"}}], - "aggregates": [{"source": 4294967295, "operation": {"aggregate": "count"}, "iu": ["v10", ["BigInt"]]}, {"source": 0, "operation": {"aggregate": "avg"}, "iu": ["v7", ["Numeric", 16, 6]]}, {"source": 4, "operation": {"aggregate": "avg"}, "iu": ["v9", ["Numeric", 16, 6]]}, {"source": 3, "operation": {"aggregate": "sum"}, "iu": ["v6", ["BigNumeric", 38, 6]]}, {"source": 1, "operation": {"aggregate": "avg"}, "iu": ["v8", ["Numeric", 16, 6]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v3", ["BigNumeric", 38, 2]]}, {"source": 1, "operation": {"aggregate": "sum"}, "iu": ["v4", ["BigNumeric", 38, 2]]}, {"source": 2, "operation": {"aggregate": "sum"}, "iu": ["v5", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 187, "memory-bytes": 18432, "running": false, "tuple-count": 4} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 91, "memory-bytes": 262176, "running": false, "tuple-count": 4} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_quantity"}}, {"value": {"expression": "iuref", "iu": "scan_extended"}}, {"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}, {"value": {"expression": "mul", "left": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}, "right": {"expression": "add", "left": {"expression": "iuref", "iu": "scan_l_tax"}, "right": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}}}}, {"value": {"expression": "iuref", "iu": "scan_discount"}}], + "aggregates": [{"source": null, "operation": {"aggregate": "count"}, "iu": ["count", ["BigInt"]]}, {"source": 4, "operation": {"aggregate": "avg"}, "iu": ["avg3", ["Numeric", 16, 6]]}, {"source": 0, "operation": {"aggregate": "avg"}, "iu": ["avg", ["Numeric", 16, 6]]}, {"source": 3, "operation": {"aggregate": "sum"}, "iu": ["sum4", ["BigNumeric", 38, 6]]}, {"source": 1, "operation": {"aggregate": "avg"}, "iu": ["avg2", ["Numeric", 16, 6]]}, {"source": 1, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigNumeric", 38, 2]]}, {"source": 2, "operation": {"aggregate": "sum"}, "iu": ["sum3", ["BigNumeric", 38, 4]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 2]]}], + "analyze": {"pipeline": 1, "column-count": 10, "cpu-cycles": 267, "memory-bytes": 18552, "running": false, "tuple-count": 4} + }], + "analyze": {"pipeline": 0, "column-count": 10, "cpu-cycles": 103, "memory-bytes": 262176, "running": false, "tuple-count": 4} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q10-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q10-analyze.plan.json index 8a1e524..08f6b27 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q10-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q10-analyze.plan.json @@ -3,108 +3,116 @@ "operatorId": 1, "cardinality": 9.61875, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["Varchar", 25]]}, {"expression": "iuref", "iu": ["v3", ["BigNumeric", 38, 4]]}, {"expression": "iuref", "iu": ["v4", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 117]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, {"expression": "iuref", "iu": ["GroupByKey2", ["Varchar", 25]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4]]}, {"expression": "iuref", "iu": ["GroupByKey3", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["GroupByKey4", ["Char", 25]]}, {"expression": "iuref", "iu": ["GroupByKey5", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["GroupByKey6", ["Char", 15]]}, {"expression": "iuref", "iu": ["GroupByKey7", ["Varchar", 117]]}], "outputNames": ["c_custkey", "c_name", "revenue", "c_acctbal", "n_name", "c_address", "c_phone", "c_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[777, 789], [790, 799]], + "sqlpos": [[778, 790], [791, 800]], "cardinality": 9.61875, - "criterion": [{"value": {"expression": "iuref", "iu": "v3"}, "descending": true, "nullFirst": true}], + "criterion": [{"value": {"expression": "iuref", "iu": "sum"}, "descending": true, "nullFirst": true}], "limit": 20, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[627, 759], [184, 223]], + "sqlpos": [[628, 760], [185, 224]], "cardinality": 9.61875, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 10.6875, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 9, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 6, "cardinality": 9, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 7, - "sqlpos": [[356, 362]], + "sqlpos": [[357, 363]], "cardinality": 9, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": ["v11", ["Date"]]}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer"]]},{"colId": 4, "name": "o_orderdate", "type": ["Date"], "iu": ["scan_orderdat", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, "restrictions": [{"attribute": 4, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449262}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}}], "selectivity": 0.0703125, - "analyze": {"pipeline": 5, "cpu-cycles": 136, "running": false, "tuple-count": 9} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 510, "processed-rows": 128, "running": false, "tuple-count": 9} + }, { "operator": "tablescan", "operatorId": 8, - "sqlpos": [[338, 346]], + "sqlpos": [[339, 347]], "cardinality": 129, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": ["v13", ["Varchar", 25]]}, {"name": "c_address", "type": ["Varchar", 40], "iu": ["v14", ["Varchar", 40]]}, {"name": "c_nationkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "c_phone", "type": ["Char", 15], "iu": ["v16", ["Char", 15]]}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": ["v18", ["Varchar", 117]]}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]},{"colId": 1, "name": "c_name", "type": ["Varchar", 25], "iu": ["scan_c_name", ["Varchar", 25]]},{"colId": 2, "name": "c_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "c_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 4, "name": "c_phone", "type": ["Char", 15], "iu": ["scan_c_phone", ["Char", 15]]},{"colId": 5, "name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 7, "name": "c_comment", "type": ["Varchar", 117], "iu": ["scan_comment", ["Varchar", 117]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, - "earlyProbes": [{"builder": 6, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0697674], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 284, "running": false, "tuple-count": 15} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v10"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 9} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 7, "cpu-cycles": 198, "processed-rows": 129, "running": false, "tuple-count": 15} + }], + "earlyProbedBy": [8], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey2"}, "right": {"expression": "iuref", "iu": "scan_custkey"}}, + "analyze": {"pipeline": 4, "column-count": 8, "memory-bytes": 18552, "tuple-count": 9} + }, { "operator": "tablescan", "operatorId": 9, - "sqlpos": [[390, 396]], + "sqlpos": [[391, 397]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v20", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 5, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.36], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 145, "running": false, "tuple-count": 11} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v19"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 9} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 2, "cpu-cycles": 131, "processed-rows": 25, "running": false, "tuple-count": 11} + }], + "earlyProbedBy": [9], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke"}, "right": {"expression": "iuref", "iu": "scan_nationke2"}}, + "analyze": {"pipeline": 3, "column-count": 8, "memory-bytes": 18552, "tuple-count": 9} + }, { "operator": "tablescan", "operatorId": 10, - "sqlpos": [[372, 380]], + "sqlpos": [[373, 381]], "cardinality": 152, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v21", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v22", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v23", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": ["v24", ["Char1"]]}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 8, "name": "l_returnflag", "type": ["Char1"], "iu": ["scan_returnfl", ["Char1"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "restrictions": [{"attribute": 8, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char1"], "value": 82}}}], - "earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 4, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0703125], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.265734, - "analyze": {"pipeline": 2, "cpu-cycles": 411, "running": false, "tuple-count": 37} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v21"}, "right": {"expression": "iuref", "iu": "v9"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 23} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v12"}}, "iu": ["v", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v13"}}, "iu": ["v2", ["Varchar", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "v17"}}, "iu": ["v4", ["Numeric", 12, 2]]}, {"expression": {"value": {"expression": "iuref", "iu": "v16"}}, "iu": ["v7", ["Char", 15]]}, {"expression": {"value": {"expression": "iuref", "iu": "v20"}}, "iu": ["v5", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "v14"}}, "iu": ["v6", ["Varchar", 40]]}, {"expression": {"value": {"expression": "iuref", "iu": "v18"}}, "iu": ["v8", ["Varchar", 117]]}], + "analyze": {"pipeline": 2, "column-count": 3, "cpu-cycles": 443, "processed-rows": 572, "running": false, "tuple-count": 37} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey2"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, + "analyze": {"pipeline": 2, "column-count": 9, "memory-bytes": 18552, "tuple-count": 23} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_custkey2"}}, "iu": ["GroupByKey", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_c_name"}}, "iu": ["GroupByKey2", ["Varchar", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_acctbal"}}, "iu": ["GroupByKey3", ["Numeric", 12, 2]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_c_phone"}}, "iu": ["GroupByKey6", ["Char", 15]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_n_name"}}, "iu": ["GroupByKey4", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_address"}}, "iu": ["GroupByKey5", ["Varchar", 40]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_comment"}}, "iu": ["GroupByKey7", ["Varchar", 117]]}], "groupingSets": [{"keyIndices": [0, 1, 2, 3, 4, 5, 6], "coreIndices": [0, 1, 2, 3, 4, 5, 6], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v23"}}, "right": {"expression": "iuref", "iu": "v22"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v3", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 243, "memory-bytes": 18432, "running": false, "tuple-count": 8} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 175, "heap-gc-passes": 0, "memory-bytes": 262208, "running": false, "tuple-count": 8} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4]]}], + "analyze": {"pipeline": 1, "column-count": 8, "cpu-cycles": 307, "memory-bytes": 18552, "running": false, "tuple-count": 8} + }], + "analyze": {"pipeline": 0, "column-count": 8, "cpu-cycles": 180, "heap-gc-passes": 0, "memory-bytes": 262208, "running": false, "tuple-count": 8} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q11-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q11-analyze.plan.json index 832675e..0de210c 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q11-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q11-analyze.plan.json @@ -3,169 +3,180 @@ "operatorId": 1, "cardinality": 10.74, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigNumeric", 38, 2]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 2]]}], "outputNames": ["ps_partkey", "value"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[957, 969]], + "sqlpos": [[958, 970]], "cardinality": 10.74, - "criterion": [{"value": {"expression": "iuref", "iu": "v2"}, "descending": true, "nullFirst": true}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "sum"}, "descending": true, "nullFirst": true}], + "inputs": [{ "operator": "join", "operatorId": 3, "cardinality": 10.74, "method": "hash", "singleMatch": true, - "left": { + "inputs": [{ "operator": "map", "operatorId": 4, - "sqlpos": [[526, 567]], + "sqlpos": [[527, 568]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 5, - "sqlpos": [[526, 558]], + "sqlpos": [[527, 559]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "join", "operatorId": 6, "cardinality": 21.48, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 7, "cardinality": 20.72, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 8, - "sqlpos": [[713, 719]], + "sqlpos": [[714, 720]], "cardinality": 1, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v4", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}], "selectivity": 0.04, - "analyze": {"pipeline": 5, "cpu-cycles": 485, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 1, "cpu-cycles": 501, "processed-rows": 25, "running": false, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 9, - "sqlpos": [[671, 679]], + "sqlpos": [[672, 680]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v6", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 7, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 700, "running": false, "tuple-count": 19} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v3"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 19} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 334, "processed-rows": 518, "running": false, "tuple-count": 19} + }], + "earlyProbedBy": [9], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 4, "column-count": 1, "memory-bytes": 18552, "tuple-count": 19} + }, { "operator": "tablescan", "operatorId": 10, - "sqlpos": [[629, 637]], + "sqlpos": [[630, 638]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": null}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v9", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 2, "name": "ps_availqty", "type": ["Integer"], "iu": ["scan_availqty", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 6, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 957, "running": false, "tuple-count": 58} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v5"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 21} - }, + "analyze": {"pipeline": 3, "column-count": 3, "cpu-cycles": 451, "processed-rows": 537, "running": false, "tuple-count": 58} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey2"}, "right": {"expression": "iuref", "iu": "scan_suppkey"}}, + "analyze": {"pipeline": 3, "column-count": 2, "memory-bytes": 18552, "tuple-count": 21} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v8"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v10", ["BigNumeric", 38, 2, "nullable"]]}], - "analyze": {"pipeline": 2, "cpu-cycles": 12, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "values": [{"iu": ["v11", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 4], "value": 1}}}}], - "analyze": {"pipeline": 2, "tuple-count": 1} - }, - "right": { + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_supplyco"}, "right": {"expression": "iuref", "iu": "scan_availqty"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigNumeric", 38, 2, "nullable"]]}], + "analyze": {"pipeline": 2, "column-count": 1, "cpu-cycles": 18, "memory-bytes": 0, "running": false, "tuple-count": 1} + }], + "values": [{"iu": ["map", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "sum2"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 4], "value": 1}}}}], + "analyze": {"pipeline": 2, "column-count": 1, "tuple-count": 1} + }, { "operator": "groupby", "operatorId": 11, - "sqlpos": [[375, 402], [426, 458], [169, 201]], + "sqlpos": [[376, 403], [427, 459], [170, 202]], "cardinality": 21.48, - "input": { + "inputs": [{ "operator": "join", "operatorId": 12, "cardinality": 21.48, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 13, "cardinality": 20.72, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 14, - "sqlpos": [[262, 268]], + "sqlpos": [[263, 269]], "cardinality": 1, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v13", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name2", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}], "selectivity": 0.04, - "analyze": {"pipeline": 8, "cpu-cycles": 41, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 8, "column-count": 1, "cpu-cycles": 111, "processed-rows": 25, "running": false, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 15, - "sqlpos": [[244, 252]], + "sqlpos": [[245, 253]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 13, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 13, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 7, "cpu-cycles": 129, "running": false, "tuple-count": 19} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v12"}}, - "analyze": {"pipeline": 7, "memory-bytes": 18432, "tuple-count": 19} - }, - "right": { + "analyze": {"pipeline": 7, "column-count": 2, "cpu-cycles": 266, "processed-rows": 518, "running": false, "tuple-count": 19} + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke4"}, "right": {"expression": "iuref", "iu": "scan_nationke3"}}, + "analyze": {"pipeline": 7, "column-count": 1, "memory-bytes": 18552, "tuple-count": 19} + }, { "operator": "tablescan", "operatorId": 16, - "sqlpos": [[226, 234]], + "sqlpos": [[227, 235]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v17", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v19", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 2, "name": "ps_availqty", "type": ["Integer"], "iu": ["scan_availqty2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 12, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 12, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 749, "running": false, "tuple-count": 58} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v14"}}, - "analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 21} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v16"}}, "iu": ["v", ["Integer"]]}], + "analyze": {"pipeline": 6, "column-count": 4, "cpu-cycles": 428, "processed-rows": 537, "running": false, "tuple-count": 58} + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}}, + "analyze": {"pipeline": 6, "column-count": 3, "memory-bytes": 18552, "tuple-count": 21} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v18"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigNumeric", 38, 2]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 254, "memory-bytes": 18432, "running": false, "tuple-count": 21} - }, - "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "iuref", "iu": "v11"}}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 21} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 233, "memory-bytes": 262312, "running": false, "tuple-count": 21} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "scan_availqty2"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 2]]}], + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 310, "memory-bytes": 18552, "running": false, "tuple-count": 21} + }], + "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "sum"}, "right": {"expression": "iuref", "iu": "map"}}, + "analyze": {"pipeline": 1, "column-count": 2, "memory-bytes": 18552, "tuple-count": 21} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 231, "memory-bytes": 262312, "running": false, "tuple-count": 21} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q12-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q12-analyze.plan.json index acff68a..81f53b5 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q12-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q12-analyze.plan.json @@ -3,63 +3,67 @@ "operatorId": 1, "cardinality": 7, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 10]]}, {"expression": "iuref", "iu": ["v2", ["BigInt"]]}, {"expression": "iuref", "iu": ["v3", ["BigInt"]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char", 10]]}, {"expression": "iuref", "iu": ["sum", ["BigInt"]]}, {"expression": "iuref", "iu": ["sum2", ["BigInt"]]}], "outputNames": ["l_shipmode", "high_line_count", "low_line_count"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[914, 924]], + "sqlpos": [[915, 925]], "cardinality": 7, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[869, 896], [169, 348], [377, 559]], + "sqlpos": [[870, 897], [170, 349], [378, 560]], "cardinality": 7, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 26.25, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 5, - "sqlpos": [[607, 615]], + "sqlpos": [[608, 616]], "cardinality": 26.25, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v5", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": ["v6", ["Date"]]}, {"name": "l_receiptdate", "type": ["Date"], "iu": ["v7", ["Date"]]}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": ["v8", ["Char", 10]]}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]},{"colId": 11, "name": "l_commitdate", "type": ["Date"], "iu": ["scan_commitda", ["Date"]]},{"colId": 12, "name": "l_receiptdate", "type": ["Date"], "iu": ["scan_receiptd", ["Date"]]},{"colId": 14, "name": "l_shipmode", "type": ["Char", 10], "iu": ["scan_shipmode", ["Char", 10]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "restrictions": [{"attribute": 12, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}}, {"attribute": 14, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "v8"}], "values": [{"type": ["Char", 10], "value": "MAIL"}, {"type": ["Char", 10], "value": "SHIP"}], "collates": [null], "modes": ["equals"]}}], - "residuals": [{"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v7"}}, {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "v5"}, "right": {"expression": "iuref", "iu": "v6"}}], + "restrictions": [{"attribute": 12, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}}, {"attribute": 14, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "scan_shipmode"}], "values": [{"type": ["Char", 10], "value": "MAIL"}, {"type": ["Char", 10], "value": "SHIP"}], "collates": [null], "modes": ["equals"]}}], + "residuals": [{"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "scan_commitda"}, "right": {"expression": "iuref", "iu": "scan_receiptd"}}, {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "scan_shipdate"}, "right": {"expression": "iuref", "iu": "scan_commitda"}}], "selectivity": 0.0458916, - "analyze": {"pipeline": 3, "cpu-cycles": 704, "running": false, "tuple-count": 2} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 2, "cpu-cycles": 789, "processed-rows": 572, "running": false, "tuple-count": 2} + }, { "operator": "tablescan", "operatorId": 6, - "sqlpos": [[591, 597]], + "sqlpos": [[592, 598]], "cardinality": 128, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": null}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": null}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": ["v10", ["Char", 15]]}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 5, "name": "o_orderpriority", "type": ["Char", 15], "iu": ["scan_orderpri", ["Char", 15]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, - "earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 4, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.205078], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 232, "running": false, "tuple-count": 4} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v4"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 2} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v8"}}, "iu": ["v", ["Char", 10]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 228, "processed-rows": 128, "running": false, "tuple-count": 4} + }], + "earlyProbedBy": [6], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey2"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, + "analyze": {"pipeline": 2, "column-count": 2, "memory-bytes": 18552, "tuple-count": 2} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_shipmode"}}, "iu": ["GroupByKey", ["Char", 10]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "simplecase", "value": {"expression": "iuref", "iu": "v10"}, "cases": [{"cases": [{"expression": "const", "value": {"type": ["Varchar"], "value": "1-URGENT"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "2-HIGH"}}], "value": {"expression": "const", "value": {"type": ["Integer"], "value": 1}}}], "else": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}}, {"value": {"expression": "case", "cases": [{"case": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Char", 15], "value": "1-URGENT"}}}, {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Char", 15], "value": "2-HIGH"}}}]}, "value": {"expression": "const", "value": {"type": ["Integer"], "value": 1}}}], "else": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}}], - "aggregates": [{"source": 1, "operation": {"aggregate": "sum"}, "iu": ["v3", ["BigInt"]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigInt"]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 208, "memory-bytes": 18432, "running": false, "tuple-count": 2} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 26, "memory-bytes": 262160, "running": false, "tuple-count": 2} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "simplecase", "value": {"expression": "iuref", "iu": "scan_orderpri"}, "cases": [{"cases": [{"expression": "const", "value": {"type": ["Varchar"], "value": "1-URGENT"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "2-HIGH"}}], "value": {"expression": "const", "value": {"type": ["Integer"], "value": 1}}}], "else": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}}, {"value": {"expression": "case", "cases": [{"case": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "scan_orderpri"}, "right": {"expression": "const", "value": {"type": ["Char", 15], "value": "1-URGENT"}}}, {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "scan_orderpri"}, "right": {"expression": "const", "value": {"type": ["Char", 15], "value": "2-HIGH"}}}]}, "value": {"expression": "const", "value": {"type": ["Integer"], "value": 1}}}], "else": {"expression": "const", "value": {"type": ["Integer"], "value": 0}}}}], + "aggregates": [{"source": 1, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigInt"]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigInt"]]}], + "analyze": {"pipeline": 1, "column-count": 3, "cpu-cycles": 197, "memory-bytes": 18552, "running": false, "tuple-count": 2} + }], + "analyze": {"pipeline": 0, "column-count": 3, "cpu-cycles": 60, "memory-bytes": 262160, "running": false, "tuple-count": 2} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q13-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q13-analyze.plan.json index e0402c0..ff33f86 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q13-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q13-analyze.plan.json @@ -1,73 +1,76 @@ { "operator": "executiontarget", "operatorId": 1, - "cardinality": 116.1, + "cardinality": 3, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["BigInt"]]}, {"expression": "iuref", "iu": ["v2", ["BigInt"]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["BigInt"]]}, {"expression": "iuref", "iu": ["count", ["BigInt"]]}], "outputNames": ["c_count", "custdist"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[643, 656]], - "cardinality": 116.1, - "criterion": [{"value": {"expression": "iuref", "iu": "v2"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}], - "input": { + "sqlpos": [[644, 657]], + "cardinality": 3, + "criterion": [{"value": {"expression": "iuref", "iu": "count"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": true, "nullFirst": true}], + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[601, 625], [166, 174]], - "cardinality": 116.1, - "input": { + "sqlpos": [[602, 626], [167, 175]], + "cardinality": 3, + "inputs": [{ "operator": "groupby", "operatorId": 4, - "sqlpos": [[536, 578], [284, 301]], + "sqlpos": [[537, 579], [285, 302]], "cardinality": 129, - "input": { + "inputs": [{ "operator": "rightouterjoin", "operatorId": 5, "cardinality": 175.641, "method": "hash", - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 6, - "sqlpos": [[380, 386]], + "sqlpos": [[381, 387]], "cardinality": 128, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v3", ["Integer", "nullable"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v4", ["Integer", "nullable"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": null}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": ["v5", ["Varchar", 79, "nullable"]]}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer", "nullable"]]},{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer", "nullable"]]},{"colId": 8, "name": "o_comment", "type": ["Varchar", 79], "iu": ["scan_comment", ["Varchar", 79, "nullable"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, - "restrictions": [{"attribute": 8, "mode": "lambda", "expression": {"expression": "not", "input": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v5"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%special%requests%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}}], + "restrictions": [{"attribute": 8, "mode": "lambda", "expression": {"expression": "not", "input": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_comment"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%special%requests%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 433, "running": false, "tuple-count": 128} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 824, "processed-rows": 128, "running": false, "tuple-count": 128} + }, { "operator": "tablescan", "operatorId": 7, - "sqlpos": [[355, 363]], + "sqlpos": [[356, 364]], "cardinality": 129, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v6", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": null}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": null}, {"name": "c_phone", "type": ["Char", 15], "iu": null}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 938, "running": false, "tuple-count": 129} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v4"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 129} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v6"}}, "iu": ["v7", ["Integer"]]}], + "analyze": {"pipeline": 3, "column-count": 1, "cpu-cycles": 293, "processed-rows": 129, "running": false, "tuple-count": 129} + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey2"}, "right": {"expression": "iuref", "iu": "scan_custkey"}}, + "analyze": {"pipeline": 3, "column-count": 2, "memory-bytes": 18552, "tuple-count": 129} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_custkey2"}}, "iu": ["GroupByKey2", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v3"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "count"}, "iu": ["v8", ["BigInt"]]}], - "analyze": {"pipeline": 2, "cpu-cycles": 570, "memory-bytes": 20480, "running": false, "tuple-count": 129} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v8"}}, "iu": ["v", ["BigInt"]]}], + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_orderkey"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "count"}, "iu": ["count2", ["BigInt"]]}], + "analyze": {"pipeline": 2, "column-count": 1, "cpu-cycles": 175, "memory-bytes": 20600, "running": false, "tuple-count": 129} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "count2"}}, "iu": ["GroupByKey", ["BigInt"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggregates": [{"source": 4294967295, "operation": {"aggregate": "count"}, "iu": ["v2", ["BigInt"]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 244, "memory-bytes": 18432, "running": false, "tuple-count": 2} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 17, "memory-bytes": 262160, "running": false, "tuple-count": 2} - }, - "analyze": {"error": null, "pipeline": 0} + "aggregates": [{"source": null, "operation": {"aggregate": "count"}, "iu": ["count", ["BigInt"]]}], + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 100, "memory-bytes": 18552, "running": false, "tuple-count": 2} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 52, "memory-bytes": 262160, "running": false, "tuple-count": 2} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q14-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q14-analyze.plan.json index 7ac678a..8f321b6 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q14-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q14-analyze.plan.json @@ -3,61 +3,65 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["BigNumeric", 38, 6, "nullable"]]}], + "output": [{"expression": "iuref", "iu": ["map", ["BigNumeric", 38, 6, "nullable"]]}], "outputNames": ["promo_revenue"], - "input": { + "inputs": [{ "operator": "map", "operatorId": 2, - "sqlpos": [[149, 367]], + "sqlpos": [[150, 368]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[158, 308], [311, 350]], + "sqlpos": [[159, 309], [312, 351]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 11, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 5, - "sqlpos": [[381, 389]], + "sqlpos": [[382, 390]], "cardinality": 11, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": ["v2", ["Integer"]]}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v3", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v4", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v5", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 1, "name": "l_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "restrictions": [{"attribute": 10, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449962}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449992}}}], "selectivity": 0.0192308, - "analyze": {"pipeline": 2, "cpu-cycles": 120, "running": false, "tuple-count": 11} - }, - "right": { + "analyze": {"pipeline": 2, "column-count": 3, "cpu-cycles": 423, "processed-rows": 572, "running": false, "tuple-count": 11} + }, { "operator": "tablescan", "operatorId": 6, - "sqlpos": [[399, 403]], + "sqlpos": [[400, 404]], "cardinality": 533, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v6", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": null}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v7", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": null}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, - "earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 4, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0206379], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 1, "cpu-cycles": 982, "running": false, "tuple-count": 37} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "iuref", "iu": "v6"}}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 11} - }, + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 356, "processed-rows": 533, "running": false, "tuple-count": 37} + }], + "earlyProbedBy": [6], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey2"}}, + "analyze": {"pipeline": 1, "column-count": 3, "memory-bytes": 18552, "tuple-count": 11} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "case", "cases": [{"case": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v7"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "PROMO%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}, "value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v4"}}, "right": {"expression": "iuref", "iu": "v3"}}}], "else": {"expression": "const", "value": {"type": ["BigNumeric", 25, 4], "low": 0, "high": 0}}}}, {"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v4"}}, "right": {"expression": "iuref", "iu": "v3"}}}], - "aggregates": [{"source": 1, "operation": {"aggregate": "sum"}, "iu": ["v8", ["BigNumeric", 38, 4, "nullable"]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v9", ["BigNumeric", 38, 4, "nullable"]]}], - "analyze": {"pipeline": 0, "cpu-cycles": 30, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "values": [{"iu": ["v", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "div", "left": {"expression": "mul", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 2], "value": 10000}}}, "right": {"expression": "iuref", "iu": "v8"}}}], - "analyze": {"pipeline": 0, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "case", "cases": [{"case": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "PROMO%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}, "value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], "else": {"expression": "const", "value": {"type": ["BigNumeric", 25, 4], "low": 0, "high": 0}}}}, {"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "aggregates": [{"source": 1, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4, "nullable"]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigNumeric", 38, 4, "nullable"]]}], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 55, "memory-bytes": 0, "running": false, "tuple-count": 1} + }], + "values": [{"iu": ["map", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "div", "left": {"expression": "mul", "left": {"expression": "iuref", "iu": "sum2"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 2], "value": 10000}}}, "right": {"expression": "iuref", "iu": "sum"}}}], + "analyze": {"pipeline": 0, "column-count": 1, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q15-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q15-analyze.plan.json index 93ec51a..006e7eb 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q15-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q15-analyze.plan.json @@ -3,97 +3,100 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v4", ["Char", 15]]}, {"expression": "iuref", "iu": ["v5", ["BigNumeric", 38, 4]]}], + "output": [{"expression": "iuref", "iu": ["scan_suppkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4]]}], "outputNames": ["s_suppkey", "s_name", "s_address", "s_phone", "total_revenue"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[571, 580]], + "sqlpos": [[572, 581]], "cardinality": 1, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "scan_suppkey"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "join", "operatorId": 3, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 1, "method": "hash", "singleMatch": true, - "left": { + "inputs": [{ "operator": "groupby", "operatorId": 5, - "sqlpos": [[521, 539]], + "sqlpos": [[522, 540]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "explicitscan", "operatorId": 6, "cardinality": 50, - "mapping": [{"source": {"expression": "iuref", "iu": ["v6", ["Integer"]]}, "target": ["v7", ["Integer"]]}, {"source": {"expression": "iuref", "iu": ["v8", ["BigNumeric", 38, 4]]}, "target": ["v9", ["BigNumeric", 38, 4]]}], + "mapping": [{"source": {"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, "target": ["GroupByKey2", ["Integer"]]}, {"source": {"expression": "iuref", "iu": ["sum2", ["BigNumeric", 38, 4]]}, "target": ["sum3", ["BigNumeric", 38, 4]]}], "input": { "operator": "groupby", "operatorId": 7, - "sqlpos": [[343, 363], [190, 229]], + "sqlpos": [[344, 364], [191, 230]], "cardinality": 50, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 8, - "sqlpos": [[255, 263]], + "sqlpos": [[256, 264]], "cardinality": 50, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v11", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v12", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v13", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "restrictions": [{"attribute": 10, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2450084}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2450175}}}], "selectivity": 0.0874126, - "analyze": {"pipeline": 6, "cpu-cycles": 223, "running": false, "tuple-count": 50} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v10"}}, "iu": ["v6", ["Integer"]]}], + "analyze": {"pipeline": 6, "column-count": 3, "cpu-cycles": 635, "processed-rows": 572, "running": false, "tuple-count": 50} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_suppkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v12"}}, "right": {"expression": "iuref", "iu": "v11"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v8", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 5, "cpu-cycles": 0, "memory-bytes": 18432, "running": false, "tuple-count": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigNumeric", 38, 4]]}], + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 0, "memory-bytes": 18552, "running": false, "tuple-count": 0} }, - "analyze": {"pipeline": 4, "cpu-cycles": 259, "running": false, "tuple-count": 50} - }, + "analyze": {"pipeline": 4, "column-count": 1, "cpu-cycles": 176, "running": false, "tuple-count": 50} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v9"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "max"}, "iu": ["v14", ["BigNumeric", 38, 4, "nullable"]]}], - "analyze": {"pipeline": 3, "cpu-cycles": 14, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "right": { + "aggExpressions": [{"value": {"expression": "iuref", "iu": "sum3"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "max"}, "iu": ["max", ["BigNumeric", 38, 4, "nullable"]]}], + "analyze": {"pipeline": 3, "column-count": 1, "cpu-cycles": 37, "memory-bytes": 0, "running": false, "tuple-count": 1} + }, { "operator": "explicitscan", "operatorId": 9, "cardinality": 50, - "mapping": [{"source": {"expression": "iuref", "iu": "v6"}, "target": ["v15", ["Integer"]]}, {"source": {"expression": "iuref", "iu": "v8"}, "target": ["v5", ["BigNumeric", 38, 4]]}], + "mapping": [{"source": {"expression": "iuref", "iu": "GroupByKey"}, "target": ["GroupByKey3", ["Integer"]]}, {"source": {"expression": "iuref", "iu": "sum2"}, "target": ["sum", ["BigNumeric", 38, 4]]}], "input": 7, - "analyze": {"pipeline": 2, "cpu-cycles": 276, "running": false, "tuple-count": 50} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v5"}, "right": {"expression": "iuref", "iu": "v14"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 91, "running": false, "tuple-count": 50} + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "sum"}, "right": {"expression": "iuref", "iu": "max"}}, + "analyze": {"pipeline": 2, "column-count": 2, "memory-bytes": 18552, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 10, - "sqlpos": [[436, 444]], + "sqlpos": [[437, 445]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v3", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": null}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v4", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 3, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 3, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0019305], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 1, "cpu-cycles": 90, "running": false, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v"}, "right": {"expression": "iuref", "iu": "v15"}}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 1} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 32, "memory-bytes": 262152, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "analyze": {"pipeline": 1, "column-count": 4, "cpu-cycles": 261, "processed-rows": 518, "running": false, "tuple-count": 1} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "GroupByKey3"}}, + "analyze": {"pipeline": 1, "column-count": 5, "memory-bytes": 18552, "tuple-count": 1} + }], + "analyze": {"pipeline": 0, "column-count": 5, "cpu-cycles": 65, "memory-bytes": 262152, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q16-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q16-analyze.plan.json index 6019f9c..621e1a8 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q16-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q16-analyze.plan.json @@ -3,83 +3,88 @@ "operatorId": 1, "cardinality": 81, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 10]]}, {"expression": "iuref", "iu": ["v2", ["Varchar", 25]]}, {"expression": "iuref", "iu": ["v3", ["Integer"]]}, {"expression": "iuref", "iu": ["v4", ["BigInt"]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char", 10]]}, {"expression": "iuref", "iu": ["GroupByKey2", ["Varchar", 25]]}, {"expression": "iuref", "iu": ["GroupByKey3", ["Integer"]]}, {"expression": "iuref", "iu": ["count", ["BigInt"]]}], "outputNames": ["p_brand", "p_type", "p_size", "supplier_cnt"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[760, 777]], + "sqlpos": [[761, 778]], "cardinality": 81, - "criterion": [{"value": {"expression": "iuref", "iu": "v4"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "count"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "GroupByKey2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "GroupByKey3"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[686, 742], [198, 224]], + "sqlpos": [[687, 743], [199, 225]], "cardinality": 81, - "input": { + "inputs": [{ "operator": "rightantijoin", "operatorId": 4, "cardinality": 81.4503, "method": "hash", - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 5, - "sqlpos": [[582, 590]], + "sqlpos": [[583, 591]], "cardinality": 1, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": null}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v6", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "restrictions": [{"attribute": 6, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v6"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%Customer%Complaints%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "restrictions": [{"attribute": 6, "mode": "lambda", "selectivity": 0.1, "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_comment"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%Customer%Complaints%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], "selectivity": 0.0019305, - "analyze": {"pipeline": 3, "cpu-cycles": 961, "running": false, "tuple-count": 0} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 1, "cpu-cycles": 1055, "processed-rows": 518, "running": false, "tuple-count": 0} + }, { "operator": "join", "operatorId": 6, "cardinality": 81.6079, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 7, - "sqlpos": [[272, 276]], + "sqlpos": [[273, 277]], "cardinality": 81, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": null}, {"name": "p_brand", "type": ["Char", 10], "iu": ["v8", ["Char", 10]]}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v9", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 3, "name": "p_brand", "type": ["Char", 10], "iu": ["scan_p_brand", ["Char", 10]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 5, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "v10"}], "values": [{"type": ["Integer"], "value": 3}, {"type": ["Integer"], "value": 9}, {"type": ["Integer"], "value": 14}, {"type": ["Integer"], "value": 19}, {"type": ["Integer"], "value": 23}, {"type": ["Integer"], "value": 36}, {"type": ["Integer"], "value": 45}, {"type": ["Integer"], "value": 49}], "collates": [null], "modes": ["equals"]}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "not", "input": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v9"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "MEDIUM POLISHED%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}}, {"attribute": 3, "mode": "lambda", "expression": {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "v8"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#45"}}}}], + "restrictions": [{"attribute": 5, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "scan_p_size"}], "values": [{"type": ["Integer"], "value": 3}, {"type": ["Integer"], "value": 9}, {"type": ["Integer"], "value": 14}, {"type": ["Integer"], "value": 19}, {"type": ["Integer"], "value": 23}, {"type": ["Integer"], "value": 36}, {"type": ["Integer"], "value": 45}, {"type": ["Integer"], "value": 49}], "collates": [null], "modes": ["equals"]}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "not", "input": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "MEDIUM POLISHED%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}}, {"attribute": 3, "mode": "lambda", "expression": {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "scan_p_brand"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#45"}}}}], "selectivity": 0.15197, - "analyze": {"pipeline": 4, "cpu-cycles": 1935, "running": false, "tuple-count": 81} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 4, "cpu-cycles": 633, "processed-rows": 533, "running": false, "tuple-count": 81} + }, { "operator": "tablescan", "operatorId": 8, - "sqlpos": [[254, 262]], + "sqlpos": [[255, 263]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": null}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 6, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.15197], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 2076, "running": false, "tuple-count": 185} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v11"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 81} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v5"}}, - "analyze": {"pipeline": 2, "memory-bytes": 2048, "tuple-count": 81} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v8"}}, "iu": ["v", ["Char", 10]]}, {"expression": {"value": {"expression": "iuref", "iu": "v9"}}, "iu": ["v2", ["Varchar", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "v10"}}, "iu": ["v3", ["Integer"]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 489, "processed-rows": 537, "running": false, "tuple-count": 185} + }], + "earlyProbedBy": [8], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey2"}}, + "analyze": {"pipeline": 2, "column-count": 4, "memory-bytes": 18552, "tuple-count": 81} + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey2"}, "right": {"expression": "iuref", "iu": "scan_suppkey"}}, + "analyze": {"pipeline": 2, "column-count": 4, "memory-bytes": 2048, "tuple-count": 81} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_p_brand"}}, "iu": ["GroupByKey", ["Char", 10]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_p_type"}}, "iu": ["GroupByKey2", ["Varchar", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_p_size"}}, "iu": ["GroupByKey3", ["Integer"]]}], "groupingSets": [{"keyIndices": [0, 1, 2], "coreIndices": [0, 1, 2], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v12"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "count", "distinct": true}, "iu": ["v4", ["BigInt"]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 637, "memory-bytes": 36864, "running": false, "tuple-count": 81} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 198, "memory-bytes": 262792, "running": false, "tuple-count": 81} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_suppkey2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "count", "distinct": true}, "iu": ["count", ["BigInt"]]}], + "analyze": {"pipeline": 1, "column-count": 4, "cpu-cycles": 173, "memory-bytes": 20600, "running": false, "tuple-count": 81} + }], + "analyze": {"pipeline": 0, "column-count": 4, "cpu-cycles": 1054, "memory-bytes": 262792, "running": false, "tuple-count": 81} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q17-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q17-analyze.plan.json index b0bae7b..3d3dbd4 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q17-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q17-analyze.plan.json @@ -3,104 +3,110 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["BigNumeric", 38, 6, "nullable"]]}], + "output": [{"expression": "iuref", "iu": ["map", ["BigNumeric", 38, 6, "nullable"]]}], "outputNames": ["avg_yearly"], - "input": { + "inputs": [{ "operator": "map", "operatorId": 2, - "sqlpos": [[149, 189]], + "sqlpos": [[150, 190]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[149, 169]], + "sqlpos": [[150, 170]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 2.41463, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1, 2], + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 3, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 6, - "sqlpos": [[221, 225]], + "sqlpos": [[222, 226]], "cardinality": 3, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v2", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": null}, {"name": "p_brand", "type": ["Char", 10], "iu": ["v3", ["Char", 10]]}, {"name": "p_type", "type": ["Varchar", 25], "iu": null}, {"name": "p_size", "type": ["Integer"], "iu": null}, {"name": "p_container", "type": ["Char", 10], "iu": ["v4", ["Char", 10]]}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 3, "name": "p_brand", "type": ["Char", 10], "iu": ["scan_p_brand", ["Char", 10]]},{"colId": 6, "name": "p_container", "type": ["Char", 10], "iu": ["scan_containe", ["Char", 10]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 6, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 10], "value": "MED BOX"}}}, {"attribute": 3, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#23"}}}], + "restrictions": [{"attribute": 6, "mode": "=", "selectivity": 0.025, "value": {"expression": "const", "value": {"type": ["Char", 10], "value": "MED BOX"}}}, {"attribute": 3, "mode": "=", "selectivity": 0.04, "value": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#23"}}}], "selectivity": 0.00562852, - "analyze": {"pipeline": 3, "cpu-cycles": 137, "running": false, "tuple-count": 3} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 1, "cpu-cycles": 649, "processed-rows": 533, "running": false, "tuple-count": 3} + }, { "operator": "map", "operatorId": 7, - "sqlpos": [[405, 426]], + "sqlpos": [[406, 427]], "cardinality": 533, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 8, - "sqlpos": [[411, 426]], + "sqlpos": [[412, 427]], "cardinality": 533, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 9, - "sqlpos": [[472, 480]], + "sqlpos": [[473, 481]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v6", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 1, "name": "l_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "residuals": [{"expression": "const", "value": {"type": ["Bool"], "value": true}}], - "earlyProbes": [{"builder": 5, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 5, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.00562852], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 952, "running": false, "tuple-count": 50} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v5"}}, "iu": ["v7", ["Integer"]]}], + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 300, "processed-rows": 572, "running": false, "tuple-count": 50} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v6"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "avg"}, "iu": ["v8", ["Numeric", 16, 6, "nullable"]]}], - "analyze": {"pipeline": 2, "cpu-cycles": 274, "memory-bytes": 18432, "running": false, "tuple-count": 12} - }, - "values": [{"iu": ["v9", ["Numeric", 18, 7, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v8"}, "right": {"expression": "const", "value": {"type": ["Numeric", 2, 1], "value": 2}}}}], - "analyze": {"pipeline": 2, "tuple-count": 12} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "iuref", "iu": "v7"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 3} - }, - "right": { + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_quantity"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "avg"}, "iu": ["avg", ["Numeric", 16, 6, "nullable"]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 285, "memory-bytes": 18552, "running": false, "tuple-count": 12} + }], + "values": [{"iu": ["map2", ["Numeric", 18, 7, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "avg"}, "right": {"expression": "const", "value": {"type": ["Numeric", 2, 1], "value": 2}}}}], + "analyze": {"pipeline": 2, "column-count": 2, "tuple-count": 12} + }], + "earlyProbedBy": [9], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}}, + "analyze": {"pipeline": 2, "column-count": 3, "memory-bytes": 18552, "tuple-count": 3} + }, { "operator": "tablescan", "operatorId": 10, - "sqlpos": [[203, 211]], + "sqlpos": [[204, 212]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v11", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v12", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 1, "name": "l_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity2", ["Numeric", 12, 2]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "earlyProbes": [{"builder": 4, "attributes": [1, 1], "type": "minmaxonly"}], + "earlyProbes": [{"builder": 4, "attributes": [1, 1, 4], "numEqualityPredicates": 2, "selectivities": [0.00562852, 0.00562852, null], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 1, "cpu-cycles": 1380, "running": false, "tuple-count": 572} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "iuref", "iu": "v7"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "iuref", "iu": "v10"}}, {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v9"}}]}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 2} - }, + "analyze": {"pipeline": 1, "column-count": 3, "cpu-cycles": 141, "processed-rows": 572, "running": false, "tuple-count": 572} + }], + "earlyProbedBy": [10], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "scan_quantity2"}, "right": {"expression": "iuref", "iu": "map2"}}]}, + "analyze": {"pipeline": 1, "column-count": 1, "memory-bytes": 18552, "tuple-count": 2} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v12"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v13", ["BigNumeric", 38, 2, "nullable"]]}], - "analyze": {"pipeline": 0, "cpu-cycles": 20, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "values": [{"iu": ["v", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "div", "left": {"expression": "iuref", "iu": "v13"}, "right": {"expression": "const", "value": {"type": ["Numeric", 2, 1], "value": 70}}}}], - "analyze": {"pipeline": 0, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_extended"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 2, "nullable"]]}], + "analyze": {"pipeline": 0, "column-count": 1, "cpu-cycles": 48, "memory-bytes": 0, "running": false, "tuple-count": 1} + }], + "values": [{"iu": ["map", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "div", "left": {"expression": "iuref", "iu": "sum"}, "right": {"expression": "const", "value": {"type": ["Numeric", 2, 1], "value": 70}}}}], + "analyze": {"pipeline": 0, "column-count": 1, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q18-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q18-analyze.plan.json index bc02d45..7114adb 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q18-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q18-analyze.plan.json @@ -3,126 +3,135 @@ "operatorId": 1, "cardinality": 100, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Varchar", 25]]}, {"expression": "iuref", "iu": ["v2", ["Integer"]]}, {"expression": "iuref", "iu": ["v3", ["Integer"]]}, {"expression": "iuref", "iu": ["v4", ["Date"]]}, {"expression": "iuref", "iu": ["v5", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v6", ["BigNumeric", 38, 2]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Varchar", 25]]}, {"expression": "iuref", "iu": ["GroupByKey2", ["Integer"]]}, {"expression": "iuref", "iu": ["GroupByKey3", ["Integer"]]}, {"expression": "iuref", "iu": ["GroupByKey4", ["Date"]]}, {"expression": "iuref", "iu": ["GroupByKey5", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 2]]}], "outputNames": ["c_name", "c_custkey", "o_orderkey", "o_orderdate", "o_totalprice", "sum"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[785, 802], [824, 834]], + "sqlpos": [[786, 803], [825, 835]], "cardinality": 100, - "criterion": [{"value": {"expression": "iuref", "iu": "v5"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey5"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "GroupByKey4"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[662, 767], [247, 262]], + "sqlpos": [[663, 768], [248, 263]], "cardinality": 203.17, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 225.745, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 50.5164, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "rightsemijoin", "operatorId": 6, "cardinality": 50.5164, "method": "hash", "singleMatch": true, - "referencedByScanEarlyProbe": true, - "left": { - "operator": "select", + "computeLeftBounds": [0], + "filterJoinIU": ["scan_orderkey", ["Integer"]], + "inputs": [{ + "operator": "filter", "operatorId": 7, "cardinality": 64, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 8, - "sqlpos": [[477, 520], [560, 575]], + "sqlpos": [[478, 521], [561, 576]], "cardinality": 128, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 9, - "sqlpos": [[452, 460]], + "sqlpos": [[453, 461]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v8", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 1449, "running": false, "tuple-count": 572} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v7"}}, "iu": ["v9", ["Integer"]]}], + "analyze": {"pipeline": 6, "column-count": 2, "cpu-cycles": 652, "processed-rows": 572, "running": false, "tuple-count": 572} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_orderkey2"}}, "iu": ["GroupByKey6", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v8"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v10", ["BigNumeric", 38, 2]]}], - "analyze": {"pipeline": 5, "cpu-cycles": 306, "memory-bytes": 18432, "running": false, "tuple-count": 128} - }, - "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["BigNumeric", 38, 2], "low": 30000, "high": 0}}}, - "analyze": {"pipeline": 5, "tuple-count": 2} - }, - "right": { + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_quantity"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigNumeric", 38, 2]]}], + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 204, "memory-bytes": 18552, "running": false, "tuple-count": 128} + }], + "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "sum2"}, "right": {"expression": "const", "value": {"type": ["BigNumeric", 38, 2], "low": 30000, "high": 0}}}, + "analyze": {"pipeline": 5, "column-count": 1, "tuple-count": 2} + }, { "operator": "tablescan", "operatorId": 10, - "sqlpos": [[294, 300]], + "sqlpos": [[295, 301]], "cardinality": 128, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": ["v13", ["Numeric", 12, 2]]}, {"name": "o_orderdate", "type": ["Date"], "iu": ["v14", ["Date"]]}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer"]]},{"colId": 3, "name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": ["scan_totalpri", ["Numeric", 12, 2]]},{"colId": 4, "name": "o_orderdate", "type": ["Date"], "iu": ["scan_orderdat", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, - "earlyProbes": [{"builder": 6, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.5], "type": "exactprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 204, "running": false, "tuple-count": 2} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v9"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 2} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 4, "cpu-cycles": 189, "processed-rows": 128, "running": false, "tuple-count": 2} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey"}, "right": {"expression": "iuref", "iu": "GroupByKey6"}}, + "analyze": {"pipeline": 4, "column-count": 4, "memory-bytes": 18552, "tuple-count": 2} + }, { "operator": "tablescan", "operatorId": 11, - "sqlpos": [[276, 284]], + "sqlpos": [[277, 285]], "cardinality": 129, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": ["v16", ["Varchar", 25]]}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": null}, {"name": "c_phone", "type": ["Char", 15], "iu": null}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]},{"colId": 1, "name": "c_name", "type": ["Varchar", 25], "iu": ["scan_c_name", ["Varchar", 25]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, - "earlyProbes": [{"builder": 5, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.3916], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 179, "running": false, "tuple-count": 2} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v12"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 2} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 2, "cpu-cycles": 128, "processed-rows": 129, "running": false, "tuple-count": 2} + }], + "earlyProbedBy": [11], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey2"}, "right": {"expression": "iuref", "iu": "scan_custkey"}}, + "analyze": {"pipeline": 3, "column-count": 5, "memory-bytes": 18552, "tuple-count": 2} + }, { "operator": "tablescan", "operatorId": 12, - "sqlpos": [[310, 318]], + "sqlpos": [[311, 319]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v17", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v18", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey3", ["Integer"]]},{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 4, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.394659], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 641, "running": false, "tuple-count": 15} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v17"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 14} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v16"}}, "iu": ["v", ["Varchar", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "v15"}}, "iu": ["v2", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v11"}}, "iu": ["v3", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v14"}}, "iu": ["v4", ["Date"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v13"}}, "iu": ["v5", ["Numeric", 12, 2]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 333, "processed-rows": 572, "running": false, "tuple-count": 15} + }], + "earlyProbedBy": [12], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey"}, "right": {"expression": "iuref", "iu": "scan_orderkey3"}}, + "analyze": {"pipeline": 2, "column-count": 6, "memory-bytes": 18552, "tuple-count": 14} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_c_name"}}, "iu": ["GroupByKey", ["Varchar", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_custkey2"}}, "iu": ["GroupByKey2", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_orderkey"}}, "iu": ["GroupByKey3", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_orderdat"}}, "iu": ["GroupByKey4", ["Date"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_totalpri"}}, "iu": ["GroupByKey5", ["Numeric", 12, 2]]}], "groupingSets": [{"keyIndices": [0, 1, 2, 3, 4], "coreIndices": [0, 1, 2, 3, 4], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v18"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v6", ["BigNumeric", 38, 2]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 178, "memory-bytes": 18432, "running": false, "tuple-count": 2} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 245, "heap-gc-passes": 0, "memory-bytes": 262160, "running": false, "tuple-count": 2} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_quantity2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 2]]}], + "analyze": {"pipeline": 1, "column-count": 6, "cpu-cycles": 235, "memory-bytes": 18552, "running": false, "tuple-count": 2} + }], + "analyze": {"pipeline": 0, "column-count": 6, "cpu-cycles": 130, "heap-gc-passes": 0, "memory-bytes": 262160, "running": false, "tuple-count": 2} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q19-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q19-analyze.plan.json index abb9446..458bdef 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q19-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q19-analyze.plan.json @@ -3,53 +3,57 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["BigNumeric", 38, 4, "nullable"]]}], + "output": [{"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4, "nullable"]]}], "outputNames": ["revenue"], - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 2, - "sqlpos": [[149, 187]], + "sqlpos": [[150, 188]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, "cardinality": 11.8234, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 4, - "sqlpos": [[212, 220]], + "sqlpos": [[213, 221]], "cardinality": 23, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": ["v2", ["Integer"]]}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v3", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v4", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v5", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": ["v6", ["Char", 25]]}, {"name": "l_shipmode", "type": ["Char", 10], "iu": ["v7", ["Char", 10]]}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 1, "name": "l_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity", ["Numeric", 12, 2]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 13, "name": "l_shipinstruct", "type": ["Char", 25], "iu": ["scan_shipinst", ["Char", 25]]},{"colId": 14, "name": "l_shipmode", "type": ["Char", 10], "iu": ["scan_shipmode", ["Char", 10]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "restrictions": [{"attribute": 13, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "DELIVER IN PERSON"}}}, {"attribute": 14, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "v7"}], "values": [{"type": ["Char", 10], "value": "AIR"}, {"type": ["Char", 10], "value": "AIR REG"}], "collates": [null], "modes": ["equals"]}}], + "restrictions": [{"attribute": 13, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "DELIVER IN PERSON"}}}, {"attribute": 14, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "scan_shipmode"}], "values": [{"type": ["Char", 10], "value": "AIR"}, {"type": ["Char", 10], "value": "AIR REG"}], "collates": [null], "modes": ["equals"]}}], "selectivity": 0.0402098, - "analyze": {"pipeline": 2, "cpu-cycles": 309, "running": false, "tuple-count": 23} - }, - "right": { + "analyze": {"pipeline": 2, "column-count": 4, "cpu-cycles": 853, "processed-rows": 572, "running": false, "tuple-count": 23} + }, { "operator": "tablescan", "operatorId": 5, - "sqlpos": [[230, 234]], + "sqlpos": [[231, 235]], "cardinality": 533, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": null}, {"name": "p_brand", "type": ["Char", 10], "iu": ["v9", ["Char", 10]]}, {"name": "p_type", "type": ["Varchar", 25], "iu": null}, {"name": "p_size", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": ["v11", ["Char", 10]]}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 3, "name": "p_brand", "type": ["Char", 10], "iu": ["scan_p_brand", ["Char", 10]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]},{"colId": 6, "name": "p_container", "type": ["Char", 10], "iu": ["scan_containe", ["Char", 10]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, - "earlyProbes": [{"builder": 3, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 3, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.043152], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 1, "cpu-cycles": 831, "running": false, "tuple-count": 65} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v8"}, "right": {"expression": "iuref", "iu": "v2"}}, {"expression": "or", "arguments": [{"expression": "and", "arguments": [{"expression": "between", "arguments": [{"expression": "iuref", "iu": "v3"}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 100}}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 1100}}]}, {"expression": "between", "arguments": [{"expression": "iuref", "iu": "v10"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 5}}]}, {"expression": "lookup", "input": [{"expression": "iuref", "iu": "v11"}], "values": [{"type": ["Char", 10], "value": "SM BOX"}, {"type": ["Char", 10], "value": "SM CASE"}, {"type": ["Char", 10], "value": "SM PACK"}, {"type": ["Char", 10], "value": "SM PKG"}], "collates": [null], "modes": ["equals"]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#12"}}}]}, {"expression": "and", "arguments": [{"expression": "between", "arguments": [{"expression": "iuref", "iu": "v3"}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 1000}}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 2000}}]}, {"expression": "between", "arguments": [{"expression": "iuref", "iu": "v10"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 10}}]}, {"expression": "lookup", "input": [{"expression": "iuref", "iu": "v11"}], "values": [{"type": ["Char", 10], "value": "MED BAG"}, {"type": ["Char", 10], "value": "MED BOX"}, {"type": ["Char", 10], "value": "MED PACK"}, {"type": ["Char", 10], "value": "MED PKG"}], "collates": [null], "modes": ["equals"]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#23"}}}]}, {"expression": "and", "arguments": [{"expression": "between", "arguments": [{"expression": "iuref", "iu": "v3"}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 2000}}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 3000}}]}, {"expression": "between", "arguments": [{"expression": "iuref", "iu": "v10"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 15}}]}, {"expression": "lookup", "input": [{"expression": "iuref", "iu": "v11"}], "values": [{"type": ["Char", 10], "value": "LG BOX"}, {"type": ["Char", 10], "value": "LG CASE"}, {"type": ["Char", 10], "value": "LG PACK"}, {"type": ["Char", 10], "value": "LG PKG"}], "collates": [null], "modes": ["equals"]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#34"}}}]}]}]}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 1} - }, + "analyze": {"pipeline": 1, "column-count": 4, "cpu-cycles": 350, "processed-rows": 533, "running": false, "tuple-count": 65} + }], + "earlyProbedBy": [5], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey2"}, "right": {"expression": "iuref", "iu": "scan_partkey"}}, {"expression": "or", "arguments": [{"expression": "and", "arguments": [{"expression": "between", "arguments": [{"expression": "iuref", "iu": "scan_quantity"}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 100}}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 1100}}]}, {"expression": "between", "arguments": [{"expression": "iuref", "iu": "scan_p_size"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 5}}]}, {"expression": "lookup", "input": [{"expression": "iuref", "iu": "scan_containe"}], "values": [{"type": ["Char", 10], "value": "SM BOX"}, {"type": ["Char", 10], "value": "SM CASE"}, {"type": ["Char", 10], "value": "SM PACK"}, {"type": ["Char", 10], "value": "SM PKG"}], "collates": [null], "modes": ["equals"]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_p_brand"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#12"}}}]}, {"expression": "and", "arguments": [{"expression": "between", "arguments": [{"expression": "iuref", "iu": "scan_quantity"}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 1000}}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 2000}}]}, {"expression": "between", "arguments": [{"expression": "iuref", "iu": "scan_p_size"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 10}}]}, {"expression": "lookup", "input": [{"expression": "iuref", "iu": "scan_containe"}], "values": [{"type": ["Char", 10], "value": "MED BAG"}, {"type": ["Char", 10], "value": "MED BOX"}, {"type": ["Char", 10], "value": "MED PACK"}, {"type": ["Char", 10], "value": "MED PKG"}], "collates": [null], "modes": ["equals"]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_p_brand"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#23"}}}]}, {"expression": "and", "arguments": [{"expression": "between", "arguments": [{"expression": "iuref", "iu": "scan_quantity"}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 2000}}, {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 3000}}]}, {"expression": "between", "arguments": [{"expression": "iuref", "iu": "scan_p_size"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 15}}]}, {"expression": "lookup", "input": [{"expression": "iuref", "iu": "scan_containe"}], "values": [{"type": ["Char", 10], "value": "LG BOX"}, {"type": ["Char", 10], "value": "LG CASE"}, {"type": ["Char", 10], "value": "LG PACK"}, {"type": ["Char", 10], "value": "LG PKG"}], "collates": [null], "modes": ["equals"]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_p_brand"}, "right": {"expression": "const", "value": {"type": ["Char", 10], "value": "Brand#34"}}}]}]}]}, + "analyze": {"pipeline": 1, "column-count": 2, "memory-bytes": 18552, "tuple-count": 1} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v5"}}, "right": {"expression": "iuref", "iu": "v4"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v", ["BigNumeric", 38, 4, "nullable"]]}], - "analyze": {"pipeline": 0, "cpu-cycles": 12, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4, "nullable"]]}], + "analyze": {"pipeline": 0, "column-count": 1, "cpu-cycles": 35, "memory-bytes": 0, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q2-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q2-analyze.plan.json index cbb5d54..93d6036 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q2-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q2-analyze.plan.json @@ -1,218 +1,237 @@ { "operator": "executiontarget", "operatorId": 1, - "cardinality": 1.2, + "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1149, 1163], [1209, 1218]], - "cardinality": 1.2, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "cardinality": 1, + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, - "cardinality": 1.2, + "cardinality": 1, "method": "hash", - "left": { - "operator": "join", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", "operatorId": 4, + "sqlpos": [[360, 366]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2, + "analyze": {"pipeline": 2, "column-count": 1, "cpu-cycles": 528, "processed-rows": 5, "running": false, "tuple-count": 1} + }, { + "operator": "join", + "operatorId": 5, "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 5, - "cardinality": 5, + "operatorId": 6, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 6, - "sqlpos": [[360, 366]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v10", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2, - "analyze": {"pipeline": 4, "cpu-cycles": 98, "running": false, "tuple-count": 1} - }, - "right": { - "operator": "tablescan", - "operatorId": 7, - "sqlpos": [[344, 350]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 5, "attributes": [2], "type": "lookup"}], - "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 101, "running": false, "tuple-count": 5} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v9"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 5} - }, - "right": { - "operator": "join", - "operatorId": 8, - "cardinality": 6.04503, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 9, - "cardinality": 6.04503, + "operatorId": 7, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 10, - "sqlpos": [[294, 298]], + "computeLeftBounds": [0, 1, 2], + "inputs": [{ + "operator": "join", + "operatorId": 8, "cardinality": 6, - "relationId": 2, - "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v13", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v13"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], - "selectivity": 0.011257, - "analyze": {"pipeline": 6, "cpu-cycles": 367, "running": false, "tuple-count": 6} - }, - "right": { + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 9, + "sqlpos": [[294, 298]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, + "schema": {"type":"sessionschema"}, + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257, + "analyze": {"pipeline": 6, "column-count": 2, "cpu-cycles": 444, "processed-rows": 533, "running": false, "tuple-count": 6} + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[679, 697]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[843, 849]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2, + "analyze": {"pipeline": 10, "column-count": 1, "cpu-cycles": 83, "processed-rows": 5, "running": false, "tuple-count": 1} + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[811, 817]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 13, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1, + "analyze": {"pipeline": 9, "column-count": 2, "cpu-cycles": 114, "processed-rows": 25, "running": false, "tuple-count": 5} + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}}, + "analyze": {"pipeline": 9, "column-count": 1, "memory-bytes": 18552, "tuple-count": 5} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[777, 785]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 12, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1, + "analyze": {"pipeline": 8, "column-count": 2, "cpu-cycles": 366, "processed-rows": 518, "running": false, "tuple-count": 109} + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 8, "column-count": 1, "memory-bytes": 18552, "tuple-count": 90} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[743, 751]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 11, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.011257], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1, + "analyze": {"pipeline": 7, "column-count": 3, "cpu-cycles": 318, "processed-rows": 537, "running": false, "tuple-count": 11} + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}, + "analyze": {"pipeline": 7, "column-count": 2, "memory-bytes": 18552, "tuple-count": 3} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}], + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 131, "memory-bytes": 18552, "running": false, "tuple-count": 3} + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}}, + "analyze": {"pipeline": 5, "column-count": 4, "memory-bytes": 18552, "tuple-count": 2} + }, { "operator": "tablescan", - "operatorId": 11, + "operatorId": 18, "sqlpos": [[326, 334]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 9, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3, 0, 0], "numEqualityPredicates": 3, "selectivities": [0.011194, 0.011257, 0.011257], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 5, "cpu-cycles": 614, "running": false, "tuple-count": 17} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v15"}}, - "analyze": {"pipeline": 5, "memory-bytes": 18432, "tuple-count": 6} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 3, "cpu-cycles": 118, "processed-rows": 537, "running": false, "tuple-count": 537} + }], + "earlyProbedBy": [18], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey3"}, "right": {"expression": "iuref", "iu": "GroupByKey"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]}, + "analyze": {"pipeline": 4, "column-count": 3, "memory-bytes": 18552, "tuple-count": 2} + }, { "operator": "tablescan", - "operatorId": 12, + "operatorId": 19, "sqlpos": [[308, 316]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 8, "attributes": [0], "type": "lookup"}, {"builder": 4, "attributes": [3], "type": "lookup"}], - "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 722, "running": false, "tuple-count": 6} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v16"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 2} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v11"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 2} - }, - "right": { - "operator": "groupby", - "operatorId": 13, - "sqlpos": [[679, 697]], - "cardinality": 107.4, - "input": { - "operator": "join", - "operatorId": 14, - "cardinality": 107.4, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 15, - "cardinality": 103.6, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 16, - "cardinality": 5, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 17, - "sqlpos": [[843, 849]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v21", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2, - "analyze": {"pipeline": 10, "cpu-cycles": 18, "running": false, "tuple-count": 1} - }, - "right": { - "operator": "tablescan", - "operatorId": 18, - "sqlpos": [[811, 817]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v22", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 16, "attributes": [2], "type": "lookup"}], - "selectivity": 1, - "analyze": {"pipeline": 9, "cpu-cycles": 59, "running": false, "tuple-count": 5} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v23"}, "right": {"expression": "iuref", "iu": "v20"}}, - "analyze": {"pipeline": 9, "memory-bytes": 18432, "tuple-count": 5} - }, - "right": { - "operator": "tablescan", - "operatorId": 19, - "sqlpos": [[777, 785]], - "cardinality": 518, - "relationId": 3, - "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 15, "attributes": [3], "type": "lookup"}], - "selectivity": 1, - "analyze": {"pipeline": 8, "cpu-cycles": 954, "running": false, "tuple-count": 109} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v25"}, "right": {"expression": "iuref", "iu": "v22"}}, - "analyze": {"pipeline": 8, "memory-bytes": 18432, "tuple-count": 90} - }, - "right": { - "operator": "tablescan", - "operatorId": 20, - "sqlpos": [[743, 751]], - "cardinality": 537, - "relationId": 4, - "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v28", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 14, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00233399], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 7, "cpu-cycles": 1588, "running": false, "tuple-count": 238} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v27"}}, - "analyze": {"pipeline": 7, "memory-bytes": 18432, "tuple-count": 95} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v26"}}, "iu": ["v29", ["Integer"]]}], - "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], - "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v28"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v30", ["Numeric", 12, 2, "nullable"]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 431, "memory-bytes": 18432, "running": false, "tuple-count": 95} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v30"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v29"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v29"}}]}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 2} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 43, "heap-gc-passes": 0, "memory-bytes": 262160, "running": false, "tuple-count": 2} - }, - "analyze": {"error": null, "pipeline": 0} + "analyze": {"pipeline": 3, "column-count": 7, "cpu-cycles": 419, "processed-rows": 518, "running": false, "tuple-count": 5} + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}}, + "analyze": {"pipeline": 3, "column-count": 8, "memory-bytes": 18552, "tuple-count": 2} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[344, 350]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0483602], "type": "hashprobe", "passOnNulls": false}, {"builder": 3, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1, + "analyze": {"pipeline": 1, "column-count": 3, "cpu-cycles": 231, "processed-rows": 25, "running": false, "tuple-count": 2} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}}, + "analyze": {"pipeline": 1, "column-count": 9, "memory-bytes": 18552, "tuple-count": 2} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}}, + "analyze": {"pipeline": 1, "column-count": 8, "memory-bytes": 18552, "tuple-count": 2} + }], + "analyze": {"pipeline": 0, "column-count": 8, "cpu-cycles": 75, "heap-gc-passes": 0, "memory-bytes": 262160, "running": false, "tuple-count": 2} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q2-steps.plan.json b/standalone-app/examples/hyper/tpch/tpch-q2-steps.plan.json index f3c1dd1..2620782 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q2-steps.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q2-steps.plan.json @@ -4,203 +4,185 @@ "operator": "executiontarget", "operatorId": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1156, 1170], [1216, 1225]], - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { - "operator": "map", + "inputs": [{ + "operator": "filter", "operatorId": 3, - "input": { - "operator": "select", + "sqlpos": [[388, 1140]], + "inputs": [{ + "operator": "leftouterjoin", "operatorId": 4, - "sqlpos": [[388, 1140]], - "input": { - "operator": "leftouterjoin", + "inputs": [{ + "operator": "join", "operatorId": 5, - "left": { + "inputs": [{ "operator": "join", "operatorId": 6, - "left": { + "inputs": [{ "operator": "join", "operatorId": 7, - "left": { + "inputs": [{ "operator": "join", "operatorId": 8, - "left": { - "operator": "join", + "inputs": [{ + "operator": "tablescan", "operatorId": 9, - "left": { - "operator": "tablescan", - "operatorId": 10, - "sqlpos": [[301, 305]], - "relationId": 2, - "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": ["v9", ["Varchar", 55]]}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": ["v10", ["Char", 10]]}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v11", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": ["v13", ["Char", 10]]}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": ["v14", ["Numeric", 12, 2]]}, {"name": "p_comment", "type": ["Varchar", 23], "iu": ["v15", ["Varchar", 23]]}], - "tid": ["v16", ["BigInt"]], - "tableOid": ["v17", ["RegClass"]], - "tupleFlags": ["v18", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "part"}, - "selectivity": 1 - }, - "right": { - "operator": "tablescan", - "operatorId": 11, - "sqlpos": [[315, 323]], - "relationId": 3, - "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], - "tid": ["v21", ["BigInt"]], - "tableOid": ["v22", ["RegClass"]], - "tupleFlags": ["v23", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "selectivity": 1 - }, - "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + "sqlpos": [[301, 305]], + "volatility": "stable", + "relationId": 2, + "schema": {"type":"sessionschema"}, + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 1, "name": "p_name", "type": ["Varchar", 55], "iu": ["scan_p_name", ["Varchar", 55]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 3, "name": "p_brand", "type": ["Char", 10], "iu": ["scan_p_brand", ["Char", 10]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]},{"colId": 6, "name": "p_container", "type": ["Char", 10], "iu": ["scan_containe", ["Char", 10]]},{"colId": 7, "name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": ["scan_retailpr", ["Numeric", 12, 2]]},{"colId": 8, "name": "p_comment", "type": ["Varchar", 23], "iu": ["scan_comment2", ["Varchar", 23]]}], + "systemValues": {"ctid": ["scan_tid", ["BigInt"]], "table-oid": ["scan_oid", ["RegClass"]], "tuple-flags": ["scan_flags", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "part"}, + "selectivity": 1 + }, { "operator": "tablescan", - "operatorId": 12, - "sqlpos": [[333, 341]], - "relationId": 4, + "operatorId": 10, + "sqlpos": [[315, 323]], + "volatility": "stable", + "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v27", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": ["v28", ["Varchar", 199]]}], - "tid": ["v29", ["BigInt"]], - "tableOid": ["v30", ["RegClass"]], - "tupleFlags": ["v31", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], + "systemValues": {"ctid": ["scan_tid2", ["BigInt"]], "table-oid": ["scan_oid2", ["RegClass"]], "tuple-flags": ["scan_flags2", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "supplier"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "tablescan", - "operatorId": 13, - "sqlpos": [[351, 357]], - "relationId": 8, + "operatorId": 11, + "sqlpos": [[333, 341]], + "volatility": "stable", + "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v32", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v33", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": ["v34", ["Varchar", 152]]}], - "tid": ["v35", ["BigInt"]], - "tableOid": ["v36", ["RegClass"]], - "tupleFlags": ["v37", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "nation"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 2, "name": "ps_availqty", "type": ["Integer"], "iu": ["scan_availqty", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]},{"colId": 4, "name": "ps_comment", "type": ["Varchar", 199], "iu": ["scan_comment3", ["Varchar", 199]]}], + "systemValues": {"ctid": ["scan_tid3", ["BigInt"]], "table-oid": ["scan_oid3", ["RegClass"]], "tuple-flags": ["scan_flags3", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "tablescan", - "operatorId": 14, - "sqlpos": [[367, 373]], - "relationId": 9, + "operatorId": 12, + "sqlpos": [[351, 357]], + "volatility": "stable", + "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v38", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v39", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": ["v40", ["Varchar", 152]]}], - "tid": ["v41", ["BigInt"]], - "tableOid": ["v42", ["RegClass"]], - "tupleFlags": ["v43", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "region"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 3, "name": "n_comment", "type": ["Varchar", 152], "iu": ["scan_comment4", ["Varchar", 152]]}], + "systemValues": {"ctid": ["scan_tid4", ["BigInt"]], "table-oid": ["scan_oid4", ["RegClass"]], "tuple-flags": ["scan_flags4", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "nation"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { - "operator": "map", + }, { + "operator": "tablescan", + "operatorId": 13, + "sqlpos": [[367, 373]], + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]},{"colId": 2, "name": "r_comment", "type": ["Varchar", 152], "iu": ["scan_comment5", ["Varchar", 152]]}], + "systemValues": {"ctid": ["scan_tid5", ["BigInt"]], "table-oid": ["scan_oid5", ["RegClass"]], "tuple-flags": ["scan_flags5", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "region"}, + "selectivity": 1 + }], + "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} + }, { + "operator": "groupby", + "operatorId": 14, + "sqlpos": [[686, 704]], + "inputs": [{ + "operator": "filter", "operatorId": 15, - "input": { - "operator": "groupby", + "sqlpos": [[903, 1130]], + "inputs": [{ + "operator": "join", "operatorId": 16, - "sqlpos": [[686, 704]], - "input": { - "operator": "select", + "inputs": [{ + "operator": "join", "operatorId": 17, - "sqlpos": [[903, 1130]], - "input": { + "inputs": [{ "operator": "join", "operatorId": 18, - "left": { - "operator": "join", + "inputs": [{ + "operator": "tablescan", "operatorId": 19, - "left": { - "operator": "join", - "operatorId": 20, - "left": { - "operator": "tablescan", - "operatorId": 21, - "sqlpos": [[750, 758]], - "relationId": 4, - "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v44", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v45", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": ["v46", ["Integer"]]}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v47", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": ["v48", ["Varchar", 199]]}], - "tid": ["v49", ["BigInt"]], - "tableOid": ["v50", ["RegClass"]], - "tupleFlags": ["v51", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "selectivity": 1 - }, - "right": { - "operator": "tablescan", - "operatorId": 22, - "sqlpos": [[784, 792]], - "relationId": 3, - "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v52", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v53", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v54", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v55", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v56", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v57", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v58", ["Varchar", 101]]}], - "tid": ["v59", ["BigInt"]], - "tableOid": ["v60", ["RegClass"]], - "tupleFlags": ["v61", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "selectivity": 1 - }, - "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { - "operator": "tablescan", - "operatorId": 23, - "sqlpos": [[818, 824]], - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v62", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v63", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v64", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": ["v65", ["Varchar", 152]]}], - "tid": ["v66", ["BigInt"]], - "tableOid": ["v67", ["RegClass"]], - "tupleFlags": ["v68", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "selectivity": 1 - }, - "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + "sqlpos": [[750, 758]], + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 2, "name": "ps_availqty", "type": ["Integer"], "iu": ["scan_availqty2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]},{"colId": 4, "name": "ps_comment", "type": ["Varchar", 199], "iu": ["scan_comment6", ["Varchar", 199]]}], + "systemValues": {"ctid": ["scan_tid6", ["BigInt"]], "table-oid": ["scan_oid6", ["RegClass"]], "tuple-flags": ["scan_flags6", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "selectivity": 1 + }, { "operator": "tablescan", - "operatorId": 24, - "sqlpos": [[850, 856]], - "relationId": 9, + "operatorId": 20, + "sqlpos": [[784, 792]], + "volatility": "stable", + "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v69", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v70", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": ["v71", ["Varchar", 152]]}], - "tid": ["v72", ["BigInt"]], - "tableOid": ["v73", ["RegClass"]], - "tupleFlags": ["v74", ["BigInt"]], - "debugName": {"classification": "nonsensitive", "value": "region"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name2", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address2", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone2", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal2", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment7", ["Varchar", 101]]}], + "systemValues": {"ctid": ["scan_tid7", ["BigInt"]], "table-oid": ["scan_oid7", ["RegClass"]], "tuple-flags": ["scan_flags7", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "supplier"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v44"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v52"}, "right": {"expression": "iuref", "iu": "v45"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v55"}, "right": {"expression": "iuref", "iu": "v62"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v64"}, "right": {"expression": "iuref", "iu": "v69"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v70"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}]} - }, - "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], - "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v47"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v75", ["Numeric", 12, 2, "nullable"]]}] - }, - "values": [] - }, - "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v24"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v25"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v11"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v20"}, "right": {"expression": "iuref", "iu": "v32"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v33"}, "right": {"expression": "iuref", "iu": "v38"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v39"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v27"}, "right": {"expression": "iuref", "iu": "v75"}}]} - }, - "values": [] - } - } + }, { + "operator": "tablescan", + "operatorId": 21, + "sqlpos": [[818, 824]], + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name2", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]},{"colId": 3, "name": "n_comment", "type": ["Varchar", 152], "iu": ["scan_comment8", ["Varchar", 152]]}], + "systemValues": {"ctid": ["scan_tid8", ["BigInt"]], "table-oid": ["scan_oid8", ["RegClass"]], "tuple-flags": ["scan_flags8", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "selectivity": 1 + }], + "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} + }, { + "operator": "tablescan", + "operatorId": 22, + "sqlpos": [[850, 856]], + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]},{"colId": 2, "name": "r_comment", "type": ["Varchar", 152], "iu": ["scan_comment9", ["Varchar", 152]]}], + "systemValues": {"ctid": ["scan_tid9", ["BigInt"]], "table-oid": ["scan_oid9", ["RegClass"]], "tuple-flags": ["scan_flags9", ["BigInt"]]}, + "debugName": {"classification": "nonsensitive", "value": "region"}, + "selectivity": 1 + }], + "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} + }], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke4"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_r_name2"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}]} + }], + "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} + }], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_p_size"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke"}, "right": {"expression": "iuref", "iu": "scan_nationke2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_r_name"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco"}, "right": {"expression": "iuref", "iu": "min"}}]} + }] + }] } }, { "name": "Unnesting", @@ -208,176 +190,186 @@ "operator": "executiontarget", "operatorId": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1156, 1170], [1216, 1225]], - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { - "operator": "select", + "inputs": [{ + "operator": "filter", "operatorId": 3, "sqlpos": [[388, 1140]], - "input": { + "inputs": [{ "operator": "leftouterjoin", "operatorId": 4, - "left": { + "inputs": [{ "operator": "join", "operatorId": 5, - "left": { + "inputs": [{ "operator": "join", "operatorId": 6, - "left": { + "inputs": [{ "operator": "join", "operatorId": 7, - "left": { + "inputs": [{ "operator": "join", "operatorId": 8, - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 9, "sqlpos": [[301, 305]], "cardinality": 533, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v9", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, "selectivity": 1 - }, - "right": { + }, { "operator": "tablescan", "operatorId": 10, "sqlpos": [[315, 323]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "tablescan", "operatorId": 11, "sqlpos": [[333, 341]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v13", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v15", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "tablescan", "operatorId": 12, "sqlpos": [[351, 357]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v17", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "tablescan", "operatorId": 13, "sqlpos": [[367, 373]], "cardinality": 5, + "volatility": "stable", "relationId": 9, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v19", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "region"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "groupby", "operatorId": 14, "sqlpos": [[686, 704]], - "input": { - "operator": "select", + "inputs": [{ + "operator": "filter", "operatorId": 15, "sqlpos": [[903, 1130]], - "input": { + "inputs": [{ "operator": "join", "operatorId": 16, - "left": { + "inputs": [{ "operator": "join", "operatorId": 17, - "left": { + "inputs": [{ "operator": "join", "operatorId": 18, - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 19, "sqlpos": [[750, 758]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v21", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v22", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, "selectivity": 1 - }, - "right": { + }, { "operator": "tablescan", "operatorId": 20, "sqlpos": [[784, 792]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "tablescan", "operatorId": 21, "sqlpos": [[818, 824]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "right": { + }, { "operator": "tablescan", "operatorId": 22, "sqlpos": [[850, 856]], "cardinality": 5, + "volatility": "stable", "relationId": 9, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v28", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "region"}, "selectivity": 1 - }, + }], "condition": {"expression": "const", "value": {"type": ["Bool"], "value": true}} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v20"}, "right": {"expression": "iuref", "iu": "v20"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v23"}, "right": {"expression": "iuref", "iu": "v21"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v25"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v26"}, "right": {"expression": "iuref", "iu": "v27"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v28"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}]} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v20"}}, "iu": ["v29", ["Integer"]]}], + }], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey3"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke4"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_r_name2"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}]} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey3"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": null, "behavior": "regular"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v22"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v30", ["Numeric", 12, 2, "nullable"]]}] - }, - "condition": {"expression": "and", "arguments": [{"expression": "const", "value": {"type": ["Bool"], "value": true}}, {"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v29"}}]} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v13"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v14"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v9"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v16"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v18"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v30"}}]} - } - } + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "condition": {"expression": "and", "arguments": [{"expression": "const", "value": {"type": ["Bool"], "value": true}}, {"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}}]} + }], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_p_size"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke"}, "right": {"expression": "iuref", "iu": "scan_nationke2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_r_name"}, "right": {"expression": "const", "value": {"type": ["Varchar"], "value": "EUROPE"}}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco"}, "right": {"expression": "iuref", "iu": "min"}}]} + }] + }] } }, { "name": "PredicatePushdown", @@ -385,164 +377,174 @@ "operator": "executiontarget", "operatorId": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1156, 1170], [1216, 1225]], - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, - "left": { + "inputs": [{ "operator": "join", "operatorId": 4, - "left": { + "inputs": [{ "operator": "join", "operatorId": 5, - "left": { + "inputs": [{ "operator": "join", "operatorId": 6, - "left": { + "inputs": [{ "operator": "groupby", "operatorId": 7, "sqlpos": [[686, 704]], - "input": { + "inputs": [{ "operator": "join", "operatorId": 8, - "left": { + "inputs": [{ "operator": "join", "operatorId": 9, - "left": { + "inputs": [{ "operator": "join", "operatorId": 10, - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 11, "sqlpos": [[850, 856]], + "volatility": "stable", "relationId": 9, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v10", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "region"}, - "residuals": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "residuals": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_r_name"}, "right": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], "selectivity": 0.2 - }, - "right": { + }, { "operator": "tablescan", "operatorId": 12, "sqlpos": [[818, 824]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v9"}} - }, - "right": { + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke2"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }, { "operator": "tablescan", "operatorId": 13, "sqlpos": [[784, 792]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v13", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v14"}, "right": {"expression": "iuref", "iu": "v11"}} - }, - "right": { + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { "operator": "tablescan", "operatorId": 14, "sqlpos": [[750, 758]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v13"}, "right": {"expression": "iuref", "iu": "v16"}} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v15"}}, "iu": ["v18", ["Integer"]]}], + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": null, "behavior": "regular"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v17"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v19", ["Numeric", 12, 2, "nullable"]]}] - }, - "right": { + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }, { "operator": "tablescan", "operatorId": 15, "sqlpos": [[301, 305]], + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v20", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v21", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, - "residuals": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v21"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v20"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}], + "residuals": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_p_size"}, "right": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}], "selectivity": 0.011 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v18"}} - }, - "right": { + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", "operatorId": 16, "sqlpos": [[333, 341]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v22", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v24", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, "selectivity": 1 - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v22"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v19"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v22"}}]} - }, - "right": { + }], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "join", "operatorId": 17, - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 18, "sqlpos": [[351, 357]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "selectivity": 1 - }, - "right": { + }, { "operator": "tablescan", "operatorId": 19, "sqlpos": [[315, 323]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v28", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v28"}, "right": {"expression": "iuref", "iu": "v25"}} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v27"}, "right": {"expression": "iuref", "iu": "v23"}} - }, - "right": { + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke4"}, "right": {"expression": "iuref", "iu": "scan_nationke3"}} + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { "operator": "tablescan", "operatorId": 20, "sqlpos": [[367, 373]], + "volatility": "stable", "relationId": 9, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v29", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v30", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "region"}, - "residuals": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v30"}, "right": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "residuals": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_r_name2"}, "right": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], "selectivity": 0.2 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v26"}, "right": {"expression": "iuref", "iu": "v29"}} - } - } + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke4"}} + }] + }] } }, { "name": "Reordering", @@ -550,176 +552,186 @@ "operator": "executiontarget", "operatorId": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1156, 1170], [1216, 1225]], - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, - "cardinality": 1.2, - "left": { - "operator": "join", + "cardinality": 1, + "inputs": [{ + "operator": "tablescan", "operatorId": 4, + "sqlpos": [[367, 373]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "join", + "operatorId": 5, "cardinality": 1.20901, - "left": { - "operator": "join", - "operatorId": 5, - "cardinality": 5, - "left": { - "operator": "tablescan", - "operatorId": 6, - "sqlpos": [[367, 373]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v10", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 7, - "sqlpos": [[351, 357]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v9"}} - }, - "right": { + "inputs": [{ "operator": "join", - "operatorId": 8, - "cardinality": 6.04503, - "left": { + "operatorId": 6, + "cardinality": 1.20901, + "inputs": [{ "operator": "join", - "operatorId": 9, - "cardinality": 6.04503, - "left": { - "operator": "tablescan", - "operatorId": 10, - "sqlpos": [[301, 305]], + "operatorId": 7, + "cardinality": 1.20901, + "inputs": [{ + "operator": "join", + "operatorId": 8, "cardinality": 6, - "relationId": 2, - "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v13", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v13"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], - "selectivity": 0.011257 - }, - "right": { + "inputs": [{ + "operator": "tablescan", + "operatorId": 9, + "sqlpos": [[301, 305]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, + "schema": {"type":"sessionschema"}, + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257 + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[686, 704]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[850, 856]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[818, 824]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "selectivity": 1 + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[784, 792]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "selectivity": 1 + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[750, 758]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "selectivity": 1 + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", - "operatorId": 11, + "operatorId": 18, "sqlpos": [[333, 341]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v15"}} - }, - "right": { + }], + "condition": {"expression": "and", "arguments": [{"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}]}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "tablescan", - "operatorId": 12, + "operatorId": 19, "sqlpos": [[315, 323]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v16"}} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v11"}} - }, - "right": { - "operator": "groupby", - "operatorId": 13, - "sqlpos": [[686, 704]], - "cardinality": 107.4, - "input": { - "operator": "join", - "operatorId": 14, - "cardinality": 107.4, - "left": { - "operator": "join", - "operatorId": 15, - "cardinality": 103.6, - "left": { - "operator": "join", - "operatorId": 16, - "cardinality": 5, - "left": { - "operator": "tablescan", - "operatorId": 17, - "sqlpos": [[850, 856]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v21", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 18, - "sqlpos": [[818, 824]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v22", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v23"}, "right": {"expression": "iuref", "iu": "v20"}} - }, - "right": { - "operator": "tablescan", - "operatorId": 19, - "sqlpos": [[784, 792]], - "cardinality": 518, - "relationId": 3, - "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v25"}, "right": {"expression": "iuref", "iu": "v22"}} - }, - "right": { - "operator": "tablescan", - "operatorId": 20, - "sqlpos": [[750, 758]], - "cardinality": 537, - "relationId": 4, - "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v28", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v27"}} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v26"}}, "iu": ["v29", ["Integer"]]}], - "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], - "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v28"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v30", ["Numeric", 12, 2, "nullable"]]}] - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v29"}}, {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v29"}, "right": {"expression": "iuref", "iu": "v15"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v30"}}]}]} - } - } + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[351, 357]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "selectivity": 1 + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}} + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }] + }] } }, { "name": "ChoosePhysical", @@ -727,197 +739,433 @@ "operator": "executiontarget", "operatorId": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1156, 1170], [1216, 1225]], - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, - "cardinality": 1.2, + "cardinality": 1, "method": "hash", - "left": { - "operator": "join", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", "operatorId": 4, + "sqlpos": [[367, 373]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "join", + "operatorId": 5, "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 5, - "cardinality": 5, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 6, - "sqlpos": [[367, 373]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v10", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 7, - "sqlpos": [[351, 357]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 5, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v9"}} - }, - "right": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 8, - "cardinality": 6.04503, + "operatorId": 6, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 9, - "cardinality": 6.04503, + "operatorId": 7, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 10, - "sqlpos": [[301, 305]], + "computeLeftBounds": [0, 1, 2], + "inputs": [{ + "operator": "join", + "operatorId": 8, "cardinality": 6, - "relationId": 2, - "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v13", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v13"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], - "selectivity": 0.011257 - }, - "right": { + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 9, + "sqlpos": [[301, 305]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, + "schema": {"type":"sessionschema"}, + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257 + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[686, 704]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[850, 856]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[818, 824]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 13, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[784, 792]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 12, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[750, 758]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 11, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.011257], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", - "operatorId": 11, + "operatorId": 18, "sqlpos": [[333, 341]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 9, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3, 0, 0], "numEqualityPredicates": 3, "selectivities": [0.011194, 0.011257, 0.011257], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v15"}} - }, - "right": { + }], + "earlyProbedBy": [18], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "tablescan", - "operatorId": 12, + "operatorId": 19, "sqlpos": [[315, 323]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 8, "attributes": [0], "type": "lookup"}, {"builder": 4, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00233399], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v16"}} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v11"}} - }, - "right": { - "operator": "groupby", - "operatorId": 13, - "sqlpos": [[686, 704]], - "cardinality": 107.4, - "input": { + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[351, 357]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0483602], "type": "hashprobe", "passOnNulls": false}, {"builder": 3, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }] + }] +} +}, { + "name": "ChooseAccessPath", + "plan": { + "operator": "executiontarget", + "operatorId": 1, + "producesRows": true, + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], + "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], + "inputs": [{ + "operator": "sort", + "operatorId": 2, + "sqlpos": [[1156, 1170], [1216, 1225]], + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], + "limit": 100, + "inputs": [{ + "operator": "join", + "operatorId": 3, + "cardinality": 1, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 4, + "sqlpos": [[367, 373]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "join", + "operatorId": 5, + "cardinality": 1.20901, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 14, - "cardinality": 107.4, + "operatorId": 6, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 15, - "cardinality": 103.6, + "operatorId": 7, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1, 2], + "inputs": [{ "operator": "join", - "operatorId": 16, - "cardinality": 5, + "operatorId": 8, + "cardinality": 6, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 17, - "sqlpos": [[850, 856]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v21", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", - "operatorId": 18, - "sqlpos": [[818, 824]], - "cardinality": 25, - "relationId": 8, + "operatorId": 9, + "sqlpos": [[301, 305]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v22", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 16, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v23"}, "right": {"expression": "iuref", "iu": "v20"}} - }, - "right": { + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257 + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[686, 704]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[850, 856]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[818, 824]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 13, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[784, 792]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 12, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[750, 758]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 11, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.011257], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", - "operatorId": 19, - "sqlpos": [[784, 792]], - "cardinality": 518, - "relationId": 3, + "operatorId": 18, + "sqlpos": [[333, 341]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 15, "attributes": [3], "type": "lookup"}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 7, "attributes": [3, 0, 0], "numEqualityPredicates": 3, "selectivities": [0.011194, 0.011257, 0.011257], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v25"}, "right": {"expression": "iuref", "iu": "v22"}} - }, - "right": { + }], + "earlyProbedBy": [18], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "tablescan", - "operatorId": 20, - "sqlpos": [[750, 758]], - "cardinality": 537, - "relationId": 4, + "operatorId": 19, + "sqlpos": [[315, 323]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v28", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 14, "attributes": [1], "type": "lookup"}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00233399], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v27"}} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v26"}}, "iu": ["v29", ["Integer"]]}], - "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], - "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v28"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v30", ["Numeric", 12, 2, "nullable"]]}] - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v30"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v29"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v29"}, "right": {"expression": "iuref", "iu": "v15"}}]} - } - } + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[351, 357]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0483602], "type": "hashprobe", "passOnNulls": false}, {"builder": 3, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }] + }] } }, { "name": "Deduplication", @@ -925,396 +1173,653 @@ "operator": "executiontarget", "operatorId": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1156, 1170], [1216, 1225]], - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, - "cardinality": 1.2, + "cardinality": 1, "method": "hash", - "left": { - "operator": "join", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", "operatorId": 4, + "sqlpos": [[367, 373]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "join", + "operatorId": 5, "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 5, - "cardinality": 5, + "operatorId": 6, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 6, - "sqlpos": [[367, 373]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v10", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 7, - "sqlpos": [[351, 357]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 5, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v9"}} - }, - "right": { - "operator": "join", - "operatorId": 8, - "cardinality": 6.04503, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 9, - "cardinality": 6.04503, + "operatorId": 7, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 10, - "sqlpos": [[301, 305]], + "computeLeftBounds": [0, 1, 2], + "inputs": [{ + "operator": "join", + "operatorId": 8, "cardinality": 6, - "relationId": 2, - "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v13", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v13"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], - "selectivity": 0.011257 - }, - "right": { + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 9, + "sqlpos": [[301, 305]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, + "schema": {"type":"sessionschema"}, + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257 + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[686, 704]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[850, 856]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[818, 824]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 13, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[784, 792]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 12, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[750, 758]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 11, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.011257], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", - "operatorId": 11, + "operatorId": 18, "sqlpos": [[333, 341]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 9, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3, 0, 0], "numEqualityPredicates": 3, "selectivities": [0.011194, 0.011257, 0.011257], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v15"}} - }, - "right": { + }], + "earlyProbedBy": [18], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "tablescan", - "operatorId": 12, + "operatorId": 19, "sqlpos": [[315, 323]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 8, "attributes": [0], "type": "lookup"}, {"builder": 4, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00233399], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v16"}} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v11"}} - }, - "right": { - "operator": "groupby", - "operatorId": 13, - "sqlpos": [[686, 704]], - "cardinality": 107.4, - "input": { + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[351, 357]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0483602], "type": "hashprobe", "passOnNulls": false}, {"builder": 3, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }] + }] +} +}, { + "name": "CachingAndBatching", + "plan": { + "operator": "executiontarget", + "operatorId": 1, + "cardinality": 1, + "producesRows": true, + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], + "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], + "inputs": [{ + "operator": "sort", + "operatorId": 2, + "sqlpos": [[1156, 1170], [1216, 1225]], + "cardinality": 1, + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], + "limit": 100, + "inputs": [{ + "operator": "join", + "operatorId": 3, + "cardinality": 1, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 4, + "sqlpos": [[367, 373]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "join", + "operatorId": 5, + "cardinality": 1.20901, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 14, - "cardinality": 107.4, + "operatorId": 6, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 15, - "cardinality": 103.6, + "operatorId": 7, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1, 2], + "inputs": [{ "operator": "join", - "operatorId": 16, - "cardinality": 5, + "operatorId": 8, + "cardinality": 6, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 17, - "sqlpos": [[850, 856]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v21", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", - "operatorId": 18, - "sqlpos": [[818, 824]], - "cardinality": 25, - "relationId": 8, + "operatorId": 9, + "sqlpos": [[301, 305]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v22", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 16, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v23"}, "right": {"expression": "iuref", "iu": "v20"}} - }, - "right": { + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257 + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[686, 704]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[850, 856]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[818, 824]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 13, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[784, 792]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 12, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[750, 758]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 11, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.011257], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", - "operatorId": 19, - "sqlpos": [[784, 792]], - "cardinality": 518, - "relationId": 3, + "operatorId": 18, + "sqlpos": [[333, 341]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 15, "attributes": [3], "type": "lookup"}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 7, "attributes": [3, 0, 0], "numEqualityPredicates": 3, "selectivities": [0.011194, 0.011257, 0.011257], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v25"}, "right": {"expression": "iuref", "iu": "v22"}} - }, - "right": { + }], + "earlyProbedBy": [18], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "tablescan", - "operatorId": 20, - "sqlpos": [[750, 758]], - "cardinality": 537, - "relationId": 4, + "operatorId": 19, + "sqlpos": [[315, 323]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v28", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 14, "attributes": [1], "type": "lookup"}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00233399], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v27"}} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v26"}}, "iu": ["v29", ["Integer"]]}], - "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], - "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v28"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v30", ["Numeric", 12, 2, "nullable"]]}] - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v30"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v29"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v29"}, "right": {"expression": "iuref", "iu": "v15"}}]} - } - } + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[351, 357]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0483602], "type": "hashprobe", "passOnNulls": false}, {"builder": 3, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }] + }] } }, { "name": "Final", "plan": { "operator": "executiontarget", "operatorId": 1, - "cardinality": 1.2, + "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1156, 1170], [1216, 1225]], - "cardinality": 1.2, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "cardinality": 1, + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, - "cardinality": 1.2, + "cardinality": 1, "method": "hash", - "left": { - "operator": "join", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", "operatorId": 4, + "sqlpos": [[367, 373]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "join", + "operatorId": 5, "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 5, - "cardinality": 5, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 6, - "sqlpos": [[367, 373]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v10", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 7, - "sqlpos": [[351, 357]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 5, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v9"}} - }, - "right": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 8, - "cardinality": 6.04503, + "operatorId": 6, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 9, - "cardinality": 6.04503, + "operatorId": 7, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 10, - "sqlpos": [[301, 305]], + "computeLeftBounds": [0, 1, 2], + "inputs": [{ + "operator": "join", + "operatorId": 8, "cardinality": 6, - "relationId": 2, - "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v13", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v13"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], - "selectivity": 0.011257 - }, - "right": { + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 9, + "sqlpos": [[301, 305]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, + "schema": {"type":"sessionschema"}, + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257 + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[686, 704]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[850, 856]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[818, 824]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 13, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[784, 792]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 12, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[750, 758]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 11, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.011257], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", - "operatorId": 11, + "operatorId": 18, "sqlpos": [[333, 341]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 9, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3, 0, 0], "numEqualityPredicates": 3, "selectivities": [0.011194, 0.011257, 0.011257], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v15"}} - }, - "right": { + }], + "earlyProbedBy": [18], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "tablescan", - "operatorId": 12, + "operatorId": 19, "sqlpos": [[315, 323]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 8, "attributes": [0], "type": "lookup"}, {"builder": 4, "attributes": [3], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v16"}} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v11"}} - }, - "right": { - "operator": "groupby", - "operatorId": 13, - "sqlpos": [[686, 704]], - "cardinality": 107.4, - "input": { - "operator": "join", - "operatorId": 14, - "cardinality": 107.4, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 15, - "cardinality": 103.6, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 16, - "cardinality": 5, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 17, - "sqlpos": [[850, 856]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v21", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 18, - "sqlpos": [[818, 824]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v22", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 16, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v23"}, "right": {"expression": "iuref", "iu": "v20"}} - }, - "right": { - "operator": "tablescan", - "operatorId": 19, - "sqlpos": [[784, 792]], - "cardinality": 518, - "relationId": 3, - "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 15, "attributes": [3], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v25"}, "right": {"expression": "iuref", "iu": "v22"}} - }, - "right": { - "operator": "tablescan", - "operatorId": 20, - "sqlpos": [[750, 758]], - "cardinality": 537, - "relationId": 4, - "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v28", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 14, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00233399], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v27"}} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v26"}}, "iu": ["v29", ["Integer"]]}], - "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], - "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v28"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v30", ["Numeric", 12, 2, "nullable"]]}] - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v30"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v29"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v29"}, "right": {"expression": "iuref", "iu": "v15"}}]} - } - } + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[351, 357]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0483602], "type": "hashprobe", "passOnNulls": false}, {"builder": 3, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }] + }] } }]} \ No newline at end of file diff --git a/standalone-app/examples/hyper/tpch/tpch-q2.plan.json b/standalone-app/examples/hyper/tpch/tpch-q2.plan.json index e5a79d4..d95cc91 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q2.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q2.plan.json @@ -1,198 +1,217 @@ { "operator": "executiontarget", "operatorId": 1, - "cardinality": 1.2, + "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Char", 25]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}, {"expression": "iuref", "iu": ["v5", ["Char", 25]]}, {"expression": "iuref", "iu": ["v6", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["v7", ["Char", 15]]}, {"expression": "iuref", "iu": ["v8", ["Varchar", 101]]}], + "output": [{"expression": "iuref", "iu": ["scan_acctbal", ["Numeric", 12, 2]]}, {"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_n_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_partkey", ["Integer"]]}, {"expression": "iuref", "iu": ["scan_p_mfgr", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}, {"expression": "iuref", "iu": ["scan_s_phone", ["Char", 15]]}, {"expression": "iuref", "iu": ["scan_comment", ["Varchar", 101]]}], "outputNames": ["s_acctbal", "s_name", "n_name", "p_partkey", "p_mfgr", "s_address", "s_phone", "s_comment"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1140, 1154], [1200, 1209]], - "cardinality": 1.2, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], + "cardinality": 1, + "criterion": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "scan_n_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "scan_partkey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "join", "operatorId": 3, - "cardinality": 1.2, + "cardinality": 1, "method": "hash", - "left": { - "operator": "join", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", "operatorId": 4, + "sqlpos": [[351, 357]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "join", + "operatorId": 5, "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 5, - "cardinality": 5, + "operatorId": 6, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 6, - "sqlpos": [[351, 357]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v10", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 7, - "sqlpos": [[335, 341]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v3", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 5, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v9"}} - }, - "right": { - "operator": "join", - "operatorId": 8, - "cardinality": 6.04503, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", - "operatorId": 9, - "cardinality": 6.04503, + "operatorId": 7, + "cardinality": 1.20901, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 10, - "sqlpos": [[285, 289]], + "computeLeftBounds": [0, 1, 2], + "inputs": [{ + "operator": "join", + "operatorId": 8, "cardinality": 6, - "relationId": 2, - "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v13", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v13"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], - "selectivity": 0.011257 - }, - "right": { + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 9, + "sqlpos": [[285, 289]], + "cardinality": 6, + "volatility": "stable", + "relationId": 2, + "schema": {"type":"sessionschema"}, + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 2, "name": "p_mfgr", "type": ["Char", 25], "iu": ["scan_p_mfgr", ["Char", 25]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]},{"colId": 5, "name": "p_size", "type": ["Integer"], "iu": ["scan_p_size", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "part"}, + "restrictions": [{"attribute": 5, "mode": "=", "value": {"expression": "const", "value": {"type": ["Integer"], "value": 15}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_type"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%BRASS"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "selectivity": 0.011257 + }, { + "operator": "groupby", + "operatorId": 10, + "sqlpos": [[670, 688]], + "cardinality": 107.4, + "inputs": [{ + "operator": "join", + "operatorId": 11, + "cardinality": 107.4, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 12, + "cardinality": 103.6, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "join", + "operatorId": 13, + "cardinality": 5, + "method": "hash", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "tablescan", + "operatorId": 14, + "sqlpos": [[834, 840]], + "cardinality": 1, + "volatility": "stable", + "relationId": 9, + "schema": {"type":"sessionschema"}, + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name2", ["Char", 25]]}], + "debugName": {"classification": "nonsensitive", "value": "region"}, + "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], + "selectivity": 0.2 + }, { + "operator": "tablescan", + "operatorId": 15, + "sqlpos": [[802, 808]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke3", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 13, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke3"}, "right": {"expression": "iuref", "iu": "scan_regionke2"}} + }, { + "operator": "tablescan", + "operatorId": 16, + "sqlpos": [[768, 776]], + "cardinality": 518, + "volatility": "stable", + "relationId": 3, + "schema": {"type":"sessionschema"}, + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "supplier"}, + "earlyProbes": [{"builder": 12, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}} + }, { + "operator": "tablescan", + "operatorId": 17, + "sqlpos": [[734, 742]], + "cardinality": 537, + "volatility": "stable", + "relationId": 4, + "schema": {"type":"sessionschema"}, + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], + "debugName": {"classification": "nonsensitive", "value": "partsupp"}, + "earlyProbes": [{"builder": 11, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.011257], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_partkey2"}}, "iu": ["GroupByKey", ["Integer"]]}], + "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], + "emptyGroups": true, + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_supplyco"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["min", ["Numeric", 12, 2, "nullable"]]}] + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey"}} + }, { "operator": "tablescan", - "operatorId": 11, + "operatorId": 18, "sqlpos": [[317, 325]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 9, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3, 0, 0], "numEqualityPredicates": 3, "selectivities": [0.011194, 0.011257, 0.011257], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v15"}} - }, - "right": { + }], + "earlyProbedBy": [18], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_supplyco2"}, "right": {"expression": "iuref", "iu": "min"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "GroupByKey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}]} + }, { "operator": "tablescan", - "operatorId": 12, + "operatorId": 19, "sqlpos": [[299, 307]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v2", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v6", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": ["v7", ["Char", 15]]}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["v", ["Numeric", 12, 2]]}, {"name": "s_comment", "type": ["Varchar", 101], "iu": ["v8", ["Varchar", 101]]}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]},{"colId": 4, "name": "s_phone", "type": ["Char", 15], "iu": ["scan_s_phone", ["Char", 15]]},{"colId": 5, "name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]},{"colId": 6, "name": "s_comment", "type": ["Varchar", 101], "iu": ["scan_comment", ["Varchar", 101]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 8, "attributes": [0], "type": "lookup"}, {"builder": 4, "attributes": [3], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v16"}} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v11"}} - }, - "right": { - "operator": "groupby", - "operatorId": 13, - "sqlpos": [[670, 688]], - "cardinality": 107.4, - "input": { - "operator": "join", - "operatorId": 14, - "cardinality": 107.4, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 15, - "cardinality": 103.6, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", - "operatorId": 16, - "cardinality": 5, - "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "tablescan", - "operatorId": 17, - "sqlpos": [[834, 840]], - "cardinality": 1, - "relationId": 9, - "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v21", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "region"}, - "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "EUROPE"}}}], - "selectivity": 0.2 - }, - "right": { - "operator": "tablescan", - "operatorId": 18, - "sqlpos": [[802, 808]], - "cardinality": 25, - "relationId": 8, - "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v22", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v23", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 16, "attributes": [2], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v23"}, "right": {"expression": "iuref", "iu": "v20"}} - }, - "right": { - "operator": "tablescan", - "operatorId": 19, - "sqlpos": [[768, 776]], - "cardinality": 518, - "relationId": 3, - "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v24", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v25", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 15, "attributes": [3], "type": "lookup"}], - "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v25"}, "right": {"expression": "iuref", "iu": "v22"}} - }, - "right": { - "operator": "tablescan", - "operatorId": 20, - "sqlpos": [[734, 742]], - "cardinality": 537, - "relationId": 4, - "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v26", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v27", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v28", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 14, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00233399], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1 - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v24"}, "right": {"expression": "iuref", "iu": "v27"}} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v26"}}, "iu": ["v29", ["Integer"]]}], - "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], - "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v28"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "min"}, "iu": ["v30", ["Numeric", 12, 2, "nullable"]]}] - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v30"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v4"}, "right": {"expression": "iuref", "iu": "v29"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v29"}}]} - } - } + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}} + }, { + "operator": "tablescan", + "operatorId": 20, + "sqlpos": [[335, 341]], + "cardinality": 25, + "volatility": "stable", + "relationId": 8, + "schema": {"type":"sessionschema"}, + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke4", ["Integer"]]}], + "debugName": {"classification": "nonsensitive", "value": "nation"}, + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0483602], "type": "hashprobe", "passOnNulls": false}, {"builder": 3, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 1 + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke4"}, "right": {"expression": "iuref", "iu": "scan_regionke"}} + }] + }] } diff --git a/standalone-app/examples/hyper/tpch/tpch-q20-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q20-analyze.plan.json index d694d55..c7bad88 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q20-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q20-analyze.plan.json @@ -3,138 +3,150 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 25]]}, {"expression": "iuref", "iu": ["v2", ["Varchar", 40]]}], + "output": [{"expression": "iuref", "iu": ["scan_s_name", ["Char", 25]]}, {"expression": "iuref", "iu": ["scan_address", ["Varchar", 40]]}], "outputNames": ["s_name", "s_address"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[1384, 1390]], + "sqlpos": [[1385, 1391]], "cardinality": 1, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "scan_s_name"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "join", "operatorId": 3, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 4, - "sqlpos": [[206, 212]], + "sqlpos": [[207, 213]], "cardinality": 1, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v4", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "CANADA"}}}], "selectivity": 0.04, - "analyze": {"pipeline": 2, "cpu-cycles": 65, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 2, "column-count": 1, "cpu-cycles": 630, "processed-rows": 25, "running": false, "tuple-count": 1} + }, { "operator": "rightsemijoin", "operatorId": 5, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "filterJoinIU": ["scan_suppkey", ["Integer"]], + "inputs": [{ "operator": "leftsemijoin", "operatorId": 6, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1], + "inputs": [{ "operator": "rightsemijoin", "operatorId": 7, "cardinality": 4.01869, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "filterJoinIU": ["scan_partkey", ["Integer"]], + "inputs": [{ "operator": "tablescan", "operatorId": 8, - "sqlpos": [[582, 586]], + "sqlpos": [[583, 587]], "cardinality": 4, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": ["v6", ["Varchar", 55]]}, {"name": "p_mfgr", "type": ["Char", 25], "iu": null}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": null}, {"name": "p_size", "type": ["Integer"], "iu": null}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "p_name", "type": ["Varchar", 55], "iu": ["scan_p_name", ["Varchar", 55]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 1, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v6"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "forest%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "restrictions": [{"attribute": 1, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_name"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "forest%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], "selectivity": 0.00750469, - "analyze": {"pipeline": 5, "cpu-cycles": 463, "running": false, "tuple-count": 4} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 1, "cpu-cycles": 608, "processed-rows": 533, "running": false, "tuple-count": 4} + }, { "operator": "tablescan", "operatorId": 9, - "sqlpos": [[345, 353]], + "sqlpos": [[346, 354]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": null}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 2, "name": "ps_availqty", "type": ["Integer"], "iu": ["scan_availqty", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 7, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00750469], "type": "exactprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 714, "running": false, "tuple-count": 4} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v5"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 4} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 3, "cpu-cycles": 277, "processed-rows": 537, "running": false, "tuple-count": 4} + }], + "earlyProbedBy": [9], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey2"}}, + "analyze": {"pipeline": 4, "column-count": 3, "memory-bytes": 18552, "tuple-count": 4} + }, { "operator": "map", "operatorId": 10, - "sqlpos": [[836, 857]], + "sqlpos": [[837, 858]], "cardinality": 150, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 11, - "sqlpos": [[842, 857]], + "sqlpos": [[843, 858]], "cardinality": 150, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 12, - "sqlpos": [[935, 943]], + "sqlpos": [[936, 944]], "cardinality": 150, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v12", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v13", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 1, "name": "l_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity", ["Numeric", 12, 2]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "restrictions": [{"attribute": 10, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}}], "residuals": [{"expression": "const", "value": {"type": ["Bool"], "value": true}}, {"expression": "const", "value": {"type": ["Bool"], "value": true}}], - "earlyProbes": [{"builder": 6, "attributes": [1, 2], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [1, 2, 4294967295], "numEqualityPredicates": 2, "selectivities": [0.00753976, 0.00775809, null], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.262238, - "analyze": {"pipeline": 6, "cpu-cycles": 292, "running": false, "tuple-count": 2} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v11"}}, "iu": ["v14", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v10"}}, "iu": ["v15", ["Integer"]]}], + "analyze": {"pipeline": 6, "column-count": 3, "cpu-cycles": 177, "processed-rows": 572, "running": false, "tuple-count": 2} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_suppkey3"}}, "iu": ["GroupByKey", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_partkey3"}}, "iu": ["GroupByKey2", ["Integer"]]}], "groupingSets": [{"keyIndices": [0, 1], "coreIndices": [0, 1], "behavior": "regular"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v12"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v16", ["BigNumeric", 38, 2, "nullable"]]}], - "analyze": {"pipeline": 3, "cpu-cycles": 183, "memory-bytes": 18432, "running": false, "tuple-count": 2} - }, - "values": [{"iu": ["v17", ["BigNumeric", 38, 3, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v16"}, "right": {"expression": "const", "value": {"type": ["Numeric", 2, 1], "value": 5}}}}], - "analyze": {"pipeline": 3, "tuple-count": 2} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v15"}}, {"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "v8"}, "right": {"expression": "iuref", "iu": "v14"}}, {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v17"}}]}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 1} - }, - "right": { + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_quantity"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 2, "nullable"]]}], + "analyze": {"pipeline": 3, "column-count": 3, "cpu-cycles": 160, "memory-bytes": 18552, "running": false, "tuple-count": 2} + }], + "values": [{"iu": ["map", ["BigNumeric", 38, 3, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "sum"}, "right": {"expression": "const", "value": {"type": ["Numeric", 2, 1], "value": 5}}}}], + "analyze": {"pipeline": 3, "column-count": 3, "tuple-count": 2} + }], + "earlyProbedBy": [12], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "GroupByKey2"}}, {"expression": "comparison", "mode": "is", "left": {"expression": "iuref", "iu": "scan_suppkey2"}, "right": {"expression": "iuref", "iu": "GroupByKey"}}, {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "scan_availqty"}, "right": {"expression": "iuref", "iu": "map"}}]}, + "analyze": {"pipeline": 3, "column-count": 1, "memory-bytes": 18552, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 13, - "sqlpos": [[188, 196]], + "sqlpos": [[189, 197]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": ["v2", ["Varchar", 40]]}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 2, "name": "s_address", "type": ["Varchar", 40], "iu": ["scan_address", ["Varchar", 40]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 5, "attributes": [0], "type": "lookup"}, {"builder": 3, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0019305], "type": "exactprobe", "passOnNulls": false}, {"builder": 3, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 1, "cpu-cycles": 194, "running": false, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v8"}}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v3"}}, - "analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 1} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 25, "memory-bytes": 262152, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "analyze": {"pipeline": 1, "column-count": 4, "cpu-cycles": 266, "processed-rows": 518, "running": false, "tuple-count": 1} + }], + "earlyProbedBy": [13], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}, + "analyze": {"pipeline": 1, "column-count": 3, "memory-bytes": 18552, "tuple-count": 1} + }], + "earlyProbedBy": [13], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 1, "column-count": 2, "memory-bytes": 18552, "tuple-count": 1} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 33, "memory-bytes": 262152, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q21-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q21-analyze.plan.json index 754eb68..64ec05f 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q21-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q21-analyze.plan.json @@ -3,153 +3,165 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 25]]}, {"expression": "iuref", "iu": ["v2", ["BigInt"]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char", 25]]}, {"expression": "iuref", "iu": ["count", ["BigInt"]]}], "outputNames": ["s_name", "numwait"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[1139, 1151], [1168, 1178]], + "sqlpos": [[1140, 1152], [1169, 1179]], "cardinality": 1, - "criterion": [{"value": {"expression": "iuref", "iu": "v2"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "count"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}], "limit": 100, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[1098, 1121], [165, 173]], + "sqlpos": [[1099, 1122], [166, 174]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "leftsemijoin", "operatorId": 4, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "leftantijoin", + "computeLeftBounds": [0, 1], + "inputs": [{ + "operator": "join", "operatorId": 5, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { - "operator": "join", + "computeLeftBounds": [0], + "inputs": [{ + "operator": "leftantijoin", "operatorId": 6, - "cardinality": 6.52438, + "cardinality": 1.2167, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1], + "inputs": [{ "operator": "join", "operatorId": 7, "cardinality": 11.44, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 8, "cardinality": 20.72, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 9, - "sqlpos": [[253, 259]], + "sqlpos": [[254, 260]], "cardinality": 1, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v4", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "SAUDI ARABIA"}}}], "selectivity": 0.04, - "analyze": {"pipeline": 7, "cpu-cycles": 54, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 7, "column-count": 1, "cpu-cycles": 512, "processed-rows": 25, "running": false, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 10, - "sqlpos": [[198, 206]], + "sqlpos": [[199, 207]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": ["v6", ["Char", 25]]}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 1, "name": "s_name", "type": ["Char", 25], "iu": ["scan_s_name", ["Char", 25]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 8, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 8, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 288, "running": false, "tuple-count": 35} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v3"}}, - "analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 35} - }, - "right": { + "analyze": {"pipeline": 6, "column-count": 3, "cpu-cycles": 288, "processed-rows": 518, "running": false, "tuple-count": 35} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 6, "column-count": 2, "memory-bytes": 18552, "tuple-count": 35} + }, { "operator": "tablescan", "operatorId": 11, - "sqlpos": [[216, 224]], + "sqlpos": [[217, 225]], "cardinality": 286, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": ["v10", ["Date"]]}, {"name": "l_receiptdate", "type": ["Date"], "iu": ["v11", ["Date"]]}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 11, "name": "l_commitdate", "type": ["Date"], "iu": ["scan_commitda", ["Date"]]},{"colId": 12, "name": "l_receiptdate", "type": ["Date"], "iu": ["scan_receiptd", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "l1"}, - "residuals": [{"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v10"}}], - "earlyProbes": [{"builder": 7, "attributes": [2], "type": "lookup"}], + "residuals": [{"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "scan_receiptd"}, "right": {"expression": "iuref", "iu": "scan_commitda"}}], + "earlyProbes": [{"builder": 7, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.5, - "analyze": {"pipeline": 5, "cpu-cycles": 961, "running": false, "tuple-count": 87} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v5"}, "right": {"expression": "iuref", "iu": "v9"}}, - "analyze": {"pipeline": 5, "memory-bytes": 18432, "tuple-count": 27} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 362, "processed-rows": 572, "running": false, "tuple-count": 87} + }], + "earlyProbedBy": [11], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}, + "analyze": {"pipeline": 5, "column-count": 3, "memory-bytes": 18552, "tuple-count": 27} + }, { "operator": "tablescan", "operatorId": 12, - "sqlpos": [[237, 243]], - "cardinality": 73, - "relationId": 6, + "sqlpos": [[807, 815]], + "cardinality": 286, + "volatility": "stable", + "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": null}, {"name": "o_orderstatus", "type": ["Char1"], "iu": ["v13", ["Char1"]]}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": null}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "orders"}, - "restrictions": [{"attribute": 2, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char1"], "value": 70}}}], - "earlyProbes": [{"builder": 6, "attributes": [0], "type": "lookup"}], - "selectivity": 0.570312, - "analyze": {"pipeline": 4, "cpu-cycles": 227, "running": false, "tuple-count": 24} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v8"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 18} - }, - "right": { + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 11, "name": "l_commitdate", "type": ["Date"], "iu": ["scan_commitda2", ["Date"]]},{"colId": 12, "name": "l_receiptdate", "type": ["Date"], "iu": ["scan_receiptd2", ["Date"]]}], + "debugName": {"classification": "nonsensitive", "value": "l3"}, + "residuals": [{"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "scan_receiptd2"}, "right": {"expression": "iuref", "iu": "scan_commitda2"}}], + "earlyProbes": [{"builder": 6, "attributes": [0, 2], "numEqualityPredicates": 1, "selectivities": [0.089375, null], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 0.5, + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 291, "processed-rows": 572, "running": false, "tuple-count": 115} + }], + "earlyProbedBy": [12], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey2"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "scan_suppkey3"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}]}, + "analyze": {"pipeline": 4, "column-count": 3, "memory-bytes": 18560, "tuple-count": 5} + }, { "operator": "tablescan", "operatorId": 13, - "sqlpos": [[806, 814]], - "cardinality": 286, - "relationId": 7, + "sqlpos": [[238, 244]], + "cardinality": 73, + "volatility": "stable", + "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": ["v16", ["Date"]]}, {"name": "l_receiptdate", "type": ["Date"], "iu": ["v17", ["Date"]]}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], - "debugName": {"classification": "nonsensitive", "value": "l3"}, - "residuals": [{"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v16"}}], - "earlyProbes": [{"builder": 5, "attributes": [0], "type": "lookup"}], - "selectivity": 0.5, - "analyze": {"pipeline": 3, "cpu-cycles": 864, "running": false, "tuple-count": 74} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v14"}, "right": {"expression": "iuref", "iu": "v8"}}, {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v9"}}]}, - "analyze": {"pipeline": 3, "memory-bytes": 18440, "tuple-count": 4} - }, - "right": { + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey3", ["Integer"]]},{"colId": 2, "name": "o_orderstatus", "type": ["Char1"], "iu": ["scan_ordersta", ["Char1"]]}], + "debugName": {"classification": "nonsensitive", "value": "orders"}, + "restrictions": [{"attribute": 2, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char1"], "value": 70}}}], + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00950546], "type": "hashprobe", "passOnNulls": false}], + "selectivity": 0.570312, + "analyze": {"pipeline": 3, "column-count": 1, "cpu-cycles": 154, "processed-rows": 128, "running": false, "tuple-count": 6} + }], + "earlyProbedBy": [13], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey3"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, + "analyze": {"pipeline": 3, "column-count": 3, "memory-bytes": 18552, "tuple-count": 4} + }, { "operator": "tablescan", "operatorId": 14, - "sqlpos": [[532, 540]], + "sqlpos": [[533, 541]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey4", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey4", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "l2"}, - "earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 4, "attributes": [0, 2], "numEqualityPredicates": 1, "selectivities": [0.0078125, null], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 625, "running": false, "tuple-count": 20} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v8"}}, {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v9"}}]}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 1} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v6"}}, "iu": ["v", ["Char", 25]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 272, "processed-rows": 572, "running": false, "tuple-count": 20} + }], + "earlyProbedBy": [14], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey4"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, {"expression": "comparison", "mode": "<>", "left": {"expression": "iuref", "iu": "scan_suppkey4"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}]}, + "analyze": {"pipeline": 2, "column-count": 1, "memory-bytes": 18552, "tuple-count": 1} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_s_name"}}, "iu": ["GroupByKey", ["Char", 25]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggregates": [{"source": 4294967295, "operation": {"aggregate": "count"}, "iu": ["v2", ["BigInt"]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 151, "memory-bytes": 18432, "running": false, "tuple-count": 1} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 18, "heap-gc-passes": 0, "memory-bytes": 262152, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggregates": [{"source": null, "operation": {"aggregate": "count"}, "iu": ["count", ["BigInt"]]}], + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 288, "memory-bytes": 18552, "running": false, "tuple-count": 1} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 46, "heap-gc-passes": 0, "memory-bytes": 262152, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q22-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q22-analyze.plan.json index 6a908ce..65ae35b 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q22-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q22-analyze.plan.json @@ -3,104 +3,112 @@ "operatorId": 1, "cardinality": 6.26608, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Varchar"]]}, {"expression": "iuref", "iu": ["v2", ["BigInt"]]}, {"expression": "iuref", "iu": ["v3", ["BigNumeric", 38, 2]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Varchar"]]}, {"expression": "iuref", "iu": ["count", ["BigInt"]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 2]]}], "outputNames": ["cntrycode", "numcust", "totacctbal"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, - "sqlpos": [[1489, 1498]], + "sqlpos": [[1490, 1499]], "cardinality": 6.26608, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "groupby", "operatorId": 3, - "sqlpos": [[1445, 1471], [168, 176], [197, 211]], + "sqlpos": [[1446, 1472], [169, 177], [198, 212]], "cardinality": 6.26608, - "input": { + "inputs": [{ "operator": "map", "operatorId": 4, - "sqlpos": [[288, 332]], + "sqlpos": [[289, 333]], "cardinality": 6.96232, - "input": { + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 6.96232, "method": "hash", "singleMatch": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "groupby", "operatorId": 6, - "sqlpos": [[699, 713]], + "sqlpos": [[700, 714]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 7, - "sqlpos": [[791, 799]], + "sqlpos": [[792, 800]], "cardinality": 37, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": null}, {"name": "c_name", "type": ["Varchar", 25], "iu": null}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": null}, {"name": "c_phone", "type": ["Char", 15], "iu": ["v4", ["Char", 15]]}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": ["v5", ["Numeric", 12, 2]]}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 4, "name": "c_phone", "type": ["Char", 15], "iu": ["scan_c_phone", ["Char", 15]]},{"colId": 5, "name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, - "restrictions": [{"attribute": 5, "mode": ">", "value": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 0}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "substring", "arguments": [{"expression": "iuref", "iu": "v4"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 2}}]}], "values": [{"type": ["Varchar"], "value": "13"}, {"type": ["Varchar"], "value": "17"}, {"type": ["Varchar"], "value": "18"}, {"type": ["Varchar"], "value": "23"}, {"type": ["Varchar"], "value": "29"}, {"type": ["Varchar"], "value": "30"}, {"type": ["Varchar"], "value": "31"}], "collates": [null], "modes": ["equals"]}}], + "restrictions": [{"attribute": 5, "mode": ">", "value": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 0}}}, {"attribute": 4, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "substring", "arguments": [{"expression": "iuref", "iu": "scan_c_phone"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 2}}]}], "values": [{"type": ["Varchar"], "value": "13"}, {"type": ["Varchar"], "value": "17"}, {"type": ["Varchar"], "value": "18"}, {"type": ["Varchar"], "value": "23"}, {"type": ["Varchar"], "value": "29"}, {"type": ["Varchar"], "value": "30"}, {"type": ["Varchar"], "value": "31"}], "collates": [null], "modes": ["equals"]}}], "selectivity": 0.286822, - "analyze": {"pipeline": 4, "cpu-cycles": 311, "running": false, "tuple-count": 37} - }, + "analyze": {"pipeline": 4, "column-count": 1, "cpu-cycles": 745, "processed-rows": 129, "running": false, "tuple-count": 37} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v5"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "avg"}, "iu": ["v6", ["Numeric", 16, 6, "nullable"]]}], - "analyze": {"pipeline": 3, "cpu-cycles": 33, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "right": { + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_acctbal"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "avg"}, "iu": ["avg", ["Numeric", 16, 6, "nullable"]]}], + "analyze": {"pipeline": 3, "column-count": 1, "cpu-cycles": 101, "memory-bytes": 0, "running": false, "tuple-count": 1} + }, { "operator": "leftantijoin", "operatorId": 8, "cardinality": 13.9246, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 9, - "sqlpos": [[413, 421]], + "sqlpos": [[414, 422]], "cardinality": 38, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": null}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": null}, {"name": "c_phone", "type": ["Char", 15], "iu": ["v8", ["Char", 15]]}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": ["v9", ["Numeric", 12, 2]]}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer"]]},{"colId": 4, "name": "c_phone", "type": ["Char", 15], "iu": ["scan_c_phone2", ["Char", 15]]},{"colId": 5, "name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": ["scan_acctbal2", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, - "restrictions": [{"attribute": 4, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "substring", "arguments": [{"expression": "iuref", "iu": "v8"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 2}}]}], "values": [{"type": ["Varchar"], "value": "13"}, {"type": ["Varchar"], "value": "17"}, {"type": ["Varchar"], "value": "18"}, {"type": ["Varchar"], "value": "23"}, {"type": ["Varchar"], "value": "29"}, {"type": ["Varchar"], "value": "30"}, {"type": ["Varchar"], "value": "31"}], "collates": [null], "modes": ["equals"]}}], + "restrictions": [{"attribute": 4, "mode": "lambda", "expression": {"expression": "lookup", "input": [{"expression": "substring", "arguments": [{"expression": "iuref", "iu": "scan_c_phone2"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 2}}]}], "values": [{"type": ["Varchar"], "value": "13"}, {"type": ["Varchar"], "value": "17"}, {"type": ["Varchar"], "value": "18"}, {"type": ["Varchar"], "value": "23"}, {"type": ["Varchar"], "value": "29"}, {"type": ["Varchar"], "value": "30"}, {"type": ["Varchar"], "value": "31"}], "collates": [null], "modes": ["equals"]}}], + "earlyProbes": [{"builder": 5, "attributes": [5], "numEqualityPredicates": 0, "selectivities": [null], "type": "pruningonly", "passOnNulls": false}], "selectivity": 0.294574, - "analyze": {"pipeline": 5, "cpu-cycles": 371, "running": false, "tuple-count": 38} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 3, "cpu-cycles": 411, "processed-rows": 129, "running": false, "tuple-count": 38} + }, { "operator": "tablescan", "operatorId": 10, - "sqlpos": [[1290, 1296]], + "sqlpos": [[1291, 1297]], "cardinality": 128, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": null}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": null}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], "mightScanDomain": true, + "attributeCount": 9, + "attributes": [{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, - "earlyProbes": [{"builder": 8, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 8, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.294574], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 312, "running": false, "tuple-count": 47} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "iuref", "iu": "v7"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18440, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v6"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 1} - }, - "values": [{"iu": ["v11", ["Varchar"]], "value": {"expression": "substring", "arguments": [{"expression": "iuref", "iu": "v8"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 2}}]}}], - "analyze": {"pipeline": 2, "tuple-count": 1} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v11"}}, "iu": ["v", ["Varchar"]]}], + "analyze": {"pipeline": 2, "column-count": 1, "cpu-cycles": 154, "processed-rows": 128, "running": false, "tuple-count": 47} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey2"}, "right": {"expression": "iuref", "iu": "scan_custkey"}}, + "analyze": {"pipeline": 2, "column-count": 2, "memory-bytes": 18560, "tuple-count": 1} + }], + "earlyProbedBy": [9], + "condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "scan_acctbal2"}, "right": {"expression": "iuref", "iu": "avg"}}, + "analyze": {"pipeline": 2, "column-count": 2, "memory-bytes": 18552, "tuple-count": 1} + }], + "values": [{"iu": ["map", ["Varchar"]], "value": {"expression": "substring", "arguments": [{"expression": "iuref", "iu": "scan_c_phone2"}, {"expression": "const", "value": {"type": ["Integer"], "value": 1}}, {"expression": "const", "value": {"type": ["Integer"], "value": 2}}]}}], + "analyze": {"pipeline": 2, "column-count": 2, "tuple-count": 1} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "map"}}, "iu": ["GroupByKey", ["Varchar"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v9"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v3", ["BigNumeric", 38, 2]]}, {"source": 4294967295, "operation": {"aggregate": "count"}, "iu": ["v2", ["BigInt"]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 181, "memory-bytes": 18432, "running": false, "tuple-count": 1} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 24, "memory-bytes": 262152, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_acctbal2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 2]]}, {"source": null, "operation": {"aggregate": "count"}, "iu": ["count", ["BigInt"]]}], + "analyze": {"pipeline": 1, "column-count": 3, "cpu-cycles": 183, "memory-bytes": 18552, "running": false, "tuple-count": 1} + }], + "analyze": {"pipeline": 0, "column-count": 3, "cpu-cycles": 45, "memory-bytes": 262152, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q3-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q3-analyze.plan.json index 2996f45..6ca319a 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q3-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q3-analyze.plan.json @@ -3,87 +3,93 @@ "operatorId": 1, "cardinality": 10, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigNumeric", 38, 4]]}, {"expression": "iuref", "iu": ["v3", ["Date"]]}, {"expression": "iuref", "iu": ["v4", ["Integer"]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4]]}, {"expression": "iuref", "iu": ["GroupByKey2", ["Date"]]}, {"expression": "iuref", "iu": ["GroupByKey3", ["Integer"]]}], "outputNames": ["l_orderkey", "revenue", "o_orderdate", "o_shippriority"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[608, 620], [642, 651]], "cardinality": 10, - "criterion": [{"value": {"expression": "iuref", "iu": "v2"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}], + "criterion": [{"value": {"expression": "iuref", "iu": "sum"}, "descending": true, "nullFirst": true}, {"value": {"expression": "iuref", "iu": "GroupByKey2"}, "descending": false, "nullFirst": false}], "limit": 10, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 3, "sqlpos": [[518, 590], [169, 208]], "cardinality": 57.5016, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 63.8906, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 29, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 6, "sqlpos": [[278, 286]], "cardinality": 29, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": null}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": null}, {"name": "c_phone", "type": ["Char", 15], "iu": null}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": ["v6", ["Char", 10]]}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer"]]},{"colId": 6, "name": "c_mktsegment", "type": ["Char", 10], "iu": ["scan_mktsegme", ["Char", 10]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, "restrictions": [{"attribute": 6, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 10], "value": "BUILDING"}}}], "selectivity": 0.224806, - "analyze": {"pipeline": 4, "cpu-cycles": 132, "running": false, "tuple-count": 29} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 1, "cpu-cycles": 592, "processed-rows": 129, "running": false, "tuple-count": 29} + }, { "operator": "tablescan", "operatorId": 7, "sqlpos": [[296, 302]], "cardinality": 75, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": ["v9", ["Date"]]}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]},{"colId": 4, "name": "o_orderdate", "type": ["Date"], "iu": ["scan_orderdat", ["Date"]]},{"colId": 7, "name": "o_shippriority", "type": ["Integer"], "iu": ["scan_shipprio", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, "restrictions": [{"attribute": 4, "mode": "<", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449792}}}], - "earlyProbes": [{"builder": 5, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 5, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.224806], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.585938, - "analyze": {"pipeline": 3, "cpu-cycles": 225, "running": false, "tuple-count": 19} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v5"}, "right": {"expression": "iuref", "iu": "v8"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 15} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 4, "cpu-cycles": 246, "processed-rows": 128, "running": false, "tuple-count": 19} + }], + "earlyProbedBy": [7], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey"}, "right": {"expression": "iuref", "iu": "scan_custkey2"}}, + "analyze": {"pipeline": 3, "column-count": 3, "memory-bytes": 18552, "tuple-count": 15} + }, { "operator": "tablescan", "operatorId": 8, "sqlpos": [[312, 320]], "cardinality": 282, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v12", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v13", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v14", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "restrictions": [{"attribute": 10, "mode": ">", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449792}}}], - "earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 4, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.226563], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.493007, - "analyze": {"pipeline": 2, "cpu-cycles": 439, "running": false, "tuple-count": 36} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v7"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 11} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v11"}}, "iu": ["v", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v9"}}, "iu": ["v3", ["Date"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v10"}}, "iu": ["v4", ["Integer"]]}], + "analyze": {"pipeline": 2, "column-count": 3, "cpu-cycles": 283, "processed-rows": 572, "running": false, "tuple-count": 36} + }], + "earlyProbedBy": [8], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey2"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, + "analyze": {"pipeline": 2, "column-count": 5, "memory-bytes": 18552, "tuple-count": 11} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_orderkey2"}}, "iu": ["GroupByKey", ["Integer"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_orderdat"}}, "iu": ["GroupByKey2", ["Date"]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_shipprio"}}, "iu": ["GroupByKey3", ["Integer"]]}], "groupingSets": [{"keyIndices": [0, 1, 2], "coreIndices": [0, 1, 2], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v13"}}, "right": {"expression": "iuref", "iu": "v12"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 354, "memory-bytes": 18432, "running": false, "tuple-count": 3} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 35, "heap-gc-passes": 0, "memory-bytes": 262168, "running": false, "tuple-count": 3} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4]]}], + "analyze": {"pipeline": 1, "column-count": 4, "cpu-cycles": 235, "memory-bytes": 18552, "running": false, "tuple-count": 3} + }], + "analyze": {"pipeline": 0, "column-count": 4, "cpu-cycles": 91, "heap-gc-passes": 0, "memory-bytes": 262168, "running": false, "tuple-count": 3} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q4-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q4-analyze.plan.json index 25215a4..5b28db6 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q4-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q4-analyze.plan.json @@ -3,62 +3,66 @@ "operatorId": 1, "cardinality": 4.46938, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 15]]}, {"expression": "iuref", "iu": ["v2", ["BigInt"]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char", 15]]}, {"expression": "iuref", "iu": ["count", ["BigInt"]]}], "outputNames": ["o_orderpriority", "order_count"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[620, 635]], "cardinality": 4.46938, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "groupby", "operatorId": 3, "sqlpos": [[570, 602], [174, 182]], "cardinality": 4.46938, - "input": { + "inputs": [{ "operator": "leftsemijoin", "operatorId": 4, "cardinality": 4.46938, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 5, "sqlpos": [[211, 217]], "cardinality": 5, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": null}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": ["v4", ["Date"]]}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": ["v5", ["Char", 15]]}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 4, "name": "o_orderdate", "type": ["Date"], "iu": ["scan_orderdat", ["Date"]]},{"colId": 5, "name": "o_orderpriority", "type": ["Char", 15], "iu": ["scan_orderpri", ["Char", 15]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, "restrictions": [{"attribute": 4, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449170}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449262}}}], "selectivity": 0.0390625, - "analyze": {"pipeline": 3, "cpu-cycles": 106, "running": false, "tuple-count": 5} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 2, "cpu-cycles": 518, "processed-rows": 128, "running": false, "tuple-count": 5} + }, { "operator": "tablescan", "operatorId": 6, "sqlpos": [[424, 432]], "cardinality": 286, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v6", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": ["v7", ["Date"]]}, {"name": "l_receiptdate", "type": ["Date"], "iu": ["v8", ["Date"]]}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 11, "name": "l_commitdate", "type": ["Date"], "iu": ["scan_commitda", ["Date"]]},{"colId": 12, "name": "l_receiptdate", "type": ["Date"], "iu": ["scan_receiptd", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "residuals": [{"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v8"}}], - "earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}], + "residuals": [{"expression": "comparison", "mode": "<", "left": {"expression": "iuref", "iu": "scan_commitda"}, "right": {"expression": "iuref", "iu": "scan_receiptd"}}], + "earlyProbes": [{"builder": 4, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0390625], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.5, - "analyze": {"pipeline": 2, "cpu-cycles": 894, "running": false, "tuple-count": 21} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v3"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 5} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v5"}}, "iu": ["v", ["Char", 15]]}], + "analyze": {"pipeline": 2, "column-count": 1, "cpu-cycles": 331, "processed-rows": 572, "running": false, "tuple-count": 21} + }], + "earlyProbedBy": [6], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey2"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, + "analyze": {"pipeline": 2, "column-count": 1, "memory-bytes": 18552, "tuple-count": 5} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_orderpri"}}, "iu": ["GroupByKey", ["Char", 15]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggregates": [{"source": 4294967295, "operation": {"aggregate": "count"}, "iu": ["v2", ["BigInt"]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 219, "memory-bytes": 18432, "running": false, "tuple-count": 4} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 31, "memory-bytes": 262176, "running": false, "tuple-count": 4} - }, - "analyze": {"error": null, "pipeline": 0} + "aggregates": [{"source": null, "operation": {"aggregate": "count"}, "iu": ["count", ["BigInt"]]}], + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 185, "memory-bytes": 18552, "running": false, "tuple-count": 4} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 68, "memory-bytes": 262176, "running": false, "tuple-count": 4} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q5-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q5-analyze.plan.json index 7ba26a9..0241529 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q5-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q5-analyze.plan.json @@ -3,151 +3,163 @@ "operatorId": 1, "cardinality": 5, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 25]]}, {"expression": "iuref", "iu": ["v2", ["BigNumeric", 38, 4]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char", 25]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4]]}], "outputNames": ["n_name", "revenue"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[700, 712]], "cardinality": 5, - "criterion": [{"value": {"expression": "iuref", "iu": "v2"}, "descending": true, "nullFirst": true}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "sum"}, "descending": true, "nullFirst": true}], + "inputs": [{ "operator": "groupby", "operatorId": 3, "sqlpos": [[659, 682], [165, 204]], "cardinality": 5, - "input": { + "inputs": [{ "operator": "join", "operatorId": 4, "cardinality": 34.8563, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1], + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 34.8563, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 6, "cardinality": 7.8, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 7, "cardinality": 25.8, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 8, "cardinality": 5, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 9, "sqlpos": [[315, 321]], "cardinality": 1, + "volatility": "stable", "relationId": 9, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v4", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "region"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "ASIA"}}}], "selectivity": 0.2, - "analyze": {"pipeline": 7, "cpu-cycles": 69, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 7, "column-count": 1, "cpu-cycles": 584, "processed-rows": 5, "running": false, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 10, "sqlpos": [[299, 305]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v6", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, - "earlyProbes": [{"builder": 8, "attributes": [2], "type": "lookup"}], + "earlyProbes": [{"builder": 8, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 167, "running": false, "tuple-count": 5} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v3"}}, - "analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 5} - }, - "right": { + "analyze": {"pipeline": 6, "column-count": 3, "cpu-cycles": 163, "processed-rows": 25, "running": false, "tuple-count": 5} + }], + "earlyProbedBy": [10], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke2"}, "right": {"expression": "iuref", "iu": "scan_regionke"}}, + "analyze": {"pipeline": 6, "column-count": 2, "memory-bytes": 18552, "tuple-count": 5} + }, { "operator": "tablescan", "operatorId": 11, "sqlpos": [[229, 237]], "cardinality": 129, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": null}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "c_phone", "type": ["Char", 15], "iu": null}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer"]]},{"colId": 3, "name": "c_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, - "earlyProbes": [{"builder": 7, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 5, "cpu-cycles": 399, "running": false, "tuple-count": 21} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v5"}, "right": {"expression": "iuref", "iu": "v9"}}, - "analyze": {"pipeline": 5, "memory-bytes": 18432, "tuple-count": 21} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 189, "processed-rows": 129, "running": false, "tuple-count": 21} + }], + "earlyProbedBy": [11], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 5, "column-count": 3, "memory-bytes": 18552, "tuple-count": 21} + }, { "operator": "tablescan", "operatorId": 12, "sqlpos": [[247, 253]], "cardinality": 39, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": ["v12", ["Date"]]}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]},{"colId": 4, "name": "o_orderdate", "type": ["Date"], "iu": ["scan_orderdat", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, "restrictions": [{"attribute": 4, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}}], - "earlyProbes": [{"builder": 6, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.304688, - "analyze": {"pipeline": 4, "cpu-cycles": 139, "running": false, "tuple-count": 11} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v8"}, "right": {"expression": "iuref", "iu": "v11"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 9} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 146, "processed-rows": 128, "running": false, "tuple-count": 11} + }], + "earlyProbedBy": [12], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey"}, "right": {"expression": "iuref", "iu": "scan_custkey2"}}, + "analyze": {"pipeline": 4, "column-count": 3, "memory-bytes": 18552, "tuple-count": 9} + }, { "operator": "tablescan", "operatorId": 13, "sqlpos": [[263, 271]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v13", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v15", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v16", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "earlyProbes": [{"builder": 5, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0609375], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 911, "running": false, "tuple-count": 44} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v13"}, "right": {"expression": "iuref", "iu": "v10"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 34} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 4, "cpu-cycles": 331, "processed-rows": 572, "running": false, "tuple-count": 44} + }], + "earlyProbedBy": [13], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey2"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, + "analyze": {"pipeline": 3, "column-count": 5, "memory-bytes": 18552, "tuple-count": 34} + }, { "operator": "tablescan", "operatorId": 14, "sqlpos": [[281, 289]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v17", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 4, "attributes": [0, 3], "type": "minmaxonly"}], + "earlyProbes": [{"builder": 4, "attributes": [0, 3], "numEqualityPredicates": 2, "selectivities": [0.0672901, 1], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 1138, "running": false, "tuple-count": 518} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v14"}, "right": {"expression": "iuref", "iu": "v17"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v18"}}]}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 1} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v6"}}, "iu": ["v", ["Char", 25]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 187, "processed-rows": 518, "running": false, "tuple-count": 518} + }], + "earlyProbedBy": [14], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke3"}}]}, + "analyze": {"pipeline": 2, "column-count": 3, "memory-bytes": 18552, "tuple-count": 1} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_n_name"}}, "iu": ["GroupByKey", ["Char", 25]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v16"}}, "right": {"expression": "iuref", "iu": "v15"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 266, "memory-bytes": 18432, "running": false, "tuple-count": 1} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 24, "memory-bytes": 262152, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4]]}], + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 225, "memory-bytes": 18552, "running": false, "tuple-count": 1} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 46, "memory-bytes": 262152, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q6-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q6-analyze.plan.json index 28a824b..48b70ec 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q6-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q6-analyze.plan.json @@ -3,31 +3,33 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["BigNumeric", 38, 4, "nullable"]]}], + "output": [{"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4, "nullable"]]}], "outputNames": ["revenue"], - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 2, "sqlpos": [[149, 182]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 3, "sqlpos": [[207, 215]], "cardinality": 20, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": null}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": null}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v2", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v3", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v4", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v5", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity", ["Numeric", 12, 2]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "restrictions": [{"attribute": 6, "mode": "[]", "value": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 5}}, "value2": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 7}}}, {"attribute": 10, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}}, {"attribute": 4, "mode": "<", "value": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 2400}}}], + "restrictions": [{"attribute": 6, "mode": "[]", "selectivity": 0.272727, "value": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 5}}, "value2": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 7}}}, {"attribute": 10, "mode": "[)", "selectivity": 0.3, "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}}, {"attribute": 4, "mode": "<", "selectivity": 0.5, "value": {"expression": "const", "value": {"type": ["Numeric", 12, 2], "value": 2400}}}], "selectivity": 0.034965, - "analyze": {"pipeline": 1, "cpu-cycles": 124, "running": false, "tuple-count": 20} - }, + "analyze": {"pipeline": 1, "column-count": 2, "cpu-cycles": 700, "processed-rows": 572, "running": false, "tuple-count": 20} + }], "groupingSets": [{"keyIndices": [], "coreIndices": null, "behavior": "static"}], "emptyGroups": true, - "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v3"}, "right": {"expression": "iuref", "iu": "v4"}}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v", ["BigNumeric", 38, 4, "nullable"]]}], - "analyze": {"pipeline": 0, "cpu-cycles": 14, "memory-bytes": 0, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_extended"}, "right": {"expression": "iuref", "iu": "scan_discount"}}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4, "nullable"]]}], + "analyze": {"pipeline": 0, "column-count": 1, "cpu-cycles": 31, "memory-bytes": 0, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q7-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q7-analyze.plan.json index a84f1b3..adb39be 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q7-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q7-analyze.plan.json @@ -3,156 +3,167 @@ "operatorId": 1, "cardinality": 162.047, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 25]]}, {"expression": "iuref", "iu": ["v2", ["Char", 25]]}, {"expression": "iuref", "iu": ["v3", ["Integer"]]}, {"expression": "iuref", "iu": ["v4", ["BigNumeric", 38, 4]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char", 25]]}, {"expression": "iuref", "iu": ["GroupByKey2", ["Char", 25]]}, {"expression": "iuref", "iu": ["GroupByKey3", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4]]}], "outputNames": ["supp_nation", "cust_nation", "l_year", "revenue"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1423, 1434]], "cardinality": 162.047, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v3"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "GroupByKey2"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "GroupByKey3"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "groupby", "operatorId": 3, "sqlpos": [[1340, 1405], [207, 218]], "cardinality": 162.047, - "input": { + "inputs": [{ "operator": "map", "operatorId": 4, "sqlpos": [[292, 316]], "cardinality": 180.053, - "input": { + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 180.053, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1], + "inputs": [{ "operator": "join", "operatorId": 6, "cardinality": 180.053, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 7, "cardinality": 95.6297, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 8, "cardinality": 96.3768, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 9, "cardinality": 18.6777, "method": "bnl", - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 10, "sqlpos": [[716, 722]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v6", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "n2"}, "selectivity": 1, - "analyze": {"pipeline": 7, "cpu-cycles": 227, "running": false, "tuple-count": 25} - }, - "right": { + "analyze": {"pipeline": 7, "column-count": 2, "cpu-cycles": 540, "processed-rows": 25, "running": false, "tuple-count": 25} + }, { "operator": "tablescan", "operatorId": 11, "sqlpos": [[681, 687]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v8", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name2", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "n1"}, "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 1451, "running": false, "tuple-count": 25} - }, - "condition": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "v8"}, {"expression": "iuref", "iu": "v6"}], "values": [{"type": ["Char", 25], "value": "FRANCE"}, {"type": ["Char", 25], "value": "GERMANY"}, {"type": ["Char", 25], "value": "GERMANY"}, {"type": ["Char", 25], "value": "FRANCE"}], "collates": [null, null], "modes": ["is", "is"]}, - "analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 2} - }, - "right": { + "analyze": {"pipeline": 6, "column-count": 2, "cpu-cycles": 632, "processed-rows": 25, "running": false, "tuple-count": 25} + }], + "condition": {"expression": "lookup", "input": [{"expression": "iuref", "iu": "scan_n_name2"}, {"expression": "iuref", "iu": "scan_n_name"}], "values": [{"type": ["Char", 25], "value": "FRANCE"}, {"type": ["Char", 25], "value": "GERMANY"}, {"type": ["Char", 25], "value": "GERMANY"}, {"type": ["Char", 25], "value": "FRANCE"}], "collates": [null, null], "modes": ["is", "is"]}, + "analyze": {"pipeline": 6, "column-count": 4, "memory-bytes": 18552, "tuple-count": 2} + }, { "operator": "tablescan", "operatorId": 12, "sqlpos": [[647, 655]], "cardinality": 129, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": null}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": ["v10", ["Integer"]]}, {"name": "c_phone", "type": ["Char", 15], "iu": null}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer"]]},{"colId": 3, "name": "c_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, - "earlyProbes": [{"builder": 8, "attributes": [3], "type": "lookup"}], + "earlyProbes": [{"builder": 8, "attributes": [3], "numEqualityPredicates": 1, "selectivities": [0.747107], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 5, "cpu-cycles": 266, "running": false, "tuple-count": 12} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "iuref", "iu": "v5"}}, - "analyze": {"pipeline": 5, "memory-bytes": 18432, "tuple-count": 12} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 226, "processed-rows": 129, "running": false, "tuple-count": 12} + }], + "earlyProbedBy": [12], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 5, "column-count": 4, "memory-bytes": 18552, "tuple-count": 12} + }, { "operator": "tablescan", "operatorId": 13, "sqlpos": [[615, 621]], "cardinality": 128, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": null}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, - "earlyProbes": [{"builder": 7, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.747107], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 233, "running": false, "tuple-count": 15} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v12"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 12} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 152, "processed-rows": 128, "running": false, "tuple-count": 15} + }], + "earlyProbedBy": [13], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey"}, "right": {"expression": "iuref", "iu": "scan_custkey2"}}, + "analyze": {"pipeline": 4, "column-count": 4, "memory-bytes": 18552, "tuple-count": 12} + }, { "operator": "tablescan", "operatorId": 14, "sqlpos": [[581, 589]], "cardinality": 241, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v13", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": null}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v15", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v16", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": ["v17", ["Date"]]}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]},{"colId": 10, "name": "l_shipdate", "type": ["Date"], "iu": ["scan_shipdate", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, "restrictions": [{"attribute": 10, "mode": "[]", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2450449}}}], - "earlyProbes": [{"builder": 6, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.747107], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.421329, - "analyze": {"pipeline": 3, "cpu-cycles": 529, "running": false, "tuple-count": 30} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v13"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 30} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 5, "cpu-cycles": 372, "processed-rows": 572, "running": false, "tuple-count": 30} + }], + "earlyProbedBy": [14], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey"}, "right": {"expression": "iuref", "iu": "scan_orderkey2"}}, + "analyze": {"pipeline": 3, "column-count": 7, "memory-bytes": 18552, "tuple-count": 30} + }, { "operator": "tablescan", "operatorId": 15, "sqlpos": [[547, 555]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 5, "attributes": [0, 3], "type": "minmaxonly"}], + "earlyProbes": [{"builder": 5, "attributes": [0, 3], "numEqualityPredicates": 2, "selectivities": [0.347592, 1], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 1190, "running": false, "tuple-count": 518} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v14"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v7"}}]}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 1} - }, - "values": [{"iu": ["v20", ["Integer"]], "value": {"expression": "extractyear", "input": {"expression": "iuref", "iu": "v17"}}}, {"iu": ["v21", ["BigNumeric", 25, 4]], "value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v16"}}, "right": {"expression": "iuref", "iu": "v15"}}}], - "analyze": {"pipeline": 2, "tuple-count": 1} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v8"}}, "iu": ["v", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "v6"}}, "iu": ["v2", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "v20"}}, "iu": ["v3", ["Integer"]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 243, "processed-rows": 518, "running": false, "tuple-count": 518} + }], + "earlyProbedBy": [15], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey2"}, "right": {"expression": "iuref", "iu": "scan_suppkey"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke4"}, "right": {"expression": "iuref", "iu": "scan_nationke2"}}]}, + "analyze": {"pipeline": 2, "column-count": 5, "memory-bytes": 18552, "tuple-count": 1} + }], + "values": [{"iu": ["map", ["Integer"]], "value": {"expression": "extractyear", "input": {"expression": "iuref", "iu": "scan_shipdate"}}}, {"iu": ["map2", ["BigNumeric", 25, 4]], "value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "analyze": {"pipeline": 2, "column-count": 4, "tuple-count": 1} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_n_name2"}}, "iu": ["GroupByKey", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "scan_n_name"}}, "iu": ["GroupByKey2", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "map"}}, "iu": ["GroupByKey3", ["Integer"]]}], "groupingSets": [{"keyIndices": [0, 1, 2], "coreIndices": [0, 1, 2], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v21"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v4", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 342, "memory-bytes": 18432, "running": false, "tuple-count": 1} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 131, "memory-bytes": 262152, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "iuref", "iu": "map2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4]]}], + "analyze": {"pipeline": 1, "column-count": 4, "cpu-cycles": 240, "memory-bytes": 18552, "running": false, "tuple-count": 1} + }], + "analyze": {"pipeline": 0, "column-count": 4, "cpu-cycles": 72, "memory-bytes": 262152, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q8-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q8-analyze.plan.json index d8fbe11..bc4dbe4 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q8-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q8-analyze.plan.json @@ -3,211 +3,227 @@ "operatorId": 1, "cardinality": 1, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigNumeric", 38, 6]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Integer"]]}, {"expression": "iuref", "iu": ["map", ["BigNumeric", 38, 6]]}], "outputNames": ["o_year", "mkt_share"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1446, 1452]], "cardinality": 1, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}], + "inputs": [{ "operator": "map", "operatorId": 3, "sqlpos": [[149, 155]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "groupby", "operatorId": 4, "sqlpos": [[1405, 1428], [165, 260], [263, 274]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "map", "operatorId": 5, "sqlpos": [[350, 390]], "cardinality": 1, - "input": { + "inputs": [{ "operator": "join", "operatorId": 6, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 7, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 8, "cardinality": 1, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 9, "sqlpos": [[785, 791]], "cardinality": 1, + "volatility": "stable", "relationId": 9, "schema": {"type":"sessionschema"}, - "values": [{"name": "r_regionkey", "type": ["Integer"], "iu": ["v3", ["Integer"]]}, {"name": "r_name", "type": ["Char", 25], "iu": ["v4", ["Char", 25]]}, {"name": "r_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "r_regionkey", "type": ["Integer"], "iu": ["scan_regionke", ["Integer"]]},{"colId": 1, "name": "r_name", "type": ["Char", 25], "iu": ["scan_r_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "region"}, "restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "AMERICA"}}}], "selectivity": 0.2, - "analyze": {"pipeline": 5, "cpu-cycles": 57, "running": false, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 1, "cpu-cycles": 598, "processed-rows": 5, "running": false, "tuple-count": 1} + }, { "operator": "join", "operatorId": 10, "cardinality": 1.18216, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 11, "cardinality": 1.18216, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 12, "cardinality": 1.18216, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 13, "cardinality": 3.21951, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 14, "sqlpos": [[551, 555]], "cardinality": 3, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v5", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": null}, {"name": "p_mfgr", "type": ["Char", 25], "iu": null}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": ["v6", ["Varchar", 25]]}, {"name": "p_size", "type": ["Integer"], "iu": null}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 4, "name": "p_type", "type": ["Varchar", 25], "iu": ["scan_p_type", ["Varchar", 25]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, "restrictions": [{"attribute": 4, "mode": "=", "value": {"expression": "const", "value": {"type": ["Varchar", 25], "value": "ECONOMY ANODIZED STEEL"}}}], "selectivity": 0.00562852, - "analyze": {"pipeline": 9, "cpu-cycles": 134, "running": false, "tuple-count": 3} - }, - "right": { + "analyze": {"pipeline": 9, "column-count": 1, "cpu-cycles": 311, "processed-rows": 533, "running": false, "tuple-count": 3} + }, { "operator": "tablescan", "operatorId": 15, "sqlpos": [[615, 623]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v7", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v10", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v11", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 1, "name": "l_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "earlyProbes": [{"builder": 13, "attributes": [1], "type": "lookup"}], + "earlyProbes": [{"builder": 13, "attributes": [1], "numEqualityPredicates": 1, "selectivities": [0.00562852], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 8, "cpu-cycles": 726, "running": false, "tuple-count": 10} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v5"}, "right": {"expression": "iuref", "iu": "v8"}}, - "analyze": {"pipeline": 8, "memory-bytes": 18432, "tuple-count": 3} - }, - "right": { + "analyze": {"pipeline": 8, "column-count": 5, "cpu-cycles": 291, "processed-rows": 572, "running": false, "tuple-count": 10} + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey2"}}, + "analyze": {"pipeline": 8, "column-count": 4, "memory-bytes": 18552, "tuple-count": 3} + }, { "operator": "tablescan", "operatorId": 16, "sqlpos": [[649, 655]], "cardinality": 47, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": ["v13", ["Integer"]]}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": ["v14", ["Date"]]}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 1, "name": "o_custkey", "type": ["Integer"], "iu": ["scan_custkey", ["Integer"]]},{"colId": 4, "name": "o_orderdate", "type": ["Date"], "iu": ["scan_orderdat", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, "restrictions": [{"attribute": 4, "mode": "[]", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449719}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2450449}}}], - "earlyProbes": [{"builder": 12, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 12, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0251524], "type": "hashprobe", "passOnNulls": false}], "selectivity": 0.367188, - "analyze": {"pipeline": 7, "cpu-cycles": 208, "running": false, "tuple-count": 2} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v12"}}, - "analyze": {"pipeline": 7, "memory-bytes": 18432, "tuple-count": 2} - }, - "right": { + "analyze": {"pipeline": 7, "column-count": 3, "cpu-cycles": 142, "processed-rows": 128, "running": false, "tuple-count": 2} + }], + "earlyProbedBy": [16], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey"}, "right": {"expression": "iuref", "iu": "scan_orderkey2"}}, + "analyze": {"pipeline": 7, "column-count": 5, "memory-bytes": 18552, "tuple-count": 2} + }, { "operator": "tablescan", "operatorId": 17, "sqlpos": [[681, 689]], "cardinality": 129, + "volatility": "stable", "relationId": 5, "schema": {"type":"sessionschema"}, - "values": [{"name": "c_custkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "c_name", "type": ["Varchar", 25], "iu": null}, {"name": "c_address", "type": ["Varchar", 40], "iu": null}, {"name": "c_nationkey", "type": ["Integer"], "iu": ["v16", ["Integer"]]}, {"name": "c_phone", "type": ["Char", 15], "iu": null}, {"name": "c_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "c_mktsegment", "type": ["Char", 10], "iu": null}, {"name": "c_comment", "type": ["Varchar", 117], "iu": null}], + "attributeCount": 8, + "attributes": [{"colId": 0, "name": "c_custkey", "type": ["Integer"], "iu": ["scan_custkey2", ["Integer"]]},{"colId": 3, "name": "c_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "customer"}, - "earlyProbes": [{"builder": 11, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 11, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.00916407], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 184, "running": false, "tuple-count": 4} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v13"}, "right": {"expression": "iuref", "iu": "v15"}}, - "analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 2} - }, - "right": { + "analyze": {"pipeline": 6, "column-count": 2, "cpu-cycles": 122, "processed-rows": 129, "running": false, "tuple-count": 4} + }], + "earlyProbedBy": [17], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_custkey"}, "right": {"expression": "iuref", "iu": "scan_custkey2"}}, + "analyze": {"pipeline": 6, "column-count": 5, "memory-bytes": 18552, "tuple-count": 2} + }, { "operator": "tablescan", "operatorId": 18, "sqlpos": [[715, 721]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v17", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": null}, {"name": "n_regionkey", "type": ["Integer"], "iu": ["v18", ["Integer"]]}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]},{"colId": 2, "name": "n_regionkey", "type": ["Integer"], "iu": ["scan_regionke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "n1"}, - "earlyProbes": [{"builder": 10, "attributes": [0], "type": "lookup"}, {"builder": 8, "attributes": [2], "type": "lookup"}], + "earlyProbes": [{"builder": 10, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0472866], "type": "hashprobe", "passOnNulls": false}, {"builder": 8, "attributes": [2], "numEqualityPredicates": 1, "selectivities": [0.2], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 144, "running": false, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v16"}, "right": {"expression": "iuref", "iu": "v17"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v18"}, "right": {"expression": "iuref", "iu": "v3"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 95, "processed-rows": 25, "running": false, "tuple-count": 1} + }], + "earlyProbedBy": [18], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke"}, "right": {"expression": "iuref", "iu": "scan_nationke2"}}, + "analyze": {"pipeline": 4, "column-count": 5, "memory-bytes": 18552, "tuple-count": 1} + }], + "earlyProbedBy": [18], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_regionke2"}, "right": {"expression": "iuref", "iu": "scan_regionke"}}, + "analyze": {"pipeline": 4, "column-count": 4, "memory-bytes": 18552, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 19, "sqlpos": [[581, 589]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v20", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke3", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 7, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 7, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0019305], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 30, "running": false, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v9"}}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 1} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 2, "cpu-cycles": 170, "processed-rows": 518, "running": false, "tuple-count": 1} + }], + "earlyProbedBy": [19], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey2"}, "right": {"expression": "iuref", "iu": "scan_suppkey"}}, + "analyze": {"pipeline": 3, "column-count": 4, "memory-bytes": 18552, "tuple-count": 1} + }, { "operator": "tablescan", "operatorId": 20, "sqlpos": [[750, 756]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v21", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v22", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke4", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "n2"}, - "earlyProbes": [{"builder": 6, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 6, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.04], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 36, "running": false, "tuple-count": 1} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v20"}, "right": {"expression": "iuref", "iu": "v21"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 1} - }, - "values": [{"iu": ["v23", ["Integer"]], "value": {"expression": "extractyear", "input": {"expression": "iuref", "iu": "v14"}}}, {"iu": ["v24", ["BigNumeric", 25, 4]], "value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v11"}}, "right": {"expression": "iuref", "iu": "v10"}}}], - "analyze": {"pipeline": 2, "tuple-count": 1} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v23"}}, "iu": ["v", ["Integer"]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 121, "processed-rows": 25, "running": false, "tuple-count": 1} + }], + "earlyProbedBy": [20], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke3"}, "right": {"expression": "iuref", "iu": "scan_nationke4"}}, + "analyze": {"pipeline": 2, "column-count": 4, "memory-bytes": 18552, "tuple-count": 1} + }], + "values": [{"iu": ["map2", ["Integer"]], "value": {"expression": "extractyear", "input": {"expression": "iuref", "iu": "scan_orderdat"}}}, {"iu": ["map3", ["BigNumeric", 25, 4]], "value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}}], + "analyze": {"pipeline": 2, "column-count": 3, "tuple-count": 1} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "map2"}}, "iu": ["GroupByKey", ["Integer"]]}], "groupingSets": [{"keyIndices": [0], "coreIndices": [0], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "simplecase", "value": {"expression": "iuref", "iu": "v22"}, "cases": [{"cases": [{"expression": "const", "value": {"type": ["Varchar"], "value": "BRAZIL"}}], "value": {"expression": "iuref", "iu": "v24"}}], "else": {"expression": "const", "value": {"type": ["BigNumeric", 25, 4], "low": 0, "high": 0}}}}, {"value": {"expression": "iuref", "iu": "v24"}}], - "aggregates": [{"source": 1, "operation": {"aggregate": "sum"}, "iu": ["v25", ["BigNumeric", 38, 4]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v26", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 280, "memory-bytes": 18432, "running": false, "tuple-count": 1} - }, - "values": [{"iu": ["v2", ["BigNumeric", 38, 6]], "value": {"expression": "div", "left": {"expression": "iuref", "iu": "v26"}, "right": {"expression": "iuref", "iu": "v25"}}}], - "analyze": {"pipeline": 1, "tuple-count": 1} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 24, "memory-bytes": 262152, "running": false, "tuple-count": 1} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "simplecase", "value": {"expression": "iuref", "iu": "scan_n_name"}, "cases": [{"cases": [{"expression": "const", "value": {"type": ["Varchar"], "value": "BRAZIL"}}], "value": {"expression": "iuref", "iu": "map3"}}], "else": {"expression": "const", "value": {"type": ["BigNumeric", 25, 4], "low": 0, "high": 0}}}}, {"value": {"expression": "iuref", "iu": "map3"}}], + "aggregates": [{"source": 1, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum2", ["BigNumeric", 38, 4]]}], + "analyze": {"pipeline": 1, "column-count": 3, "cpu-cycles": 217, "memory-bytes": 18552, "running": false, "tuple-count": 1} + }], + "values": [{"iu": ["map", ["BigNumeric", 38, 6]], "value": {"expression": "div", "left": {"expression": "iuref", "iu": "sum2"}, "right": {"expression": "iuref", "iu": "sum"}}}], + "analyze": {"pipeline": 1, "column-count": 2, "tuple-count": 1} + }], + "analyze": {"pipeline": 0, "column-count": 2, "cpu-cycles": 45, "memory-bytes": 262152, "running": false, "tuple-count": 1} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/tpch/tpch-q9-analyze.plan.json b/standalone-app/examples/hyper/tpch/tpch-q9-analyze.plan.json index 3f3dfd3..360e5a0 100644 --- a/standalone-app/examples/hyper/tpch/tpch-q9-analyze.plan.json +++ b/standalone-app/examples/hyper/tpch/tpch-q9-analyze.plan.json @@ -3,156 +3,167 @@ "operatorId": 1, "cardinality": 27.0439, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Char", 25]]}, {"expression": "iuref", "iu": ["v2", ["Integer"]]}, {"expression": "iuref", "iu": ["v3", ["BigNumeric", 38, 4]]}], + "output": [{"expression": "iuref", "iu": ["GroupByKey", ["Char", 25]]}, {"expression": "iuref", "iu": ["GroupByKey2", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigNumeric", 38, 4]]}], "outputNames": ["nation", "o_year", "sum_profit"], - "input": { + "inputs": [{ "operator": "sort", "operatorId": 2, "sqlpos": [[1120, 1126]], "cardinality": 27.0439, - "criterion": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "v2"}, "descending": true, "nullFirst": true}], - "input": { + "criterion": [{"value": {"expression": "iuref", "iu": "GroupByKey"}, "descending": false, "nullFirst": false}, {"value": {"expression": "iuref", "iu": "GroupByKey2"}, "descending": true, "nullFirst": true}], + "inputs": [{ "operator": "groupby", "operatorId": 3, "sqlpos": [[1063, 1102], [181, 192]], "cardinality": 27.0439, - "input": { + "inputs": [{ "operator": "map", "operatorId": 4, "sqlpos": [[269, 285]], "cardinality": 30.0488, - "input": { + "inputs": [{ "operator": "join", "operatorId": 5, "cardinality": 30.0488, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 6, "cardinality": 30.0488, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0, 1, 2, 3], + "inputs": [{ "operator": "join", "operatorId": 7, "cardinality": 28.2101, "method": "hash", - "left": { + "inputs": [{ "operator": "tablescan", "operatorId": 8, "sqlpos": [[660, 666]], "cardinality": 25, + "volatility": "stable", "relationId": 8, "schema": {"type":"sessionschema"}, - "values": [{"name": "n_nationkey", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "n_name", "type": ["Char", 25], "iu": ["v5", ["Char", 25]]}, {"name": "n_regionkey", "type": ["Integer"], "iu": null}, {"name": "n_comment", "type": ["Varchar", 152], "iu": null}], + "attributeCount": 4, + "attributes": [{"colId": 0, "name": "n_nationkey", "type": ["Integer"], "iu": ["scan_nationke", ["Integer"]]},{"colId": 1, "name": "n_name", "type": ["Char", 25], "iu": ["scan_n_name", ["Char", 25]]}], "debugName": {"classification": "nonsensitive", "value": "nation"}, "selectivity": 1, - "analyze": {"pipeline": 5, "cpu-cycles": 132, "running": false, "tuple-count": 25} - }, - "right": { + "analyze": {"pipeline": 5, "column-count": 2, "cpu-cycles": 370, "processed-rows": 25, "running": false, "tuple-count": 25} + }, { "operator": "join", "operatorId": 9, "cardinality": 28.2101, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "join", "operatorId": 10, "cardinality": 28.2101, "method": "hash", - "referencedByScanEarlyProbe": true, - "left": { + "computeLeftBounds": [0], + "inputs": [{ "operator": "tablescan", "operatorId": 11, "sqlpos": [[496, 500]], "cardinality": 28, + "volatility": "stable", "relationId": 2, "schema": {"type":"sessionschema"}, - "values": [{"name": "p_partkey", "type": ["Integer"], "iu": ["v6", ["Integer"]]}, {"name": "p_name", "type": ["Varchar", 55], "iu": ["v7", ["Varchar", 55]]}, {"name": "p_mfgr", "type": ["Char", 25], "iu": null}, {"name": "p_brand", "type": ["Char", 10], "iu": null}, {"name": "p_type", "type": ["Varchar", 25], "iu": null}, {"name": "p_size", "type": ["Integer"], "iu": null}, {"name": "p_container", "type": ["Char", 10], "iu": null}, {"name": "p_retailprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "p_comment", "type": ["Varchar", 23], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "p_partkey", "type": ["Integer"], "iu": ["scan_partkey", ["Integer"]]},{"colId": 1, "name": "p_name", "type": ["Varchar", 55], "iu": ["scan_p_name", ["Varchar", 55]]}], "debugName": {"classification": "nonsensitive", "value": "part"}, - "restrictions": [{"attribute": 1, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "v7"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%green%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], + "restrictions": [{"attribute": 1, "mode": "lambda", "expression": {"expression": "like", "arguments": [{"expression": "iuref", "iu": "scan_p_name"}, {"expression": "const", "value": {"type": ["Varchar"], "value": "%green%"}}, {"expression": "const", "value": {"type": ["Varchar"], "value": "\\"}}]}}], "selectivity": 0.0525328, - "analyze": {"pipeline": 7, "cpu-cycles": 1278, "running": false, "tuple-count": 28} - }, - "right": { + "analyze": {"pipeline": 7, "column-count": 1, "cpu-cycles": 18549, "processed-rows": 533, "running": false, "tuple-count": 28} + }, { "operator": "tablescan", "operatorId": 12, "sqlpos": [[594, 602]], "cardinality": 537, + "volatility": "stable", "relationId": 4, "schema": {"type":"sessionschema"}, - "values": [{"name": "ps_partkey", "type": ["Integer"], "iu": ["v8", ["Integer"]]}, {"name": "ps_suppkey", "type": ["Integer"], "iu": ["v9", ["Integer"]]}, {"name": "ps_availqty", "type": ["Integer"], "iu": null}, {"name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["v10", ["Numeric", 12, 2]]}, {"name": "ps_comment", "type": ["Varchar", 199], "iu": null}], + "attributeCount": 5, + "attributes": [{"colId": 0, "name": "ps_partkey", "type": ["Integer"], "iu": ["scan_partkey2", ["Integer"]]},{"colId": 1, "name": "ps_suppkey", "type": ["Integer"], "iu": ["scan_suppkey", ["Integer"]]},{"colId": 3, "name": "ps_supplycost", "type": ["Numeric", 12, 2], "iu": ["scan_supplyco", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "partsupp"}, - "earlyProbes": [{"builder": 10, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 10, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0525328], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 6, "cpu-cycles": 941, "running": false, "tuple-count": 89} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v8"}}, - "analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 28} - }, - "right": { + "analyze": {"pipeline": 6, "column-count": 3, "cpu-cycles": 309, "processed-rows": 537, "running": false, "tuple-count": 89} + }], + "earlyProbedBy": [12], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey2"}, "right": {"expression": "iuref", "iu": "scan_partkey"}}, + "analyze": {"pipeline": 6, "column-count": 4, "memory-bytes": 18552, "tuple-count": 28} + }, { "operator": "tablescan", "operatorId": 13, "sqlpos": [[526, 534]], "cardinality": 518, + "volatility": "stable", "relationId": 3, "schema": {"type":"sessionschema"}, - "values": [{"name": "s_suppkey", "type": ["Integer"], "iu": ["v11", ["Integer"]]}, {"name": "s_name", "type": ["Char", 25], "iu": null}, {"name": "s_address", "type": ["Varchar", 40], "iu": null}, {"name": "s_nationkey", "type": ["Integer"], "iu": ["v12", ["Integer"]]}, {"name": "s_phone", "type": ["Char", 15], "iu": null}, {"name": "s_acctbal", "type": ["Numeric", 12, 2], "iu": null}, {"name": "s_comment", "type": ["Varchar", 101], "iu": null}], + "attributeCount": 7, + "attributes": [{"colId": 0, "name": "s_suppkey", "type": ["Integer"], "iu": ["scan_suppkey2", ["Integer"]]},{"colId": 3, "name": "s_nationkey", "type": ["Integer"], "iu": ["scan_nationke2", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "supplier"}, - "earlyProbes": [{"builder": 9, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 9, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.0544597], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 4, "cpu-cycles": 1280, "running": false, "tuple-count": 73} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v9"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 28} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v4"}}, - "analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 28} - }, - "right": { + "analyze": {"pipeline": 4, "column-count": 2, "cpu-cycles": 308, "processed-rows": 518, "running": false, "tuple-count": 73} + }], + "earlyProbedBy": [13], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey2"}}, + "analyze": {"pipeline": 4, "column-count": 6, "memory-bytes": 18552, "tuple-count": 28} + }], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_nationke2"}, "right": {"expression": "iuref", "iu": "scan_nationke"}}, + "analyze": {"pipeline": 4, "column-count": 6, "memory-bytes": 18552, "tuple-count": 28} + }, { "operator": "tablescan", "operatorId": 14, "sqlpos": [[560, 568]], "cardinality": 572, + "volatility": "stable", "relationId": 7, "schema": {"type":"sessionschema"}, - "values": [{"name": "l_orderkey", "type": ["Integer"], "iu": ["v13", ["Integer"]]}, {"name": "l_partkey", "type": ["Integer"], "iu": ["v14", ["Integer"]]}, {"name": "l_suppkey", "type": ["Integer"], "iu": ["v15", ["Integer"]]}, {"name": "l_linenumber", "type": ["Integer"], "iu": null}, {"name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["v16", ["Numeric", 12, 2]]}, {"name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["v17", ["Numeric", 12, 2]]}, {"name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["v18", ["Numeric", 12, 2]]}, {"name": "l_tax", "type": ["Numeric", 12, 2], "iu": null}, {"name": "l_returnflag", "type": ["Char1"], "iu": null}, {"name": "l_linestatus", "type": ["Char1"], "iu": null}, {"name": "l_shipdate", "type": ["Date"], "iu": null}, {"name": "l_commitdate", "type": ["Date"], "iu": null}, {"name": "l_receiptdate", "type": ["Date"], "iu": null}, {"name": "l_shipinstruct", "type": ["Char", 25], "iu": null}, {"name": "l_shipmode", "type": ["Char", 10], "iu": null}, {"name": "l_comment", "type": ["Varchar", 44], "iu": null}], + "attributeCount": 16, + "attributes": [{"colId": 0, "name": "l_orderkey", "type": ["Integer"], "iu": ["scan_orderkey", ["Integer"]]},{"colId": 1, "name": "l_partkey", "type": ["Integer"], "iu": ["scan_partkey3", ["Integer"]]},{"colId": 2, "name": "l_suppkey", "type": ["Integer"], "iu": ["scan_suppkey3", ["Integer"]]},{"colId": 4, "name": "l_quantity", "type": ["Numeric", 12, 2], "iu": ["scan_quantity", ["Numeric", 12, 2]]},{"colId": 5, "name": "l_extendedprice", "type": ["Numeric", 12, 2], "iu": ["scan_extended", ["Numeric", 12, 2]]},{"colId": 6, "name": "l_discount", "type": ["Numeric", 12, 2], "iu": ["scan_discount", ["Numeric", 12, 2]]}], "debugName": {"classification": "nonsensitive", "value": "lineitem"}, - "earlyProbes": [{"builder": 6, "attributes": [1, 1, 2, 2], "type": "minmaxonly"}], + "earlyProbes": [{"builder": 6, "attributes": [1, 1, 2, 2], "numEqualityPredicates": 4, "selectivities": [0.0529271, 0.0529271, 0.0544597, 0.0544597], "type": "pruningonly", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 3, "cpu-cycles": 1423, "running": false, "tuple-count": 572} - }, - "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v8"}, "right": {"expression": "iuref", "iu": "v14"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v14"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v15"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "iuref", "iu": "v15"}}]}, - "analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 28} - }, - "right": { + "analyze": {"pipeline": 3, "column-count": 6, "cpu-cycles": 218, "processed-rows": 572, "running": false, "tuple-count": 572} + }], + "earlyProbedBy": [14], + "condition": {"expression": "and", "arguments": [{"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey2"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_partkey"}, "right": {"expression": "iuref", "iu": "scan_partkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}}, {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_suppkey2"}, "right": {"expression": "iuref", "iu": "scan_suppkey3"}}]}, + "analyze": {"pipeline": 3, "column-count": 6, "memory-bytes": 18552, "tuple-count": 28} + }, { "operator": "tablescan", "operatorId": 15, "sqlpos": [[628, 634]], "cardinality": 128, + "volatility": "stable", "relationId": 6, "schema": {"type":"sessionschema"}, - "values": [{"name": "o_orderkey", "type": ["Integer"], "iu": ["v19", ["Integer"]]}, {"name": "o_custkey", "type": ["Integer"], "iu": null}, {"name": "o_orderstatus", "type": ["Char1"], "iu": null}, {"name": "o_totalprice", "type": ["Numeric", 12, 2], "iu": null}, {"name": "o_orderdate", "type": ["Date"], "iu": ["v20", ["Date"]]}, {"name": "o_orderpriority", "type": ["Char", 15], "iu": null}, {"name": "o_clerk", "type": ["Char", 15], "iu": null}, {"name": "o_shippriority", "type": ["Integer"], "iu": null}, {"name": "o_comment", "type": ["Varchar", 79], "iu": null}], + "attributeCount": 9, + "attributes": [{"colId": 0, "name": "o_orderkey", "type": ["Integer"], "iu": ["scan_orderkey2", ["Integer"]]},{"colId": 4, "name": "o_orderdate", "type": ["Date"], "iu": ["scan_orderdat", ["Date"]]}], "debugName": {"classification": "nonsensitive", "value": "orders"}, - "earlyProbes": [{"builder": 5, "attributes": [0], "type": "lookup"}], + "earlyProbes": [{"builder": 5, "attributes": [0], "numEqualityPredicates": 1, "selectivities": [0.234756], "type": "hashprobe", "passOnNulls": false}], "selectivity": 1, - "analyze": {"pipeline": 2, "cpu-cycles": 449, "running": false, "tuple-count": 36} - }, - "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v13"}}, - "analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 28} - }, - "values": [{"iu": ["v21", ["Integer"]], "value": {"expression": "extractyear", "input": {"expression": "iuref", "iu": "v20"}}}, {"iu": ["v22", ["BigNumeric", 26, 4]], "value": {"expression": "sub", "left": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v18"}}, "right": {"expression": "iuref", "iu": "v17"}}, "right": {"expression": "mul", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "iuref", "iu": "v16"}}}}], - "analyze": {"pipeline": 2, "tuple-count": 28} - }, - "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v5"}}, "iu": ["v", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "v21"}}, "iu": ["v2", ["Integer"]]}], + "analyze": {"pipeline": 2, "column-count": 2, "cpu-cycles": 317, "processed-rows": 128, "running": false, "tuple-count": 36} + }], + "earlyProbedBy": [15], + "condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "scan_orderkey2"}, "right": {"expression": "iuref", "iu": "scan_orderkey"}}, + "analyze": {"pipeline": 2, "column-count": 6, "memory-bytes": 18552, "tuple-count": 28} + }], + "values": [{"iu": ["map", ["Integer"]], "value": {"expression": "extractyear", "input": {"expression": "iuref", "iu": "scan_orderdat"}}}, {"iu": ["map2", ["BigNumeric", 26, 4]], "value": {"expression": "sub", "left": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "scan_discount"}}, "right": {"expression": "iuref", "iu": "scan_extended"}}, "right": {"expression": "mul", "left": {"expression": "iuref", "iu": "scan_supplyco"}, "right": {"expression": "iuref", "iu": "scan_quantity"}}}}], + "analyze": {"pipeline": 2, "column-count": 3, "tuple-count": 28} + }], + "keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "scan_n_name"}}, "iu": ["GroupByKey", ["Char", 25]]}, {"expression": {"value": {"expression": "iuref", "iu": "map"}}, "iu": ["GroupByKey2", ["Integer"]]}], "groupingSets": [{"keyIndices": [0, 1], "coreIndices": [0, 1], "behavior": "regular"}], "emptyGroups": false, - "aggExpressions": [{"value": {"expression": "iuref", "iu": "v22"}}], - "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v3", ["BigNumeric", 38, 4]]}], - "analyze": {"pipeline": 1, "cpu-cycles": 255, "memory-bytes": 18432, "running": false, "tuple-count": 27} - }, - "analyze": {"pipeline": 0, "cpu-cycles": 89, "memory-bytes": 262360, "running": false, "tuple-count": 27} - }, - "analyze": {"error": null, "pipeline": 0} + "aggExpressions": [{"value": {"expression": "iuref", "iu": "map2"}}], + "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigNumeric", 38, 4]]}], + "analyze": {"pipeline": 1, "column-count": 3, "cpu-cycles": 204, "memory-bytes": 18552, "running": false, "tuple-count": 27} + }], + "analyze": {"pipeline": 0, "column-count": 3, "cpu-cycles": 240, "memory-bytes": 262360, "running": false, "tuple-count": 27} + }], + "analyze": {"error": null, "pipeline": 0, "column-count": 0} } diff --git a/standalone-app/examples/hyper/window.plan.json b/standalone-app/examples/hyper/window.plan.json index e26f63f..65c3697 100644 --- a/standalone-app/examples/hyper/window.plan.json +++ b/standalone-app/examples/hyper/window.plan.json @@ -3,29 +3,31 @@ "operatorId": 1, "cardinality": 2000, "producesRows": true, - "output": [{"expression": "iuref", "iu": ["v", ["Integer"]]}, {"expression": "iuref", "iu": ["v2", ["BigInt", "nullable"]]}, {"expression": "iuref", "iu": ["v3", ["Numeric", 16, 6, "nullable"]]}], + "output": [{"expression": "iuref", "iu": ["scan_a1", ["Integer"]]}, {"expression": "iuref", "iu": ["sum", ["BigInt", "nullable"]]}, {"expression": "iuref", "iu": ["avg", ["Numeric", 16, 6, "nullable"]]}], "outputNames": ["a1", "sum", "avg"], - "input": { + "inputs": [{ "operator": "window", "operatorId": 2, "cardinality": 2000, - "input": { + "inputs": [{ "operator": "window", "operatorId": 3, "cardinality": 2000, - "input": { + "inputs": [{ "operator": "tablescan", "operatorId": 4, "sqlpos": [[142, 144]], "cardinality": 2000, + "volatility": "stable", "relationId": 0, "schema": {"type":"sessionschema"}, - "values": [{"name": "a1", "type": ["Integer"], "iu": ["v", ["Integer"]]}, {"name": "b1", "type": ["Integer"], "iu": ["v4", ["Integer"]]}, {"name": "c1", "type": ["Integer"], "iu": ["v5", ["Integer"]]}], + "attributeCount": 3, + "attributes": [{"colId": 0, "name": "a1", "type": ["Integer"], "iu": ["scan_a1", ["Integer"]]},{"colId": 1, "name": "b1", "type": ["Integer"], "iu": ["scan_b1", ["Integer"]]},{"colId": 2, "name": "c1", "type": ["Integer"], "iu": ["scan_c1", ["Integer"]]}], "debugName": {"classification": "nonsensitive", "value": "t1"}, "selectivity": 1 - }, - "windowInfos": [{"operation": "aggregate", "aggregation": {"emptyGroups": true, "aggExpressions": [{"value": {"expression": "iuref", "iu": "v4"}}], "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigInt", "nullable"]]}]}, "partitionBy": [], "frameOrderBy": [{"value": {"expression": "iuref", "iu": "v"}, "descending": false, "nullFirst": false}], "rowsmode": false, "startMode": "unbounded", "endMode": "currentrow", "exclude": "noothers"}] - }, - "windowInfos": [{"operation": "aggregate", "aggregation": {"emptyGroups": true, "aggExpressions": [{"value": {"expression": "iuref", "iu": "v5"}}], "aggregates": [{"source": 0, "operation": {"aggregate": "avg"}, "iu": ["v3", ["Numeric", 16, 6, "nullable"]]}]}, "partitionBy": [], "frameOrderBy": [{"value": {"expression": "iuref", "iu": "v4"}, "descending": false, "nullFirst": false}], "rowsmode": true, "startMode": "value", "startExp": {"expression": "const", "value": {"type": ["Integer"], "value": -1}}, "endMode": "value", "endExp": {"expression": "const", "value": {"type": ["Integer"], "value": 3}}, "exclude": "noothers"}] - } + }], + "windowInfos": [{"operation": "aggregate", "aggregation": {"emptyGroups": true, "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_b1"}}], "aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["sum", ["BigInt", "nullable"]]}]}, "partitionBy": [], "frameOrderBy": [{"value": {"expression": "iuref", "iu": "scan_a1"}, "descending": false, "nullFirst": false}], "rowsmode": false, "startMode": "unbounded", "endMode": "currentrow", "exclude": "noothers"}] + }], + "windowInfos": [{"operation": "aggregate", "aggregation": {"emptyGroups": true, "aggExpressions": [{"value": {"expression": "iuref", "iu": "scan_c1"}}], "aggregates": [{"source": 0, "operation": {"aggregate": "avg"}, "iu": ["avg", ["Numeric", 16, 6, "nullable"]]}]}, "partitionBy": [], "frameOrderBy": [{"value": {"expression": "iuref", "iu": "scan_b1"}, "descending": false, "nullFirst": false}], "rowsmode": true, "startMode": "value", "startExp": {"expression": "const", "value": {"type": ["Integer"], "value": -1}}, "endMode": "value", "endExp": {"expression": "const", "value": {"type": ["Integer"], "value": 3}}, "exclude": "noothers"}] + }] }