mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-18 01:37:15 +00:00
Support for CONNECT BY (#1138)
This commit is contained in:
parent
deaa6d8151
commit
0b5722afbf
16 changed files with 319 additions and 4 deletions
|
@ -40,9 +40,9 @@ pub use self::ddl::{
|
|||
pub use self::dml::{Delete, Insert};
|
||||
pub use self::operator::{BinaryOperator, UnaryOperator};
|
||||
pub use self::query::{
|
||||
AfterMatchSkip, Cte, CteAsMaterialized, Distinct, EmptyMatchesMode, ExceptSelectItem,
|
||||
ExcludeSelectItem, Fetch, ForClause, ForJson, ForXml, GroupByExpr, IdentWithAlias,
|
||||
IlikeSelectItem, Join, JoinConstraint, JoinOperator, JsonTableColumn,
|
||||
AfterMatchSkip, ConnectBy, Cte, CteAsMaterialized, Distinct, EmptyMatchesMode,
|
||||
ExceptSelectItem, ExcludeSelectItem, Fetch, ForClause, ForJson, ForXml, GroupByExpr,
|
||||
IdentWithAlias, IlikeSelectItem, Join, JoinConstraint, JoinOperator, JsonTableColumn,
|
||||
JsonTableColumnErrorHandling, LateralView, LockClause, LockType, MatchRecognizePattern,
|
||||
MatchRecognizeSymbol, Measure, NamedWindowDefinition, NonBlock, Offset, OffsetRows,
|
||||
OrderByExpr, Query, RenameSelectItem, RepetitionQuantifier, ReplaceSelectElement,
|
||||
|
@ -798,6 +798,8 @@ pub enum Expr {
|
|||
///
|
||||
/// See <https://docs.snowflake.com/en/sql-reference/constructs/where#joins-in-the-where-clause>.
|
||||
OuterJoin(Box<Expr>),
|
||||
/// A reference to the prior level in a CONNECT BY clause.
|
||||
Prior(Box<Expr>),
|
||||
}
|
||||
|
||||
impl fmt::Display for CastFormat {
|
||||
|
@ -1255,6 +1257,7 @@ impl fmt::Display for Expr {
|
|||
Expr::OuterJoin(expr) => {
|
||||
write!(f, "{expr} (+)")
|
||||
}
|
||||
Expr::Prior(expr) => write!(f, "PRIOR {expr}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue