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

Method parse_explain

src/sql-parser/src/parser.rs:8950–8967  ·  view source on GitHub ↗

Parse an `EXPLAIN` statement, assuming that the `EXPLAIN` token has already been consumed.

(&mut self)

Source from the content-addressed store, hash-verified

8948 /// Parse an `EXPLAIN` statement, assuming that the `EXPLAIN` token
8949 /// has already been consumed.
8950 fn parse_explain(&mut self) -> Result<Statement<Raw>, ParserStatementError> {
8951 if self.parse_keyword(TIMESTAMP) {
8952 self.parse_explain_timestamp()
8953 .map_parser_err(StatementKind::ExplainTimestamp)
8954 } else if self.parse_keywords(&[FILTER, PUSHDOWN]) {
8955 self.parse_explain_pushdown()
8956 .map_parser_err(StatementKind::ExplainPushdown)
8957 } else if self.parse_keyword(ANALYZE) || self.parse_keyword(ANALYSE) {
8958 self.parse_explain_analyze()
8959 .map_parser_err(StatementKind::ExplainAnalyzeObject)
8960 } else if self.peek_keyword(KEY) || self.peek_keyword(VALUE) {
8961 self.parse_explain_schema()
8962 .map_parser_err(StatementKind::ExplainSinkSchema)
8963 } else {
8964 self.parse_explain_plan()
8965 .map_parser_err(StatementKind::ExplainPlan)
8966 }
8967 }
8968
8969 fn parse_explainee(&mut self) -> Result<Explainee<Raw>, ParserError> {
8970 let explainee = if self.parse_keyword(VIEW) {

Callers 1

parse_statement_innerMethod · 0.80

Calls 9

parse_keywordMethod · 0.80
map_parser_errMethod · 0.80
parse_keywordsMethod · 0.80
parse_explain_analyzeMethod · 0.80
peek_keywordMethod · 0.80
parse_explain_schemaMethod · 0.80
parse_explain_planMethod · 0.80

Tested by

no test coverage detected