Skip to content

Commit

Permalink
Add non partition column filters to EXPLAIN (TYPE IO) (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Taylor authored Feb 6, 2020
1 parent 5b8ae8e commit 3fda4bc
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 29 deletions.
48 changes: 32 additions & 16 deletions presto-docs/src/main/sphinx/sql/explain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ IO:
.. code-block:: none
presto:hive> EXPLAIN (TYPE IO, FORMAT JSON) INSERT INTO test_nation SELECT * FROM nation WHERE regionkey = 2;
presto:hive> EXPLAIN (TYPE IO, FORMAT JSON) INSERT INTO test_lineitem SELECT * FROM lineitem WHERE shipdate = '2020-02-01' AND quantity > 10;
Query Plan
-----------------------------------
{
Expand All @@ -120,47 +120,63 @@ IO:
"catalog" : "hive",
"schemaTable" : {
"schema" : "tpch",
"table" : "nation"
"table" : "lineitem"
}
},
"columns" : [ {
"columnName" : "regionkey",
"type" : "bigint",
"columnConstraints" : [ {
"columnName" : "shipdate",
"type" : "varchar(10)",
"domain" : {
"nullsAllowed" : false,
"ranges" : [ {
"low" : {
"value" : "2",
"value" : "2020-02-01",
"bound" : "EXACTLY"
},
"high" : {
"value" : "2",
"value" : "2020-02-01",
"bound" : "EXACTLY"
}
} ]
}
} ],
"columnFilters" : [ {
"columnName" : "quantity",
"type" : "double",
"domain" : {
"nullsAllowed" : false,
"ranges" : [ {
"low" : {
"value" : "10.0",
"bound" : "ABOVE"
},
"high" : {
"bound" : "BELOW"
}
} ]
}
} ],
"estimate" : {
"outputRowCount" : 15000.0,
"outputSizeInBytes" : 1597294.0,
"cpuCost" : 1597294.0,
"outputRowCount" : 60175.0,
"outputSizeInBytes" : 8077041.0,
"cpuCost" : 8077041.0,
"maxMemory" : 0.0,
"networkCost" : 0.0
},
}
} ],
"outputTable" : {
"catalog" : "hive",
"schemaTable" : {
"schema" : "tpch",
"table" : "test_nation"
"table" : "test_lineitem"
}
},
"estimate" : {
"outputRowCount" : 15000.0,
"outputSizeInBytes" : 1597294.0,
"cpuCost" : 1597294.0,
"outputRowCount" : 49122.45
"outputSizeInBytes" : 6593502.86
"cpuCost" : 16154082.0,
"maxMemory" : 0.0,
"networkCost" : 1597294.0
"networkCost" : 6593502.86
}
}
Expand Down
Loading

0 comments on commit 3fda4bc

Please sign in to comment.