File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ pub struct Select {
341341 /// DISTRIBUTE BY (Hive)
342342 pub distribute_by : Vec < Expr > ,
343343 /// SORT BY (Hive)
344- pub sort_by : Vec < Expr > ,
344+ pub sort_by : Vec < OrderByExpr > ,
345345 /// HAVING
346346 pub having : Option < Expr > ,
347347 /// WINDOW AS
Original file line number Diff line number Diff line change @@ -11591,7 +11591,7 @@ impl<'a> Parser<'a> {
1159111591 };
1159211592
1159311593 let sort_by = if self.parse_keywords(&[Keyword::SORT, Keyword::BY]) {
11594- self.parse_comma_separated(Parser::parse_expr )?
11594+ self.parse_comma_separated(Parser::parse_order_by_expr )?
1159511595 } else {
1159611596 vec![]
1159711597 };
Original file line number Diff line number Diff line change @@ -341,6 +341,9 @@ fn lateral_view() {
341341fn sort_by ( ) {
342342 let sort_by = "SELECT * FROM db.table SORT BY a" ;
343343 hive ( ) . verified_stmt ( sort_by) ;
344+
345+ let sort_by_with_direction = "SELECT * FROM db.table SORT BY a, b DESC" ;
346+ hive ( ) . verified_stmt ( sort_by_with_direction) ;
344347}
345348
346349#[ test]
You can’t perform that action at this time.
0 commit comments