mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-11 06:22:04 +00:00
Add support for PostgreSQL/Redshift geometric operators (#1723)
This commit is contained in:
parent
97f0be6991
commit
339239d0c5
11 changed files with 809 additions and 26 deletions
|
@ -95,6 +95,8 @@ use crate::ast::helpers::stmt_data_loading::{
|
|||
#[cfg(feature = "visitor")]
|
||||
pub use visitor::*;
|
||||
|
||||
pub use self::data_type::GeometricTypeKind;
|
||||
|
||||
mod data_type;
|
||||
mod dcl;
|
||||
mod ddl;
|
||||
|
@ -1513,7 +1515,15 @@ impl fmt::Display for Expr {
|
|||
Expr::UnaryOp { op, expr } => {
|
||||
if op == &UnaryOperator::PGPostfixFactorial {
|
||||
write!(f, "{expr}{op}")
|
||||
} else if op == &UnaryOperator::Not {
|
||||
} else if matches!(
|
||||
op,
|
||||
UnaryOperator::Not
|
||||
| UnaryOperator::Hash
|
||||
| UnaryOperator::AtDashAt
|
||||
| UnaryOperator::DoubleAt
|
||||
| UnaryOperator::QuestionDash
|
||||
| UnaryOperator::QuestionPipe
|
||||
) {
|
||||
write!(f, "{op} {expr}")
|
||||
} else {
|
||||
write!(f, "{op}{expr}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue