Interface ResolutionStrategy
- All Known Implementing Classes:
AdaptiveResolutionStrategy,StandardResolutionStrategy
public interface ResolutionStrategy
Strategy for iterative resolution.
Different strategies can be used for different types of SQL: - Standard strategy: Normal forward resolution - Bottom-up strategy: Resolve innermost subqueries first - Top-down strategy: Resolve outer queries first, push down requirements - Adaptive strategy: Dynamically choose based on query structure
Each strategy defines: - How to order resolution (which tables/CTEs first) - When to perform inference - When to expand star columns - When to push down column requirements
-
Method Summary
Modifier and TypeMethodDescriptionGet a description of this strategy.getName()Get the name of this strategy.voidpreparePass(int passNumber, ResolutionStatistics previousStats) Prepare for a new pass.booleanshouldExpandStars(int passNumber, ResolutionStatistics previousStats) Determine if this strategy should expand star columns in the current pass.booleanshouldPerformInference(int passNumber, ResolutionStatistics previousStats) Determine if this strategy should perform inference in the current pass.booleanshouldPushDownColumns(int passNumber, ResolutionStatistics previousStats) Determine if this strategy should push down column requirements in the current pass.
-
Method Details
-
getName
Get the name of this strategy.- Returns:
- strategy name
-
shouldPerformInference
Determine if this strategy should perform inference in the current pass.- Parameters:
passNumber- the current pass numberpreviousStats- statistics from previous pass (null for first pass)- Returns:
- true if inference should be performed
-
shouldExpandStars
Determine if this strategy should expand star columns in the current pass.- Parameters:
passNumber- the current pass numberpreviousStats- statistics from previous pass (null for first pass)- Returns:
- true if star expansion should be performed
-
shouldPushDownColumns
Determine if this strategy should push down column requirements in the current pass.- Parameters:
passNumber- the current pass numberpreviousStats- statistics from previous pass (null for first pass)- Returns:
- true if push-down should be performed
-
preparePass
Prepare for a new pass. Strategy can adjust its behavior based on previous results.- Parameters:
passNumber- the upcoming pass numberpreviousStats- statistics from previous pass (null for first pass)
-
getDescription
Get a description of this strategy.- Returns:
- strategy description
-