public final class BindingMetadataAuthority extends Object
ColumnAuthority verdict.
Slice S4 (plan §5.5). The binding post-pass consumes this lookup to
decide whether UNKNOWN_COLUMN is justified for a not-found column:
only an ColumnAuthority.AUTHORITATIVE_ABSENT verdict is sufficient
— every other verdict is silent (or, in strict mode S6, escalates to
CATALOG_METADATA_UNAVAILABLE WARNING).
Originally package-private behind the post-pass. Widened to public for MantisBT 4659: resolver2 must ask the same "can this namespace PROVE the column?" question before it is allowed to re-point a reference away from a FROM-clause table. Keeping one definition of the verdict is what stops the resolver and the diagnostics from disagreeing about what counts as proof.
| Modifier and Type | Method and Description |
|---|---|
static ColumnAuthority |
lookup(INamespace namespace,
String columnName)
Return the column-authority verdict for a
columnName against
namespace. |
static ColumnAuthority |
lookupOutputSchema(INamespace namespace,
String columnName)
Same verdict as
lookup(gudusoft.gsqlparser.resolver2.namespace.INamespace, java.lang.String), but asked against the namespace's
OUTPUT SCHEMA (INamespace.hasAuthoritativeOutputColumn(java.lang.String)) rather than
its lookup-time INamespace.hasColumn(java.lang.String) view. |
public static ColumnAuthority lookup(INamespace namespace, String columnName)
columnName against
namespace.
ColumnAuthority.METADATA_UNAVAILABLE when either
input is null/empty, when namespace state is anything
other than MetadataState.FOUND, or when the namespace's
own column lookup is ambiguous (ColumnLevel.MAYBE).ColumnAuthority.AUTHORITATIVE_PRESENT when
namespace state is FOUND and the namespace declares the
column exists.ColumnAuthority.AUTHORITATIVE_ABSENT when
namespace state is FOUND and the namespace declares the
column does NOT exist.This intentionally never throws: a defensive lookup is the right default for diagnostics-emission code.
public static ColumnAuthority lookupOutputSchema(INamespace namespace, String columnName)
lookup(gudusoft.gsqlparser.resolver2.namespace.INamespace, java.lang.String), but asked against the namespace's
OUTPUT SCHEMA (INamespace.hasAuthoritativeOutputColumn(java.lang.String)) rather than
its lookup-time INamespace.hasColumn(java.lang.String) view.
Use this one when the question is "can this namespace PROVE it exposes
the column?" asked AFTER resolution has run. By then hasColumn has
been poisoned: resolveColumn() caches columns it merely inferred, so
a CTE that projects only id, val will happily answer EXISTS
for derived_col once something has asked for it. The output-schema
view filters those inferred entries out (MantisBT 4659).
lookup(gudusoft.gsqlparser.resolver2.namespace.INamespace, java.lang.String) is left alone deliberately: the binding post-pass gates
UNKNOWN_COLUMN on it, and tightening that gate here would silently
change which diagnostics are emitted.