Skip to content

Commit d653c52

Browse files
committed
Merge remote-tracking branch 'origin/main' into lukim/explain
2 parents 0dea595 + b78e02d commit d653c52

36 files changed

Lines changed: 2074 additions & 5608 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Rustdoc
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
with:
2020
fetch-depth: 0
2121
submodules: recursive

.github/workflows/release_plz.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121
with:
2222
fetch-depth: 0
2323
- name: Install Rust toolchain
2424
uses: dtolnay/rust-toolchain@stable
25-
- name: Install dependencies
26-
run: sudo apt install -y protobuf-compiler libprotobuf-dev
25+
- uses: arduino/setup-protoc@v3
26+
with:
27+
repo-token: ${{ secrets.GITHUB_TOKEN }}
2728
- name: Run release-plz
2829
uses: MarcoIeni/[email protected]
2930
with:
@@ -41,7 +42,7 @@ jobs:
4142
cancel-in-progress: false
4243
steps:
4344
- name: Checkout repository
44-
uses: actions/checkout@v4
45+
uses: actions/checkout@v5
4546
with:
4647
fetch-depth: 0
4748
- name: Install Rust toolchain

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Check
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
with:
1616
fetch-depth: 0
1717
submodules: recursive
@@ -25,7 +25,7 @@ jobs:
2525
name: Test
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
3131
submodules: recursive
@@ -39,7 +39,7 @@ jobs:
3939
name: Rustfmt
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v5
4343
- uses: dtolnay/rust-toolchain@stable
4444
with:
4545
components: rustfmt
@@ -49,7 +49,7 @@ jobs:
4949
name: Clippy
5050
runs-on: ubuntu-latest
5151
steps:
52-
- uses: actions/checkout@v4
52+
- uses: actions/checkout@v5
5353
with:
5454
fetch-depth: 0
5555
submodules: recursive
@@ -65,7 +65,7 @@ jobs:
6565
name: Package
6666
runs-on: ubuntu-latest
6767
steps:
68-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@v5
6969
with:
7070
fetch-depth: 0
7171
submodules: recursive

Cargo.toml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,20 @@
11
[workspace]
22
resolver = "2"
33

4-
members = ["datafusion-federation", "integration-test"]
4+
members = ["datafusion-federation"]
55

66
[workspace.package]
7-
version = "0.4.2"
7+
version = "0.5.1"
88
edition = "2021"
99
license = "Apache-2.0"
1010
readme = "README.md"
1111
repository = "https://github.com/datafusion-contrib/datafusion-federation"
1212

1313
[workspace.dependencies]
14-
arrow-json = "56"
15-
async-stream = "0.3.5"
16-
async-trait = "0.1.83"
17-
datafusion = "50"
18-
datafusion-federation = { path = "./datafusion-federation", version = "0.4.2" }
19-
futures = "0.3.31"
14+
arrow-json = "57.2"
15+
async-stream = "0.3"
16+
async-trait = "0.1"
17+
datafusion = "52.0"
18+
datafusion-federation = { path = "./datafusion-federation", version = "0.5.1" }
19+
futures = "0.3"
2020
tokio = { version = "1.41", features = ["full"] }
21-
22-
[patch.crates-io]
23-
duckdb = { git = "https://github.com/spiceai/duckdb-rs.git", rev = "dd02045c3aa77895723e873222cbe30f5c8f77a9" } # spiceai-1.3.2
24-
25-
datafusion = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
26-
datafusion-expr = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
27-
datafusion-physical-expr = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
28-
datafusion-physical-plan = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
29-
30-
arrow = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
31-
arrow-buffer = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
32-
arrow-json = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
33-
arrow-ipc = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
34-
arrow-ord = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
35-
arrow-schema = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
36-
parquet = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56

datafusion-federation/CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,94 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.5.1](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.5.0...v0.5.1) - 2026-03-04
11+
12+
### Added
13+
14+
- *(sql)* add SQL query rewriter hook to SQLTable ([#163](https://github.com/datafusion-contrib/datafusion-federation/pull/163))
15+
16+
### Fixed
17+
18+
- *(sql)* apply table-scan rewrite before EXPLAIN display ([#161](https://github.com/datafusion-contrib/datafusion-federation/pull/161))
19+
20+
## [0.5.0](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.14...v0.5.0) - 2026-02-26
21+
22+
### Other
23+
24+
- Pushdown physical filters to `SQLExecutor` ([#160](https://github.com/datafusion-contrib/datafusion-federation/pull/160))
25+
26+
## [0.4.14](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.13...v0.4.14) - 2026-01-14
27+
28+
### Other
29+
30+
- update Cargo.toml dependencies
31+
32+
## [0.4.13](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.12...v0.4.13) - 2026-01-13
33+
34+
### Other
35+
36+
- update Cargo.toml dependencies
37+
38+
## [0.4.12](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.11...v0.4.12) - 2025-12-04
39+
40+
### Other
41+
42+
- Fix conversion of empty `RecordBatch` ([#154](https://github.com/datafusion-contrib/datafusion-federation/pull/154))
43+
44+
## [0.4.11](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.10...v0.4.11) - 2025-11-24
45+
46+
### Other
47+
48+
- Upgrade datafusion to 51, arrow to 57 ([#151](https://github.com/datafusion-contrib/datafusion-federation/pull/151))
49+
50+
## [0.4.10](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.9...v0.4.10) - 2025-09-18
51+
52+
### Other
53+
54+
- Upgrade datafusion to version 50 ([#149](https://github.com/datafusion-contrib/datafusion-federation/pull/149))
55+
56+
## [0.4.9](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.8...v0.4.9) - 2025-08-19
57+
58+
### Other
59+
60+
- Cargo clippy 1.89 ([#146](https://github.com/datafusion-contrib/datafusion-federation/pull/146))
61+
62+
## [0.4.8](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.7...v0.4.8) - 2025-08-05
63+
64+
### Other
65+
66+
- Add metrics to `SchemaCastScanExec` and `VirtualExecutionPlan` ([#143](https://github.com/datafusion-contrib/datafusion-federation/pull/143))
67+
68+
## [0.4.7](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.6...v0.4.7) - 2025-07-29
69+
70+
### Other
71+
72+
- Upgrade datafusion to version 49 ([#140](https://github.com/datafusion-contrib/datafusion-federation/pull/140))
73+
74+
## [0.4.6](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.5...v0.4.6) - 2025-07-21
75+
76+
### Other
77+
78+
- Make VirtualExecutionPlan public ([#138](https://github.com/datafusion-contrib/datafusion-federation/pull/138))
79+
80+
## [0.4.5](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.4...v0.4.5) - 2025-07-09
81+
82+
### Other
83+
84+
- Add ability to set statistics in the SQLExecutor ([#134](https://github.com/datafusion-contrib/datafusion-federation/pull/134))
85+
86+
## [0.4.4](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.3...v0.4.4) - 2025-06-30
87+
88+
### Other
89+
90+
- Minor clippy fixes introduced in rust 1.88 ([#132](https://github.com/datafusion-contrib/datafusion-federation/pull/132))
91+
92+
## [0.4.3](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.2...v0.4.3) - 2025-06-22
93+
94+
### Other
95+
96+
- Update DataFusion to 48 ([#130](https://github.com/datafusion-contrib/datafusion-federation/pull/130))
97+
1098
## [0.4.2](https://github.com/datafusion-contrib/datafusion-federation/compare/v0.4.1...v0.4.2) - 2025-04-21
1199

12100
### Other

datafusion-federation/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ async-trait.workspace = true
2626
datafusion.workspace = true
2727
async-stream.workspace = true
2828
arrow-json.workspace = true
29-
tracing = "0.1"
3029

3130
[dev-dependencies]
3231
tokio.workspace = true
3332
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
34-
insta = { version = "1.42.0", features = ["filters"] }
33+
tracing = "0.1.40"
3534

3635
[[example]]
3736
name = "df-csv"

datafusion-federation/examples/df-csv-advanced.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ use datafusion::{
66
execution::{
77
context::SessionContext, options::CsvReadOptions, session_state::SessionStateBuilder,
88
},
9-
optimizer::Analyzer,
9+
optimizer::Optimizer,
1010
};
1111

1212
use datafusion_federation::{
1313
sql::{MultiSchemaProvider, SQLFederationProvider, SQLSchemaProvider},
14-
FederatedQueryPlanner, FederationAnalyzerRule,
14+
FederatedQueryPlanner, FederationOptimizerRule,
1515
};
1616

1717
use shared::{overwrite_default_schema, MockPostgresExecutor, MockSqliteExecutor};
@@ -115,15 +115,15 @@ async fn main() {
115115
/////////////////////
116116
// Main(local) DB
117117
/////////////////////
118-
// Get the default analyzer rules
119-
let mut rules = Analyzer::new().rules;
118+
// Get the default optimizer rules
119+
let mut rules = Optimizer::new().rules;
120120

121-
// Create a new federation analyzer rule and add it to the default rules
122-
rules.push(Arc::new(FederationAnalyzerRule::new()));
121+
// Create a new federation optimizer rule and add it to the default rules
122+
rules.push(Arc::new(FederationOptimizerRule::new()));
123123

124-
// Create a new SessionState with the analyzer rule we created above
124+
// Create a new SessionState with the optimizer rule we created above
125125
let state = SessionStateBuilder::new()
126-
.with_analyzer_rules(rules)
126+
.with_optimizer_rules(rules)
127127
.with_query_planner(Arc::new(FederatedQueryPlanner::new()))
128128
.build();
129129

datafusion-federation/examples/shared/mod.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use datafusion::{
66
catalog::SchemaProvider,
77
error::{DataFusionError, Result},
88
execution::context::{SessionContext, SessionState},
9-
physical_plan::{stream::RecordBatchStreamAdapter, SendableRecordBatchStream},
9+
physical_plan::{stream::RecordBatchStreamAdapter, PhysicalExpr, SendableRecordBatchStream},
1010
sql::unparser::dialect::{DefaultDialect, Dialect},
1111
};
1212
use futures::TryStreamExt;
@@ -50,7 +50,12 @@ impl SQLExecutor for MockSqliteExecutor {
5050
Some("sqlite_exec".to_string())
5151
}
5252

53-
fn execute(&self, sql: &str, schema: SchemaRef) -> Result<SendableRecordBatchStream> {
53+
fn execute(
54+
&self,
55+
sql: &str,
56+
schema: SchemaRef,
57+
_filters: &[Arc<dyn PhysicalExpr>],
58+
) -> Result<SendableRecordBatchStream> {
5459
// Execute it using the remote datafusion session context
5560
let future_stream = _execute(self.session.clone(), sql.to_string());
5661
let stream = futures::stream::once(future_stream).try_flatten();
@@ -103,7 +108,12 @@ impl SQLExecutor for MockPostgresExecutor {
103108
Some("postgres_exec".to_string())
104109
}
105110

106-
fn execute(&self, sql: &str, schema: SchemaRef) -> Result<SendableRecordBatchStream> {
111+
fn execute(
112+
&self,
113+
sql: &str,
114+
schema: SchemaRef,
115+
_filters: &[Arc<dyn PhysicalExpr>],
116+
) -> Result<SendableRecordBatchStream> {
107117
// Execute it using the remote datafusion session context
108118
let future_stream = _execute(self.session.clone(), sql.to_string());
109119
let stream = futures::stream::once(future_stream).try_flatten();

0 commit comments

Comments
 (0)