[
https://issues.apache.org/jira/browse/CALCITE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15359437#comment-15359437
]
Julian Hyde commented on CALCITE-872:
-------------------------------------
This is related to CALCITE-1227, because the cancel flag for the planner should
be of the same type as the cancel flag for execution.
I believe that the flag should either be an {{AtomicBoolean}} or a {{volatile
boolean}}. {{CancelFlag}} contains a regular {{boolean}}, so may not propagate
on some CPU architectures.
So, I propose to change {{RelOptPlanner.setCancelFlag(CancelFlag cancelFlag)}}
to {{{{RelOptPlanner.setCancelFlag(AtomicBoolean cancelFlag)}}.
[~amansinha100], [~dsbos], any comments from you, since you're involved in
DRILL-4355 and DRILL-2884?
> Add support for aborting the query optimization process
> -------------------------------------------------------
>
> Key: CALCITE-872
> URL: https://issues.apache.org/jira/browse/CALCITE-872
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.4.0-incubating
> Reporter: Aman Sinha
> Assignee: Julian Hyde
>
> We should have the facility to abort the query optimization process. There
> are several motivations for having this:
> 1. The optimizer's join planning may take too long (order of minutes) when
> working with larger number of tables.
> 2. Certain sequence of rule applications may cause a cycle.
> 3. Operations related to metadata could potentially introduce a dependency
> cycle.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)