Add support for Redshift SELECT * EXCLUDE (#1936)
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run

This commit is contained in:
Yoav Cohen 2025-07-11 11:39:29 +02:00 committed by GitHub
parent 15f35e1476
commit ee31b64f9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 192 additions and 3 deletions

View file

@ -11740,6 +11740,7 @@ impl<'a> Parser<'a> {
top: None,
top_before_distinct: false,
projection: vec![],
exclude: None,
into: None,
from,
lateral_views: vec![],
@ -11782,6 +11783,12 @@ impl<'a> Parser<'a> {
self.parse_projection()?
};
let exclude = if self.dialect.supports_select_exclude() {
self.parse_optional_select_item_exclude()?
} else {
None
};
let into = if self.parse_keyword(Keyword::INTO) {
Some(self.parse_select_into()?)
} else {
@ -11915,6 +11922,7 @@ impl<'a> Parser<'a> {
top,
top_before_distinct,
projection,
exclude,
into,
from,
lateral_views,
@ -15052,8 +15060,7 @@ impl<'a> Parser<'a> {
} else {
None
};
let opt_exclude = if opt_ilike.is_none()
&& dialect_of!(self is GenericDialect | DuckDbDialect | SnowflakeDialect)
let opt_exclude = if opt_ilike.is_none() && self.dialect.supports_select_wildcard_exclude()
{
self.parse_optional_select_item_exclude()?
} else {