blob: bed2d11ab5844ca539138bc9c4fdece59129cbea [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>TransformationRule (Apache Calcite API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.rel.rules, interface: TransformationRule">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li>Method</li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li>Method</li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.rel.rules</a></div>
<h1 title="Interface TransformationRule" class="title">Interface TransformationRule</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="SubstitutionRule.html" title="interface in org.apache.calcite.rel.rules">SubstitutionRule</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="AbstractJoinExtractFilterRule.html" title="class in org.apache.calcite.rel.rules">AbstractJoinExtractFilterRule</a></code>, <code><a href="AggregateCaseToFilterRule.html" title="class in org.apache.calcite.rel.rules">AggregateCaseToFilterRule</a></code>, <code><a href="AggregateExpandDistinctAggregatesRule.html" title="class in org.apache.calcite.rel.rules">AggregateExpandDistinctAggregatesRule</a></code>, <code><a href="AggregateExtractProjectRule.html" title="class in org.apache.calcite.rel.rules">AggregateExtractProjectRule</a></code>, <code><a href="AggregateFilterTransposeRule.html" title="class in org.apache.calcite.rel.rules">AggregateFilterTransposeRule</a></code>, <code><a href="AggregateJoinJoinRemoveRule.html" title="class in org.apache.calcite.rel.rules">AggregateJoinJoinRemoveRule</a></code>, <code><a href="AggregateJoinRemoveRule.html" title="class in org.apache.calcite.rel.rules">AggregateJoinRemoveRule</a></code>, <code><a href="AggregateJoinTransposeRule.html" title="class in org.apache.calcite.rel.rules">AggregateJoinTransposeRule</a></code>, <code><a href="AggregateMergeRule.html" title="class in org.apache.calcite.rel.rules">AggregateMergeRule</a></code>, <code><a href="AggregateProjectMergeRule.html" title="class in org.apache.calcite.rel.rules">AggregateProjectMergeRule</a></code>, <code><a href="AggregateProjectPullUpConstantsRule.html" title="class in org.apache.calcite.rel.rules">AggregateProjectPullUpConstantsRule</a></code>, <code><a href="AggregateProjectStarTableRule.html" title="class in org.apache.calcite.rel.rules">AggregateProjectStarTableRule</a></code>, <code><a href="AggregateReduceFunctionsRule.html" title="class in org.apache.calcite.rel.rules">AggregateReduceFunctionsRule</a></code>, <code><a href="AggregateRemoveRule.html" title="class in org.apache.calcite.rel.rules">AggregateRemoveRule</a></code>, <code><a href="AggregateStarTableRule.html" title="class in org.apache.calcite.rel.rules">AggregateStarTableRule</a></code>, <code><a href="AggregateUnionAggregateRule.html" title="class in org.apache.calcite.rel.rules">AggregateUnionAggregateRule</a></code>, <code><a href="AggregateUnionTransposeRule.html" title="class in org.apache.calcite.rel.rules">AggregateUnionTransposeRule</a></code>, <code><a href="AggregateValuesRule.html" title="class in org.apache.calcite.rel.rules">AggregateValuesRule</a></code>, <code><a href="CalcMergeRule.html" title="class in org.apache.calcite.rel.rules">CalcMergeRule</a></code>, <code><a href="CalcRemoveRule.html" title="class in org.apache.calcite.rel.rules">CalcRemoveRule</a></code>, <code><a href="CalcSplitRule.html" title="class in org.apache.calcite.rel.rules">CalcSplitRule</a></code>, <code><a href="CoerceInputsRule.html" title="class in org.apache.calcite.rel.rules">CoerceInputsRule</a></code>, <code><a href="DateRangeRules.FilterDateRangeRule.html" title="class in org.apache.calcite.rel.rules">DateRangeRules.FilterDateRangeRule</a></code>, <code><a href="../../adapter/enumerable/EnumerableProjectToCalcRule.html" title="class in org.apache.calcite.adapter.enumerable">EnumerableProjectToCalcRule</a></code>, <code><a href="ExchangeRemoveConstantKeysRule.html" title="class in org.apache.calcite.rel.rules">ExchangeRemoveConstantKeysRule</a></code>, <code><a href="FilterAggregateTransposeRule.html" title="class in org.apache.calcite.rel.rules">FilterAggregateTransposeRule</a></code>, <code><a href="FilterCalcMergeRule.html" title="class in org.apache.calcite.rel.rules">FilterCalcMergeRule</a></code>, <code><a href="FilterCorrelateRule.html" title="class in org.apache.calcite.rel.rules">FilterCorrelateRule</a></code>, <code><a href="FilterJoinRule.html" title="class in org.apache.calcite.rel.rules">FilterJoinRule</a></code>, <code><a href="FilterJoinRule.FilterIntoJoinRule.html" title="class in org.apache.calcite.rel.rules">FilterJoinRule.FilterIntoJoinRule</a></code>, <code><a href="FilterJoinRule.JoinConditionPushRule.html" title="class in org.apache.calcite.rel.rules">FilterJoinRule.JoinConditionPushRule</a></code>, <code><a href="FilterMergeRule.html" title="class in org.apache.calcite.rel.rules">FilterMergeRule</a></code>, <code><a href="FilterMultiJoinMergeRule.html" title="class in org.apache.calcite.rel.rules">FilterMultiJoinMergeRule</a></code>, <code><a href="FilterProjectTransposeRule.html" title="class in org.apache.calcite.rel.rules">FilterProjectTransposeRule</a></code>, <code><a href="FilterRemoveIsNotDistinctFromRule.html" title="class in org.apache.calcite.rel.rules">FilterRemoveIsNotDistinctFromRule</a></code>, <code><a href="FilterSetOpTransposeRule.html" title="class in org.apache.calcite.rel.rules">FilterSetOpTransposeRule</a></code>, <code><a href="FilterTableFunctionTransposeRule.html" title="class in org.apache.calcite.rel.rules">FilterTableFunctionTransposeRule</a></code>, <code><a href="FilterToCalcRule.html" title="class in org.apache.calcite.rel.rules">FilterToCalcRule</a></code>, <code><a href="IntersectToDistinctRule.html" title="class in org.apache.calcite.rel.rules">IntersectToDistinctRule</a></code>, <code><a href="JoinAddRedundantSemiJoinRule.html" title="class in org.apache.calcite.rel.rules">JoinAddRedundantSemiJoinRule</a></code>, <code><a href="JoinAssociateRule.html" title="class in org.apache.calcite.rel.rules">JoinAssociateRule</a></code>, <code><a href="JoinCommuteRule.html" title="class in org.apache.calcite.rel.rules">JoinCommuteRule</a></code>, <code><a href="JoinDeriveIsNotNullFilterRule.html" title="class in org.apache.calcite.rel.rules">JoinDeriveIsNotNullFilterRule</a></code>, <code><a href="JoinExtractFilterRule.html" title="class in org.apache.calcite.rel.rules">JoinExtractFilterRule</a></code>, <code><a href="JoinProjectTransposeRule.html" title="class in org.apache.calcite.rel.rules">JoinProjectTransposeRule</a></code>, <code><a href="JoinPushExpressionsRule.html" title="class in org.apache.calcite.rel.rules">JoinPushExpressionsRule</a></code>, <code><a href="JoinPushThroughJoinRule.html" title="class in org.apache.calcite.rel.rules">JoinPushThroughJoinRule</a></code>, <code><a href="JoinPushTransitivePredicatesRule.html" title="class in org.apache.calcite.rel.rules">JoinPushTransitivePredicatesRule</a></code>, <code><a href="JoinToCorrelateRule.html" title="class in org.apache.calcite.rel.rules">JoinToCorrelateRule</a></code>, <code><a href="JoinToMultiJoinRule.html" title="class in org.apache.calcite.rel.rules">JoinToMultiJoinRule</a></code>, <code><a href="JoinUnionTransposeRule.html" title="class in org.apache.calcite.rel.rules">JoinUnionTransposeRule</a></code>, <code><a href="LoptOptimizeJoinRule.html" title="class in org.apache.calcite.rel.rules">LoptOptimizeJoinRule</a></code>, <code><a href="MatchRule.html" title="class in org.apache.calcite.rel.rules">MatchRule</a></code>, <code><a href="MaterializedViewFilterScanRule.html" title="class in org.apache.calcite.rel.rules">MaterializedViewFilterScanRule</a></code>, <code><a href="MultiJoinOptimizeBushyRule.html" title="class in org.apache.calcite.rel.rules">MultiJoinOptimizeBushyRule</a></code>, <code><a href="MultiJoinProjectTransposeRule.html" title="class in org.apache.calcite.rel.rules">MultiJoinProjectTransposeRule</a></code>, <code><a href="ProjectAggregateMergeRule.html" title="class in org.apache.calcite.rel.rules">ProjectAggregateMergeRule</a></code>, <code><a href="ProjectCalcMergeRule.html" title="class in org.apache.calcite.rel.rules">ProjectCalcMergeRule</a></code>, <code><a href="ProjectCorrelateTransposeRule.html" title="class in org.apache.calcite.rel.rules">ProjectCorrelateTransposeRule</a></code>, <code><a href="ProjectFilterTransposeRule.html" title="class in org.apache.calcite.rel.rules">ProjectFilterTransposeRule</a></code>, <code><a href="ProjectJoinJoinRemoveRule.html" title="class in org.apache.calcite.rel.rules">ProjectJoinJoinRemoveRule</a></code>, <code><a href="ProjectJoinRemoveRule.html" title="class in org.apache.calcite.rel.rules">ProjectJoinRemoveRule</a></code>, <code><a href="ProjectJoinTransposeRule.html" title="class in org.apache.calcite.rel.rules">ProjectJoinTransposeRule</a></code>, <code><a href="ProjectMergeRule.html" title="class in org.apache.calcite.rel.rules">ProjectMergeRule</a></code>, <code><a href="ProjectMultiJoinMergeRule.html" title="class in org.apache.calcite.rel.rules">ProjectMultiJoinMergeRule</a></code>, <code><a href="ProjectRemoveRule.html" title="class in org.apache.calcite.rel.rules">ProjectRemoveRule</a></code>, <code><a href="ProjectSetOpTransposeRule.html" title="class in org.apache.calcite.rel.rules">ProjectSetOpTransposeRule</a></code>, <code><a href="ProjectToCalcRule.html" title="class in org.apache.calcite.rel.rules">ProjectToCalcRule</a></code>, <code><a href="ProjectToWindowRule.html" title="class in org.apache.calcite.rel.rules">ProjectToWindowRule</a></code>, <code><a href="ProjectToWindowRule.CalcToWindowRule.html" title="class in org.apache.calcite.rel.rules">ProjectToWindowRule.CalcToWindowRule</a></code>, <code><a href="ProjectToWindowRule.ProjectToLogicalProjectAndWindowRule.html" title="class in org.apache.calcite.rel.rules">ProjectToWindowRule.ProjectToLogicalProjectAndWindowRule</a></code>, <code><a href="ProjectWindowTransposeRule.html" title="class in org.apache.calcite.rel.rules">ProjectWindowTransposeRule</a></code>, <code><a href="PruneEmptyRules.PruneEmptyRule.html" title="class in org.apache.calcite.rel.rules">PruneEmptyRules.PruneEmptyRule</a></code>, <code><a href="PruneEmptyRules.RemoveEmptySingleRule.html" title="class in org.apache.calcite.rel.rules">PruneEmptyRules.RemoveEmptySingleRule</a></code>, <code><a href="ReduceDecimalsRule.html" title="class in org.apache.calcite.rel.rules">ReduceDecimalsRule</a></code>, <code><a href="ReduceExpressionsRule.html" title="class in org.apache.calcite.rel.rules">ReduceExpressionsRule</a></code>, <code><a href="ReduceExpressionsRule.CalcReduceExpressionsRule.html" title="class in org.apache.calcite.rel.rules">ReduceExpressionsRule.CalcReduceExpressionsRule</a></code>, <code><a href="ReduceExpressionsRule.FilterReduceExpressionsRule.html" title="class in org.apache.calcite.rel.rules">ReduceExpressionsRule.FilterReduceExpressionsRule</a></code>, <code><a href="ReduceExpressionsRule.JoinReduceExpressionsRule.html" title="class in org.apache.calcite.rel.rules">ReduceExpressionsRule.JoinReduceExpressionsRule</a></code>, <code><a href="ReduceExpressionsRule.ProjectReduceExpressionsRule.html" title="class in org.apache.calcite.rel.rules">ReduceExpressionsRule.ProjectReduceExpressionsRule</a></code>, <code><a href="ReduceExpressionsRule.WindowReduceExpressionsRule.html" title="class in org.apache.calcite.rel.rules">ReduceExpressionsRule.WindowReduceExpressionsRule</a></code>, <code><a href="SemiJoinFilterTransposeRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinFilterTransposeRule</a></code>, <code><a href="SemiJoinJoinTransposeRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinJoinTransposeRule</a></code>, <code><a href="SemiJoinProjectTransposeRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinProjectTransposeRule</a></code>, <code><a href="SemiJoinRemoveRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinRemoveRule</a></code>, <code><a href="SemiJoinRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinRule</a></code>, <code><a href="SemiJoinRule.JoinOnUniqueToSemiJoinRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinRule.JoinOnUniqueToSemiJoinRule</a></code>, <code><a href="SemiJoinRule.JoinToSemiJoinRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinRule.JoinToSemiJoinRule</a></code>, <code><a href="SemiJoinRule.ProjectToSemiJoinRule.html" title="class in org.apache.calcite.rel.rules">SemiJoinRule.ProjectToSemiJoinRule</a></code>, <code><a href="SortJoinCopyRule.html" title="class in org.apache.calcite.rel.rules">SortJoinCopyRule</a></code>, <code><a href="SortJoinTransposeRule.html" title="class in org.apache.calcite.rel.rules">SortJoinTransposeRule</a></code>, <code><a href="SortProjectTransposeRule.html" title="class in org.apache.calcite.rel.rules">SortProjectTransposeRule</a></code>, <code><a href="SortRemoveConstantKeysRule.html" title="class in org.apache.calcite.rel.rules">SortRemoveConstantKeysRule</a></code>, <code><a href="SortRemoveRule.html" title="class in org.apache.calcite.rel.rules">SortRemoveRule</a></code>, <code><a href="SortUnionTransposeRule.html" title="class in org.apache.calcite.rel.rules">SortUnionTransposeRule</a></code>, <code><a href="../stream/StreamRules.DeltaAggregateTransposeRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaAggregateTransposeRule</a></code>, <code><a href="../stream/StreamRules.DeltaFilterTransposeRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaFilterTransposeRule</a></code>, <code><a href="../stream/StreamRules.DeltaJoinTransposeRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaJoinTransposeRule</a></code>, <code><a href="../stream/StreamRules.DeltaProjectTransposeRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaProjectTransposeRule</a></code>, <code><a href="../stream/StreamRules.DeltaSortTransposeRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaSortTransposeRule</a></code>, <code><a href="../stream/StreamRules.DeltaTableScanRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaTableScanRule</a></code>, <code><a href="../stream/StreamRules.DeltaTableScanToEmptyRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaTableScanToEmptyRule</a></code>, <code><a href="../stream/StreamRules.DeltaUnionTransposeRule.html" title="class in org.apache.calcite.rel.stream">StreamRules.DeltaUnionTransposeRule</a></code>, <code><a href="SubQueryRemoveRule.html" title="class in org.apache.calcite.rel.rules">SubQueryRemoveRule</a></code>, <code><a href="TableScanRule.html" title="class in org.apache.calcite.rel.rules">TableScanRule</a></code>, <code><a href="UnionEliminatorRule.html" title="class in org.apache.calcite.rel.rules">UnionEliminatorRule</a></code>, <code><a href="UnionMergeRule.html" title="class in org.apache.calcite.rel.rules">UnionMergeRule</a></code>, <code><a href="UnionPullUpConstantsRule.html" title="class in org.apache.calcite.rel.rules">UnionPullUpConstantsRule</a></code>, <code><a href="UnionToDistinctRule.html" title="class in org.apache.calcite.rel.rules">UnionToDistinctRule</a></code>, <code><a href="ValuesReduceRule.html" title="class in org.apache.calcite.rel.rules">ValuesReduceRule</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">TransformationRule</span></div>
<div class="block">Logical transformation rule, only logical operator can be rule operand,
and only generate logical alternatives. It is only visible to
<a href="../../plan/volcano/VolcanoPlanner.html" title="class in org.apache.calcite.plan.volcano"><code>VolcanoPlanner</code></a>, <a href="../../plan/hep/HepPlanner.html" title="class in org.apache.calcite.plan.hep"><code>HepPlanner</code></a> will ignore this interface.
That means, in <a href="../../plan/hep/HepPlanner.html" title="class in org.apache.calcite.plan.hep"><code>HepPlanner</code></a>, the rule that implements
<a href="TransformationRule.html" title="interface in org.apache.calcite.rel.rules"><code>TransformationRule</code></a> can still match with physical operator of
<a href="../PhysicalNode.html" title="interface in org.apache.calcite.rel"><code>PhysicalNode</code></a> and generate physical alternatives.
<p>But in <a href="../../plan/volcano/VolcanoPlanner.html" title="class in org.apache.calcite.plan.volcano"><code>VolcanoPlanner</code></a>, <a href="TransformationRule.html" title="interface in org.apache.calcite.rel.rules"><code>TransformationRule</code></a> doesn't match
with physical operator that implements <a href="../PhysicalNode.html" title="interface in org.apache.calcite.rel"><code>PhysicalNode</code></a>. It is not
allowed to generate physical operators in <a href="TransformationRule.html" title="interface in org.apache.calcite.rel.rules"><code>TransformationRule</code></a>,
unless you are using it in <a href="../../plan/hep/HepPlanner.html" title="class in org.apache.calcite.plan.hep"><code>HepPlanner</code></a>.</p></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../plan/volcano/VolcanoPlanner.html" title="class in org.apache.calcite.plan.volcano"><code>VolcanoPlanner</code></a></li>
<li><a href="SubstitutionRule.html" title="interface in org.apache.calcite.rel.rules"><code>SubstitutionRule</code></a></li>
</ul>
</dd>
</dl>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>