-
Notifications
You must be signed in to change notification settings - Fork 190
[FEATURE] Per-request timeouts #4886
Description
Is your feature request related to a problem?
#4857 introduces a global timeout setting for all Calcite PPL queries. This helps address the major concern from #4842 on overwhelming a cluster with hour-long query times in some types of slow loops. But the global setting isn't generally applicable to every query: some specific queries may want to go longer, others may want to go shorter.
What solution would you like?
In addition to the global timeout setting from #4857, also support a per-request timeout.
$ curl -XPOST ... --data '{
"query": "...",
"timeout": 60
}'
This would set a timeout of 60 seconds, regardless of the global cluster setting.
A zero or negative timeout would mean no timeout.
What alternatives have you considered?
Just stick with the global timeout option. Works well enough for managed clusters, but is an issue with Serverless.
Do you have any additional context?
N/A