You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jiatao Tao (Jira)" <ji...@apache.org> on 2020/07/08 12:19:00 UTC
[jira] [Comment Edited] (CALCITE-4112) Better judgment
"config.forceDecorrelate" in DecorrelateProgram
[ https://issues.apache.org/jira/browse/CALCITE-4112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17153547#comment-17153547 ]
Jiatao Tao edited comment on CALCITE-4112 at 7/8/20, 12:18 PM:
---------------------------------------------------------------
Hi [~julianhyde]
Here's the background, we new VolcanoPlanner by ourselves, and context must have "CalciteConnectionConfigImpl", even an empty one, or DecorrelateProgram will not work cuz config = null.
{code:java}
if (config != null && config.forceDecorrelate())
{code}
In fact, "config.forceDecorrelate"'s default value is true, so when the config is null, it still stands true, so maybe the condition below is better:
{code:java}
if (config == null || config.forceDecorrelate())
{code}
or
{code:java}
if (config != null && !config.forceDecorrelate()) {
return rel;
} else {
final RelBuilder relBuilder =
RelFactories.LOGICAL_BUILDER.create(rel.getCluster(), null);
return RelDecorrelator.decorrelateQuery(rel, relBuilder);
}
{code}
Default true means what we want is we can turn off this feature
was (Author: aron.tao):
Hi [~julianhyde]
Here's the background, we new VolcanoPlanner by ourselves, and context must have "CalciteConnectionConfigImpl", even an empty one, or DecorrelateProgram will not work cuz config = null.
{code:java}
if (config != null && config.forceDecorrelate())
{code}
In fact, "config.forceDecorrelate"'s default value is true, so when the config is null, it still stands true, so maybe the condition below is better:
{code:java}
if (config == null || config.forceDecorrelate())
{code}
> Better judgment "config.forceDecorrelate" in DecorrelateProgram
> ---------------------------------------------------------------
>
> Key: CALCITE-4112
> URL: https://issues.apache.org/jira/browse/CALCITE-4112
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Jiatao Tao
> Assignee: Jiatao Tao
> Priority: Minor
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)