ekuiper icon indicating copy to clipboard operation
ekuiper copied to clipboard

Will we support explain to show the query plan?

Open wfnuser opened this issue 2 years ago • 6 comments

What would you like to be added/modified: To support EXPLAIN in SQL.

Why is this needed: To show the query plan of SQL.

wfnuser avatar Aug 18 '22 14:08 wfnuser

There is a REST API to show the query plan in runtime https://ekuiper.org/docs/en/latest/operation/restapi/rules.html#get-the-topology-structure-of-a-rule

ngjaying avatar Aug 19 '22 06:08 ngjaying

As explain is supported in most DBMS, I think it worth to be supported in ekuiper too. Maybe I can help.

wfnuser avatar Aug 24 '22 15:08 wfnuser

As explain is supported in most DBMS, I think it worth to be supported in ekuiper too. Maybe I can help.

A thousand welcomes

ngjaying avatar Aug 25 '22 02:08 ngjaying

Starting investigate it. My first plan is to support some SQL to show the rule info as the REST API do. Does it help? My original idea is to support explain for SQL query. But it looks like more work need to be done. Since I'm not familliar with ekuiper, I guess I should start up with some easier cases.

However, my concern is that use SQL to show rules info is not in SQL standard. But I'm pretty sure it's a nice feature to support. If you agree, I will create a new issue to discuss the detail and update the progress. And let's keep this issue for future work about explain. @ngjaying @superrxan

wfnuser avatar Sep 19 '22 06:09 wfnuser

Sure. Currently, we add feature design doc at the LF Edge wiki https://wiki.lfedge.org/display/EKUIPER/Feature+Design+Proposals. You can also add your ideas there.

ngjaying avatar Sep 19 '22 06:09 ngjaying

Sure. Currently, we add feature design doc at the LF Edge wiki https://wiki.lfedge.org/display/EKUIPER/Feature+Design+Proposals. You can also add your ideas there.

So if I understand it correctly, the SQL standard won't be an issue to be concerned? My proposal will go something like allowing user to write SQL like describe rules where id = ${target_id} to get the rules topo. If it is reasonable I'll add it to the wiki as well as create a related issue.

wfnuser avatar Sep 19 '22 07:09 wfnuser

@Yisaer Hi. Are you guys considering support explain grammar in ekuiper now?

wfnuser avatar Apr 18 '23 08:04 wfnuser