[ 
https://issues.apache.org/jira/browse/STORM-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436500#comment-15436500
 ] 

Jungtaek Lim commented on STORM-1444:
-------------------------------------

Since we construct TridentTopology to submit to Nimbus, for now we can print 
the internal graph of TridentTopology to show physical plan for that.
(Currently printing graph is really verbose and not showing which operation is 
in node. It should be addressed first.)

Btw, it might be changed to show Storm physical algebra once STORM-1446 will be 
resolved.

Explain of Spark SQL for example,

```
scala> spark.sql("SELECT GRPID, COUNT(*) AS CNT, MAX(AGE) AS MAX_AGE, MIN(AGE) 
AS MIN_AGE, AVG(AGE) AS AVG_AGE, MAX(AGE) - MIN(AGE) AS DIFF FROM FOO WHERE ID 
> 2 GROUP BY GRPID").explain
== Physical Plan ==
*HashAggregate(keys=[GRPID#64], functions=[count(1), max(AGE#67), min(AGE#67), 
avg(cast(AGE#67 as bigint)), max(AGE#67), min(AGE#67)])
+- Exchange hashpartitioning(GRPID#64, 200)
   +- *HashAggregate(keys=[GRPID#64], functions=[partial_count(1), 
partial_max(AGE#67), partial_min(AGE#67), partial_avg(cast(AGE#67 as bigint)), 
partial_max(AGE#67), partial_min(AGE#67)])
      +- *Project [grpid#64, age#67]
         +- *Filter (isnotnull(ID#63) && (ID#63 > 2))
            +- LocalTableScan [id#63, grpid#64, name#65, addr#66, age#67]
```

It shows only SQL related operations. We also need to do that.

> Support EXPLAIN statement in StormSQL
> -------------------------------------
>
>                 Key: STORM-1444
>                 URL: https://issues.apache.org/jira/browse/STORM-1444
>             Project: Apache Storm
>          Issue Type: New Feature
>          Components: storm-sql
>            Reporter: Haohui Mai
>
> It is useful to support the `EXPLAIN` statement in StormSQL to allow 
> debugging and customizing the topology generated by StormSQL.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to