Expand description
CREATE [OR REPLACE] MATERIALIZED VIEW / DROP MATERIALIZED VIEW DDL: parsing and the
admin gate.
Admin gate for CREATE/DROP MATERIALIZED VIEW. The statement parser itself lives in
micromegas_analytics::lakehouse::view_ddl (so the check_view_merge UDTF can reuse it);
ViewDdl and parse_view_ddl are re-exported here for the Flight SQL front end.
Enums§
- ViewDdl
- One parsed
CREATE [OR REPLACE] MATERIALIZED VIEW/DROP MATERIALIZED VIEWstatement.
Functions§
- authorize_
view_ ddl - The same admin gate as the ten admin-gated lakehouse UDTFs/UDFs
(
query.rs::register_lakehouse_functions’sif lakehouse_adminblock), pulled out as a standalone function since this path never builds a caller session context to register a UDTF against in the first place. Also load-bearing beyond the usual reason: a DDL view’s queries are planned and materialized underCallerContext::maintenance()(ReadScope::All), so an author sees every audience regardless of their own read scope. - parse_
view_ ddl Ok(None)whensqlis not view DDL – the overwhelmingly common case, decided by a cheap keyword peek before any full parse.Errwhen the hand-rolled parse does not reach EOF right after<name> WITH (...)(or, onDROP, right after the single name): an unmodelled clause, anASbody, a secondDROPname, or a second statement each would otherwise silently do less than the statement says.