You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tajo.apache.org by "DaeMyung Kang (JIRA)" <ji...@apache.org> on 2014/01/11 17:17:53 UTC
[jira] [Updated] (TAJO-122) Add EXPLAIN clause to show a logical
plan
[ https://issues.apache.org/jira/browse/TAJO-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
DaeMyung Kang updated TAJO-122:
-------------------------------
Attachment: TAJO-122.patch
Explain works like this.
{noformat}
//valid query
tajo> explain select * from table1;
-----------------------------
Query Block Graph
-----------------------------
|-@ROOT
-----------------------------
Optimization Log:
-----------------------------
Scan on table1
=> target list: table1.id (INT4(0)), table1.name (TEXT(0)), table1.score (FLOAT4(0)), table1.type (TEXT(0))
=> out schema: {table1.id (INT4(0)),table1.name (TEXT(0)),table1.score (FLOAT4(0)),table1.type (TEXT(0))}
=> in schema: {table1.id (INT4(0)),table1.name (TEXT(0)),table1.score (FLOAT4(0)),table1.type (TEXT(0))}
//invalid query because of not existed table
tajo> explain select * from tbl;
Failed after attempts=3, exceptions:
org.apache.tajo.catalog.exception.NoSuchTableException: ERROR: relation "tbl" does not exist
org.apache.tajo.catalog.exception.NoSuchTableException: ERROR: relation "tbl" does not exist
org.apache.tajo.catalog.exception.NoSuchTableException: ERROR: relation "tbl" does not exist
//valid but doesn't have logical plan.
tajo> explain select pi();
-----------------------------
Query Block Graph
-----------------------------
|-@ROOT
-----------------------------
Optimization Log:
-----------------------------
{noformat}
> Add EXPLAIN clause to show a logical plan
> -----------------------------------------
>
> Key: TAJO-122
> URL: https://issues.apache.org/jira/browse/TAJO-122
> Project: Tajo
> Issue Type: New Feature
> Components: planner/optimizer
> Reporter: Hyunsik Choi
> Assignee: DaeMyung Kang
> Fix For: 0.8-incubating
>
> Attachments: TAJO-122.patch
>
>
> (I've changed this issue from implementing an utility class to preint JSON to implementing EXPLAIN clause support.)
> For convenience for debugging and developing new engine (TAJO-104), we need EXPLAIN clause to print plans used in Tajo internal. In this issue, we only focus on showing a logical plan.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)