You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Aman Sinha (JIRA)" <ji...@apache.org> on 2014/11/10 23:14:35 UTC
[jira] [Created] (DRILL-1677) Table aliases are not shown in the
Scan node of Explain plan
Aman Sinha created DRILL-1677:
---------------------------------
Summary: Table aliases are not shown in the Scan node of Explain plan
Key: DRILL-1677
URL: https://issues.apache.org/jira/browse/DRILL-1677
Project: Apache Drill
Issue Type: Bug
Components: Query Planning & Optimization
Affects Versions: 0.6.0
Reporter: Aman Sinha
Table aliases don't show up in the Scan node of Explain plan - either the Text plan or the JSON version. We certainly need this for analyzing plans.
{code: sql}
0: jdbc:drill:zk=local> explain plan for select count(*) from cp.`tpch/nation.parquet` n1, cp.`tpch/nation.parquet` n2, cp.`tpch/nation.parquet` n3 where n1.n_nationkey = n2.n_nationkey and n2.n_regionkey = n3.n_regionkey;
+------------+------------+
| text | json |
+------------+------------+
| 00-00 Screen
00-01 StreamAgg(group=[{}], EXPR$0=[COUNT()])
00-02 Project($f0=[0])
00-03 HashJoin(condition=[=($0, $1)], joinType=[inner])
00-05 Project(n_regionkey0=[$2])
00-06 HashJoin(condition=[=($0, $1)], joinType=[inner])
00-08 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpch/nation.parquet]], selectionRoot=/tpch/nation.parquet, numFiles=1, columns=[SchemaPath [`n_nationkey`]]]])
00-07 Project(n_nationkey0=[$0], n_regionkey=[$1])
00-09 Project(n_nationkey=[$1], n_regionkey=[$0])
00-10 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpch/nation.parquet]], selectionRoot=/tpch/nation.parquet, numFiles=1, columns=[SchemaPath [`n_nationkey`], SchemaPath [`n_regionkey`]]]])
00-04 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpch/nation.parquet]], selectionRoot=/tpch/nation.parquet, numFiles=1, columns=[SchemaPath [`n_regionkey`]]]])
| {
"head" : {
"version" : 1,
"generator" : {
"type" : "ExplainHandler",
"info" : ""
},
"type" : "APACHE_DRILL_PHYSICAL",
"options" : [ ],
"queue" : 0,
"resultMode" : "EXEC"
},
"graph" : [ {
"pop" : "parquet-scan",
"@id" : 4,
"entries" : [ {
"path" : "/tpch/nation.parquet"
} ],
"storage" : {
"type" : "file",
"enabled" : true,
"connection" : "classpath:///",
"workspaces" : null,
"formats" : {
"csv" : {
"type" : "text",
"extensions" : [ "csv" ],
"delimiter" : ","
},
"json" : {
"type" : "json"
},
"parquet" : {
"type" : "parquet"
}
}
},
"format" : {
"type" : "parquet"
},
"columns" : [ "`n_regionkey`" ],
"selectionRoot" : "/tpch/nation.parquet",
"cost" : 25.0
}, {
"pop" : "parquet-scan",
"@id" : 8,
"entries" : [ {
"path" : "/tpch/nation.parquet"
} ],
"storage" : {
"type" : "file",
"enabled" : true,
"connection" : "classpath:///",
"workspaces" : null,
"formats" : {
"csv" : {
"type" : "text",
"extensions" : [ "csv" ],
"delimiter" : ","
},
"json" : {
"type" : "json"
},
"parquet" : {
"type" : "parquet"
}
}
},
"format" : {
"type" : "parquet"
},
"columns" : [ "`n_nationkey`" ],
"selectionRoot" : "/tpch/nation.parquet",
"cost" : 25.0
}, {
"pop" : "parquet-scan",
"@id" : 10,
"entries" : [ {
"path" : "/tpch/nation.parquet"
} ],
"storage" : {
"type" : "file",
"enabled" : true,
"connection" : "classpath:///",
"workspaces" : null,
"formats" : {
"csv" : {
"type" : "text",
"extensions" : [ "csv" ],
"delimiter" : ","
},
"json" : {
"type" : "json"
},
"parquet" : {
"type" : "parquet"
}
}
},
"format" : {
"type" : "parquet"
},
"columns" : [ "`n_nationkey`", "`n_regionkey`" ],
"selectionRoot" : "/tpch/nation.parquet",
"cost" : 25.0
}, {
"pop" : "project",
"@id" : 9,
"exprs" : [ {
"ref" : "`n_nationkey`",
"expr" : "`n_nationkey`"
}, {
"ref" : "`n_regionkey`",
"expr" : "`n_regionkey`"
} ],
"child" : 10,
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 25.0
}, {
"pop" : "project",
"@id" : 7,
"exprs" : [ {
"ref" : "`n_nationkey0`",
"expr" : "`n_nationkey`"
}, {
"ref" : "`n_regionkey`",
"expr" : "`n_regionkey`"
} ],
"child" : 9,
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 25.0
}, {
"pop" : "hash-join",
"@id" : 6,
"left" : 8,
"right" : 7,
"conditions" : [ {
"relationship" : "==",
"left" : "`n_nationkey`",
"right" : "`n_nationkey0`"
} ],
"joinType" : "INNER",
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 25.0
}, {
"pop" : "project",
"@id" : 5,
"exprs" : [ {
"ref" : "`n_regionkey0`",
"expr" : "`n_regionkey`"
} ],
"child" : 6,
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 25.0
}, {
"pop" : "hash-join",
"@id" : 3,
"left" : 5,
"right" : 4,
"conditions" : [ {
"relationship" : "==",
"left" : "`n_regionkey0`",
"right" : "`n_regionkey`"
} ],
"joinType" : "INNER",
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 25.0
}, {
"pop" : "project",
"@id" : 2,
"exprs" : [ {
"ref" : "`$f0`",
"expr" : "0"
} ],
"child" : 3,
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 25.0
}, {
"pop" : "streaming-aggregate",
"@id" : 1,
"child" : 2,
"keys" : [ ],
"exprs" : [ {
"ref" : "`EXPR$0`",
"expr" : "count(1) "
} ],
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 1.0
}, {
"pop" : "screen",
"@id" : 0,
"child" : 1,
"initialAllocation" : 1000000,
"maxAllocation" : 10000000000,
"cost" : 2.5
} ]
} |
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)