Package org.apache.calcite.tools
Class Programs
- java.lang.Object
-
- org.apache.calcite.tools.Programs
-
public class Programs extends java.lang.Object
Utilities for creatingProgram
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Programs.DecorrelateProgram
Program that de-correlates a query.(package private) static class
Programs.RuleSetProgram
Program backed by aRuleSet
.private static class
Programs.SequenceProgram
Program that runs sub-programs, sending the output of the previous as input to the next.private static class
Programs.TrimFieldsProgram
Program that trims fields.
-
Field Summary
Fields Modifier and Type Field Description static Program
CALC_PROGRAM
Program that converts filters and projects toCalc
s.static com.google.common.collect.ImmutableList<RelOptRule>
CALC_RULES
static com.google.common.collect.ImmutableSet<RelOptRule>
RULE_SET
static Program
SUB_QUERY_PROGRAM
Program that expands sub-queries.
-
Constructor Summary
Constructors Modifier Constructor Description private
Programs()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Program
calc(RelMetadataProvider metadataProvider)
static Program
getProgram()
static Program
hep(java.lang.Iterable<? extends RelOptRule> rules, boolean noDag, RelMetadataProvider metadataProvider)
Creates a program that executes a list of rules in a HEP planner.static Program
heuristicJoinOrder(java.lang.Iterable<? extends RelOptRule> rules, boolean bushy, int minJoinCount)
Creates a program that invokes heuristic join-order optimization (viaJoinToMultiJoinRule
,MultiJoin
andLoptOptimizeJoinRule
) if there are 6 or more joins (7 or more relations).static java.util.List<Program>
listOf(java.util.List<RuleSet> ruleSets)
Creates a list of programs based on a list of rule sets.static java.util.List<Program>
listOf(RuleSet... ruleSets)
Creates a list of programs based on an array of rule sets.static Program
of(HepProgram hepProgram, boolean noDag, RelMetadataProvider metadataProvider)
Creates a program that executes aHepProgram
.static Program
of(RuleSet ruleSet)
Creates a program that executes a rule set.static Program
ofRules(java.lang.Iterable<? extends RelOptRule> rules)
Creates a program from a list of rules.static Program
ofRules(RelOptRule... rules)
Creates a program from a list of rules.static Program
sequence(Program... programs)
Creates a program that executes a sequence of programs.static Program
standard()
Returns the standard program used by Prepare.static Program
standard(RelMetadataProvider metadataProvider)
Returns the standard program with user metadata provider.static Program
subquery(RelMetadataProvider metadataProvider)
Deprecated.static Program
subQuery(RelMetadataProvider metadataProvider)
-
-
-
Field Detail
-
CALC_RULES
public static final com.google.common.collect.ImmutableList<RelOptRule> CALC_RULES
-
CALC_PROGRAM
public static final Program CALC_PROGRAM
Program that converts filters and projects toCalc
s.
-
SUB_QUERY_PROGRAM
public static final Program SUB_QUERY_PROGRAM
Program that expands sub-queries.
-
RULE_SET
public static final com.google.common.collect.ImmutableSet<RelOptRule> RULE_SET
-
-
Method Detail
-
listOf
public static java.util.List<Program> listOf(RuleSet... ruleSets)
Creates a list of programs based on an array of rule sets.
-
listOf
public static java.util.List<Program> listOf(java.util.List<RuleSet> ruleSets)
Creates a list of programs based on a list of rule sets.
-
ofRules
public static Program ofRules(RelOptRule... rules)
Creates a program from a list of rules.
-
ofRules
public static Program ofRules(java.lang.Iterable<? extends RelOptRule> rules)
Creates a program from a list of rules.
-
sequence
public static Program sequence(Program... programs)
Creates a program that executes a sequence of programs.
-
hep
public static Program hep(java.lang.Iterable<? extends RelOptRule> rules, boolean noDag, RelMetadataProvider metadataProvider)
Creates a program that executes a list of rules in a HEP planner.
-
of
public static Program of(HepProgram hepProgram, boolean noDag, RelMetadataProvider metadataProvider)
Creates a program that executes aHepProgram
.
-
heuristicJoinOrder
public static Program heuristicJoinOrder(java.lang.Iterable<? extends RelOptRule> rules, boolean bushy, int minJoinCount)
Creates a program that invokes heuristic join-order optimization (viaJoinToMultiJoinRule
,MultiJoin
andLoptOptimizeJoinRule
) if there are 6 or more joins (7 or more relations).
-
calc
public static Program calc(RelMetadataProvider metadataProvider)
-
subquery
@Deprecated public static Program subquery(RelMetadataProvider metadataProvider)
Deprecated.
-
subQuery
public static Program subQuery(RelMetadataProvider metadataProvider)
-
getProgram
public static Program getProgram()
-
standard
public static Program standard()
Returns the standard program used by Prepare.
-
standard
public static Program standard(RelMetadataProvider metadataProvider)
Returns the standard program with user metadata provider.
-
-