Class SchemaInferenceEngine
java.lang.Object
com.darkcollective.relix.semantic.internal.SchemaInferenceEngine
Orchestrates the schema-inference pass (Phase 4 of semantic analysis).
The engine drives a SchemaInferenceVisitor over every
relational algebra expression reachable from the root script:
- Named view bodies — every
QueryRelationSymbolin the symbol table is visited in registration order. After successful inference the symbol is re-registered with the resolved schema so that later symbols referencing it see the correct output type. - Root query expressions — the inline RA expression
(if any) inside each
QueryStatementin the root file.
Registration order equals dependency-first processing order because the
SymbolCollector already traverses files topologically. This means
that in the common case all dependencies are resolved before dependants are
processed. Symbols whose dependencies could not be inferred produce an
SymbolCollector.UNRESOLVED_SCHEMA placeholder; the engine silently
leaves those unannotated.
All errors are accumulated in a list and returned via errors().
The engine never throws.
-
Method Summary