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 Details

    • getName

      Get the name of this strategy.
      Returns:
      strategy name
    • shouldPerformInference

      boolean shouldPerformInference(int passNumber, ResolutionStatistics previousStats)
      Determine if this strategy should perform inference in the current pass.
      Parameters:
      passNumber - the current pass number
      previousStats - statistics from previous pass (null for first pass)
      Returns:
      true if inference should be performed
    • shouldExpandStars

      boolean shouldExpandStars(int passNumber, ResolutionStatistics previousStats)
      Determine if this strategy should expand star columns in the current pass.
      Parameters:
      passNumber - the current pass number
      previousStats - statistics from previous pass (null for first pass)
      Returns:
      true if star expansion should be performed
    • shouldPushDownColumns

      boolean shouldPushDownColumns(int passNumber, ResolutionStatistics previousStats)
      Determine if this strategy should push down column requirements in the current pass.
      Parameters:
      passNumber - the current pass number
      previousStats - statistics from previous pass (null for first pass)
      Returns:
      true if push-down should be performed
    • preparePass

      void preparePass(int passNumber, ResolutionStatistics previousStats)
      Prepare for a new pass. Strategy can adjust its behavior based on previous results.
      Parameters:
      passNumber - the upcoming pass number
      previousStats - statistics from previous pass (null for first pass)
    • getDescription

      Get a description of this strategy.
      Returns:
      strategy description