Hi team,

Greetings from Apache Kyuubi(incubating) community. We’re integrating Flink as 
a SQL engine and aiming to make it production-ready. 

However, query/savepoint management is a crucial but missing part in Flink SQL, 
thus we reach out to discuss the SQL syntax with Flink community. 

We propose to introduce the following statements:

SHOW QUERIES: shows the running queries in the current session, which mainly 
returns query(namely Flink job) IDs and SQL statements.
TRIGGER SAVEPOINT <query_id>: triggers a savepoint for the specified query, 
which returns the stored path of the savepoint.
SHOW SAVEPOINTS <query_id>: shows the savepoints for the specified query, which 
returns the stored paths of the savepoints.
REMOVE SAVEPOINT <savepoint_path>: removes the specified savepoint.

WRT to keywords, `TRIGGER` and `SAVEPOINT` are already reserved keywords in 
Flink SQL[1], so the only new keyword is `QUERIES`.

If we reach a consensus on the syntax, we could either implement it in Kyuubi 
and contribute back to Flink, or directly implement it in Flink.

Looking forward for your feedback ;)

[1] 
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/overview/#reserved-keywords

Best,
Paul Lam

Reply via email to