pub async fn validate_view_definition(
def: &ViewDefinition,
view: &SqlBatchView,
factory: &Arc<ViewFactory>,
runtime: Arc<RuntimeEnv>,
lake: Arc<DataLakeConnection>,
session_configurator: Arc<dyn SessionConfigurator>,
) -> Result<(), Error>Expand description
Every check runs before a definition’s row is written, in this one function shared by the DDL
executor and the registry loader – so a definition the loader would skip can never be
accepted at CREATE time in the first place. view must already be the result of
build_sql_batch_view over def – constructing it is most of the validation (it plans
the extract query and yields the schema every check below inspects). factory is the factory
view was built against – every other definition, for the DDL executor, or only the
definitions in a strictly lower update_group processed so far, for the registry loader –
which the update-group ordering check below reads.