(&mut self)
| 9163 | } |
| 9164 | |
| 9165 | fn parse_explain_analyze(&mut self) -> Result<Statement<Raw>, ParserError> { |
| 9166 | // EXPLAIN ANALYZE CLUSTER (MEMORY | CPU) [WITH SKEW] [AS SQL] |
| 9167 | if self.parse_keyword(CLUSTER) { |
| 9168 | let properties = self.parse_explain_analyze_computation_properties()?; |
| 9169 | let as_sql = self.parse_keywords(&[AS, SQL]); |
| 9170 | return Ok(Statement::ExplainAnalyzeCluster( |
| 9171 | ExplainAnalyzeClusterStatement { properties, as_sql }, |
| 9172 | )); |
| 9173 | } |
| 9174 | |
| 9175 | // EXPLAIN ANALYZE ((MEMORY | CPU) [WITH SKEW] | HINTS) FOR (INDEX ... | MATERIALIZED VIEW ...) [AS SQL] |
| 9176 | |
| 9177 | let properties = if self.parse_keyword(HINTS) { |
| 9178 | ExplainAnalyzeProperty::Hints |
| 9179 | } else { |
| 9180 | ExplainAnalyzeProperty::Computation( |
| 9181 | self.parse_explain_analyze_computation_properties()?, |
| 9182 | ) |
| 9183 | }; |
| 9184 | |
| 9185 | self.expect_keyword(FOR)?; |
| 9186 | |
| 9187 | let explainee = match self.expect_one_of_keywords(&[INDEX, MATERIALIZED])? { |
| 9188 | INDEX => Explainee::Index(self.parse_raw_name()?), |
| 9189 | MATERIALIZED => { |
| 9190 | self.expect_keyword(VIEW)?; |
| 9191 | Explainee::MaterializedView(self.parse_raw_name()?) |
| 9192 | } |
| 9193 | _ => unreachable!(), |
| 9194 | }; |
| 9195 | |
| 9196 | let as_sql = self.parse_keywords(&[AS, SQL]); |
| 9197 | |
| 9198 | Ok(Statement::ExplainAnalyzeObject( |
| 9199 | ExplainAnalyzeObjectStatement { |
| 9200 | properties, |
| 9201 | explainee, |
| 9202 | as_sql, |
| 9203 | }, |
| 9204 | )) |
| 9205 | } |
| 9206 | |
| 9207 | fn parse_explain_analyze_computation_properties( |
| 9208 | &mut self, |
no test coverage detected