public final class BindingDiagnosticPostPass extends Object
ResolutionContext.getColumnResolutionResult(gudusoft.gsqlparser.nodes.TObjectName)) once after
iterative resolution converges and converts ResolutionResults
into a public BindingResult.
The class is public because TSQLResolver2 (in the
parent resolver2 package) instantiates it directly. The static
invocation counter accessors remain package-private — they are
test-only.
Plan §5.6.1 critical clarification — the post-pass MUST NOT perform
name binding. It only reads resolver2's final state and decides which
stable, public BindingDiagnostic to surface. In particular it
never re-invokes NameResolver.resolve(...) or mutates AST
state.
This slice ships the first three diagnostic codes (UNKNOWN_COLUMN, AMBIGUOUS_COLUMN, UNBOUND_COLUMN_REFERENCE). Strict-mode codes (UNKNOWN_TABLE,
UNKNOWN_ALIAS, CATALOG_METADATA_UNAVAILABLE) and clause
attribution land in S6; deeper codes (CTE / subquery output, set-op
arity, USING / NATURAL, DML) land in S8–S13.
| Constructor and Description |
|---|
BindingDiagnosticPostPass(TSQLResolver2 resolver,
TSQLResolverConfig config) |
| Modifier and Type | Method and Description |
|---|---|
static int |
getInvocationCount()
How many times the binding diagnostic post-pass has run in this JVM.
|
static void |
resetInvocationCounter()
Resets the post-pass invocation counter.
|
BindingResult |
run()
Run the post-pass exactly once and return the populated
BindingResult. |
public BindingDiagnosticPostPass(TSQLResolver2 resolver, TSQLResolverConfig config)
public static int getInvocationCount()
PUBLIC ON PURPOSE, for the same reason as
resetInvocationCounter(): package-private members are renamed in
every shipped (ProGuard-obfuscated) jar, so a test asserting on this
counter cannot reach it when run against the real released bytes.
public static void resetInvocationCounter()
PUBLIC ON PURPOSE: every shipped jar is ProGuard-obfuscated under a compatibility-first policy that preserves public and protected members and renames everything else. A package-private method is therefore unreachable from the released jar, which is what the test suite runs against in the nightly obfuscated-jar gate. Keeping this public is what lets that gate execute the real shipped bytes.
public BindingResult run()
BindingResult.
Always non-null. Returns BindingResult.empty() when the
inputs do not yet satisfy the minimum invariants (no scope build
result, no resolution context, trace not enabled) — never throws.