Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,12 @@ jobs:
needs: [test]
steps:
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: |
pip install psycopg
- uses: cachix/install-nix-action@v31
- name: Initialize podman
run: nix develop --command podman info >/dev/null 2>&1 || true
- run: |
cd tests-integration
./test.sh
nix develop --command bash test.sh

msrv:
name: MSRV
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bytes = "1.11.1"
chrono = { version = "0.4", features = ["std"] }
datafusion = { version = "53" }
futures = "0.3"
pgwire = { version = "0.39", default-features = false }
pgwire = { version = "0.40", default-features = false }
postgres-types = "0.2"
rust_decimal = { version = "1.41", features = ["db-postgres"] }
tokio = { version = "1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion arrow-pg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ datafusion = { workspace = true, optional = true }
futures.workspace = true
geoarrow = { version = "0.8", optional = true }
geoarrow-schema = { version = "0.8", optional = true }
pg_interval = { version = "0.5.1", package = "pg_interval_2" }
pg_interval = { version = "0.5.0" }
pgwire = { workspace = true, default-features = false, features = ["server-api", "pg-ext-types"] }
postgres-types.workspace = true
rust_decimal.workspace = true
Expand Down
10 changes: 10 additions & 0 deletions datafusion-pg-catalog/src/sql/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::sync::Arc;

use datafusion::sql::sqlparser::ast::Statement;
use datafusion::sql::sqlparser::dialect::PostgreSqlDialect;
use datafusion::sql::sqlparser::keywords::Keyword;
use datafusion::sql::sqlparser::parser::Parser;
use datafusion::sql::sqlparser::parser::ParserError;
use datafusion::sql::sqlparser::tokenizer::Token;
Expand Down Expand Up @@ -247,10 +248,19 @@ impl PostgresCompatibilityParser {

// Get token values (without spans) and filter out only whitespace
// Keep semicolons as they separate statements
// Also rewrite ABORT to ROLLBACK for postgres compatibility
// remove this when https://github.com/apache/datafusion-sqlparser-rs/pull/2332 is ready
let filtered_tokens: Vec<Token> = tokens
.iter()
.map(|t| t.token.clone())
.filter(|t| !matches!(t, Token::Whitespace(_)))
.map(|t| {
if matches!(&t, Token::Word(w) if w.keyword == Keyword::ABORT) {
Token::make_keyword("ROLLBACK")
} else {
t
}
})
.collect();

// Handle empty input
Expand Down
Loading
Loading