File tree Expand file tree Collapse file tree 5 files changed +19
-1
lines changed Expand file tree Collapse file tree 5 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,11 @@ impl Dialect for BigQueryDialect {
115115 true
116116 }
117117
118+ // See <https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#group_by_clause>
119+ fn supports_group_by_expr ( & self ) -> bool {
120+ true
121+ }
122+
118123 fn is_column_alias ( & self , kw : & Keyword , _parser : & mut Parser ) -> bool {
119124 !RESERVED_FOR_COLUMN_ALIAS . contains ( kw)
120125 }
Original file line number Diff line number Diff line change @@ -147,4 +147,8 @@ impl Dialect for GenericDialect {
147147 fn supports_array_typedef_size ( & self ) -> bool {
148148 true
149149 }
150+
151+ fn supports_match_against ( & self ) -> bool {
152+ true
153+ }
150154}
Original file line number Diff line number Diff line change @@ -479,6 +479,11 @@ pub trait Dialect: Debug + Any {
479479 false
480480 }
481481
482+ /// Does the dialect support the `MATCH() AGAINST()` syntax?
483+ fn supports_match_against ( & self ) -> bool {
484+ false
485+ }
486+
482487 /// Dialect-specific infix parser override
483488 ///
484489 /// This method is called to parse the next infix expression.
Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ impl Dialect for MySqlDialect {
129129 fn requires_single_line_comment_whitespace ( & self ) -> bool {
130130 true
131131 }
132+
133+ fn supports_match_against ( & self ) -> bool {
134+ true
135+ }
132136}
133137
134138/// `LOCK TABLES`
Original file line number Diff line number Diff line change @@ -1198,7 +1198,7 @@ impl<'a> Parser<'a> {
11981198 })))
11991199 }
12001200 Keyword::NOT => Ok(Some(self.parse_not()?)),
1201- Keyword::MATCH if dialect_of!( self is MySqlDialect | GenericDialect ) => {
1201+ Keyword::MATCH if self.dialect.supports_match_against( ) => {
12021202 Ok(Some(self.parse_match_against()?))
12031203 }
12041204 Keyword::STRUCT if self.dialect.supports_struct_literal() => {
You can’t perform that action at this time.
0 commit comments