Hi Everyone,

FLIP 528 discussed extending the EXPLAIN syntax to support EXECUTE
statements.
Implemented here: https://issues.apache.org/jira/browse/FLINK-38081

It looks like we didn't consider applying the same logic to the COMPILE
PLAN syntax.

Example
EXECUTE STATEMENT SET BEGIN INSERT INTO a ...; END         -- ✅ runs
COMPILE PLAN '/p' FOR EXECUTE STATEMENT SET BEGIN ...; END -- ❌ parse error

We explicitly do not support SELECT plans with COMPILE due to no state
properties. Which means that we need to have a different implementation for
COMPILE.

I would recommend:
New OptionalExecuteKeyword() rule. Parser swallows EXECUTE; AST is
unchanged.

This is what we have done internally to support SQL clients that may or may
not leverage EXECUTE to generate plans. I can open a PR if we are open to
this expansion.

Ryan van Huuksloot
Staff Engineer, Infrastructure | Streaming Platform
[image: Shopify]
<https://www.shopify.com/?utm_medium=salessignatures&utm_source=hs_email>

Reply via email to