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

Method parse_order_by_exprs

datafusion/sql/src/parser.rs:889–899  ·  view source on GitHub ↗

Parse the ordering clause of a `CREATE EXTERNAL TABLE` SQL statement

(&mut self)

Source from the content-addressed store, hash-verified

887
888 /// Parse the ordering clause of a `CREATE EXTERNAL TABLE` SQL statement
889 pub fn parse_order_by_exprs(&mut self) -> Result<Vec<OrderByExpr>, DataFusionError> {
890 let mut values = vec![];
891 self.parser.expect_token(&Token::LParen)?;
892 loop {
893 values.push(self.parse_order_by_expr()?);
894 if !self.parser.consume_token(&Token::Comma) {
895 self.parser.expect_token(&Token::RParen)?;
896 return Ok(values);
897 }
898 }
899 }
900
901 /// Parse an ORDER BY sub-expression optionally followed by ASC or DESC.
902 pub fn parse_order_by_expr(&mut self) -> Result<OrderByExpr, DataFusionError> {

Callers 1

Calls 3

expect_tokenMethod · 0.80
parse_order_by_exprMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected