Make sense and quite reasonable. - Haisheng
------------------------------------------------------------------ 发件人:Stamatis Zampetakis<zabe...@gmail.com> 日 期:2019年10月08日 18:04:17 收件人:<dev@calcite.apache.org> 主 题:[DISCUSS] Make Enumerable operators responsive to interrupts Hello, There are many use-cases which require stopping/cancelling the execution of a query for various reasons. Currently, this can be done by launching the query in a separate thread and then setting DataContext.Variable.CANCEL_FLAG [1] accordingly. However if the tread executing the query gets interrupted through the usual Thread.interrupt() mechanism the query execution will not stop since the operators are not responsive to interruption. How do you feel about making Enumerable operators responsive to interrupts? Best, Stamatis [1] https://github.com/apache/calcite/blob/3f54108b7dcd4d2b89fc42faab145e2f82883791/core/src/main/java/org/apache/calcite/DataContext.java#L87