Class StarPushDownResolver
Object
gudusoft.gsqlparser.resolver2.expansion.StarPushDownResolver
Resolves star columns by pushing down column references from outer queries.
This is the GSP Java implementation of the star column push-down mechanism. When an outer query references columns from a CTE or subquery that uses SELECT *, we need to "push down" those column references to infer which columns are needed.
Example scenario:
WITH my_cte AS (SELECT * FROM Employees) SELECT id, name FROM my_cte;
Push-down process: 1. my_cte has SELECT * (star column) 2. Outer query references id, name from my_cte 3. Push down: id and name are "required" columns from the star 4. These columns are inferred to come from Employees table
Key features: - Works with ScopeBuildResult from ScopeBuilder - Multi-level push-down (nested CTEs/subqueries) - Iterative resolution (may need multiple passes) - Confidence scoring based on reference type
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a column reference that needs to be pushed down.static classRepresents the result of push-down resolution. -
Constructor Summary
ConstructorsConstructorDescriptionStarPushDownResolver(int maxIterations, boolean debugLogging) StarPushDownResolver(int maxIterations, boolean debugLogging, INameMatcher nameMatcher) -
Method Summary
Modifier and TypeMethodDescriptionGet statistics about push-down resolution.resolve(ScopeBuildResult scopeBuildResult) Resolve star columns by pushing down column references.
-
Constructor Details
-
StarPushDownResolver
public StarPushDownResolver() -
StarPushDownResolver
-
StarPushDownResolver
-
-
Method Details
-
resolve
Resolve star columns by pushing down column references.- Parameters:
scopeBuildResult- the scope build result from ScopeBuilder- Returns:
- push-down resolution result
-
getStatistics
Get statistics about push-down resolution.
-