mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-04 13:10:31 +00:00
Support PREWHERE
condition for ClickHouse dialect (#1328)
This commit is contained in:
parent
700bd03d6f
commit
0884dd920d
9 changed files with 94 additions and 0 deletions
|
@ -8329,6 +8329,14 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
let prewhere = if dialect_of!(self is ClickHouseDialect|GenericDialect)
|
||||
&& self.parse_keyword(Keyword::PREWHERE)
|
||||
{
|
||||
Some(self.parse_expr()?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let selection = if self.parse_keyword(Keyword::WHERE) {
|
||||
Some(self.parse_expr()?)
|
||||
} else {
|
||||
|
@ -8440,6 +8448,7 @@ impl<'a> Parser<'a> {
|
|||
into,
|
||||
from,
|
||||
lateral_views,
|
||||
prewhere,
|
||||
selection,
|
||||
group_by,
|
||||
cluster_by,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue