MCPcopy Create free account
hub / github.com/apache/datafusion / parse_explain_format

Method parse_explain_format

datafusion/sql/src/parser.rs:817–830  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

815 }
816
817 pub fn parse_explain_format(&mut self) -> Result<Option<String>, DataFusionError> {
818 if !self.parser.parse_keyword(Keyword::FORMAT) {
819 return Ok(None);
820 }
821
822 let next_token = self.parser.next_token();
823 let format = match next_token.token {
824 Token::Word(w) => Ok(w.value),
825 Token::SingleQuotedString(w) => Ok(w),
826 Token::DoubleQuotedString(w) => Ok(w),
827 _ => self.expected("an explain format such as TREE", &next_token),
828 }?;
829 Ok(Some(format))
830 }
831
832 /// Parse a SQL `CREATE` statement handling `CREATE EXTERNAL TABLE`
833 pub fn parse_create(&mut self) -> Result<Statement, DataFusionError> {

Callers 1

parse_explainMethod · 0.80

Calls 1

expectedMethod · 0.80

Tested by

no test coverage detected