From 7387e6bffa525836ab465e86818b686b791221ca Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Wed, 24 Sep 2025 06:15:00 +0800 Subject: [PATCH 1/2] chore: expose sql module --- datafusion-postgres/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion-postgres/src/lib.rs b/datafusion-postgres/src/lib.rs index aeee0e5..1161c50 100644 --- a/datafusion-postgres/src/lib.rs +++ b/datafusion-postgres/src/lib.rs @@ -1,6 +1,6 @@ mod handlers; pub mod pg_catalog; -mod sql; +pub mod sql; use std::fs::File; use std::io::{BufReader, Error as IOError, ErrorKind}; From 4cde5ef8761a2464f02d4b4210a9de679fd55db2 Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Wed, 24 Sep 2025 06:36:28 +0800 Subject: [PATCH 2/2] fix: lint fix --- datafusion-postgres/src/sql/parser.rs | 6 ++++++ datafusion-postgres/src/sql/rules.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/datafusion-postgres/src/sql/parser.rs b/datafusion-postgres/src/sql/parser.rs index 862c830..7c09f3d 100644 --- a/datafusion-postgres/src/sql/parser.rs +++ b/datafusion-postgres/src/sql/parser.rs @@ -177,6 +177,12 @@ pub struct PostgresCompatibilityParser { rewrite_rules: Vec>, } +impl Default for PostgresCompatibilityParser { + fn default() -> Self { + Self::new() + } +} + impl PostgresCompatibilityParser { pub fn new() -> Self { let mut mapping = Vec::with_capacity(BLACKLIST_SQL_MAPPING.len()); diff --git a/datafusion-postgres/src/sql/rules.rs b/datafusion-postgres/src/sql/rules.rs index 18523cf..b6ddc65 100644 --- a/datafusion-postgres/src/sql/rules.rs +++ b/datafusion-postgres/src/sql/rules.rs @@ -266,6 +266,12 @@ pub struct RemoveUnsupportedTypes { unsupported_types: HashSet, } +impl Default for RemoveUnsupportedTypes { + fn default() -> Self { + Self::new() + } +} + impl RemoveUnsupportedTypes { pub fn new() -> Self { let mut unsupported_types = HashSet::new();