MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse

Method parse

src/adapter/src/client.rs:632–643  ·  view source on GitHub ↗

Parses a SQL expression, reporting failures as a telemetry event if possible.

(
        &self,
        sql: &'a str,
    )

Source from the content-addressed store, hash-verified

630 /// Parses a SQL expression, reporting failures as a telemetry event if
631 /// possible.
632 pub fn parse<'a>(
633 &self,
634 sql: &'a str,
635 ) -> Result<Result<Vec<StatementParseResult<'a>>, ParserStatementError>, String> {
636 match mz_sql::parse::parse_with_limit(sql) {
637 Ok(Err(e)) => {
638 self.track_statement_parse_failure(&e);
639 Ok(Err(e))
640 }
641 r => r,
642 }
643 }
644
645 fn track_statement_parse_failure(&self, parse_error: &ParserStatementError) {
646 let session = self.session.as_ref().expect("session invariant violated");

Callers 15

maybe_check_caught_upMethod · 0.45
canonicalizeMethod · 0.45
get_migration_versionFunction · 0.45
init_persistFunction · 0.45
decodeMethod · 0.45
readMethod · 0.45
to_compute_frontiersMethod · 0.45

Calls 1

Tested by 6

init_persistFunction · 0.36
to_compute_frontiersMethod · 0.36
to_storage_frontiersMethod · 0.36
fromMethod · 0.36
parse_query_whenFunction · 0.36