Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3088 +/- ##
=======================================
Coverage 83.65% 83.66%
=======================================
Files 42 42
Lines 35837 35849 +12
Branches 35837 35849 +12
=======================================
+ Hits 29980 29993 +13
Misses 2418 2418
+ Partials 3439 3438 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
left a comment
There was a problem hiding this comment.
Please do search for other keywords which should not be allowed as unquoted columns and add red tests for them to avoid other future regressions.
| /// The generic dialect reserves no keyword as a table name. | ||
| fn is_table_factor(&self, _kw: &Keyword, _parser: &mut Parser) -> bool { | ||
| true | ||
| } |
There was a problem hiding this comment.
GenericDialect::is_table_factor returning true for every keyword also unreserves ON, which #2633 reserved on purpose, and I thought I had added red tests for it but I must have been mistaken. Please do check well whether other such keywords should be included in the method.
| /// The generic dialect reserves no keyword as a table name. | |
| fn is_table_factor(&self, _kw: &Keyword, _parser: &mut Parser) -> bool { | |
| true | |
| } | |
| /// The generic dialect reserves only `ON` as a table name. | |
| fn is_table_factor(&self, kw: &Keyword, _parser: &mut Parser) -> bool { | |
| *kw != Keyword::ON | |
| } |
| #[test] | ||
| fn parse_generic_reserved_keyword_as_table_name() { | ||
| let generic = TestedDialects::new(vec![Box::new(GenericDialect {})]); | ||
| for keyword in ["into", "limit", "having", "where", "on"] { |
There was a problem hiding this comment.
| for keyword in ["into", "limit", "having", "where", "on"] { | |
| for keyword in ["into", "limit", "having", "where"] { |
#3004 (comment)
select offset from (select 42 as "offset")42ParserError: Expected: ), found: 42select union from (select 42 as "union")42with limit as (select 42 as x) select * from limit42ParserError: Expected: table name, found: limit