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}; 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();