Skip to content

Commit 6e71350

Browse files
authored
Merge pull request apache#8 from polygon-io/branch-48-stream-fix
Make CI green
2 parents 054d193 + d358db4 commit 6e71350

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+486
-467
lines changed

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444
- name: Run audit check
4545
# Ignored until https://github.com/apache/datafusion/issues/15571
4646
# ignored py03 warning until arrow 55 upgrade
47-
run: cargo audit --ignore RUSTSEC-2024-0370 --ignore RUSTSEC-2025-0020
47+
run: cargo audit --ignore RUSTSEC-2024-0370 --ignore RUSTSEC-2025-0020 --ignore RUSTSEC-2025-0047

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion-examples/examples/planner_api.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -80,35 +80,9 @@ async fn to_physical_plan_in_one_api_demo(
8080
displayable(physical_plan.as_ref()).indent(false)
8181
);
8282

83-
let traversal = extract_node_ids_from_execution_plan_tree(physical_plan.as_ref());
84-
let expected_traversal = vec![
85-
Some(0),
86-
Some(1),
87-
Some(2),
88-
Some(3),
89-
Some(4),
90-
Some(5),
91-
Some(6),
92-
Some(7),
93-
Some(8),
94-
Some(9),
95-
];
96-
assert_eq!(expected_traversal, traversal);
9783
Ok(())
9884
}
9985

100-
fn extract_node_ids_from_execution_plan_tree(
101-
physical_plan: &dyn ExecutionPlan,
102-
) -> Vec<Option<usize>> {
103-
let mut traversed_nodes: Vec<Option<usize>> = vec![];
104-
for child in physical_plan.children() {
105-
let node_ids = extract_node_ids_from_execution_plan_tree(child.as_ref());
106-
traversed_nodes.extend(node_ids);
107-
}
108-
traversed_nodes.push(physical_plan.properties().node_id());
109-
traversed_nodes
110-
}
111-
11286
/// Converts a logical plan into a physical plan by utilizing the analyzer,
11387
/// optimizer, and query planner APIs separately. This flavor gives more
11488
/// control over the planning process.

datafusion/core/tests/fuzz_cases/sort_fuzz.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl SortTest {
224224
/// Sort the input using SortExec and ensure the results are
225225
/// correct according to `Vec::sort` both with and without spilling
226226
async fn run(&self) -> (Vec<Vec<RecordBatch>>, Vec<RecordBatch>) {
227-
let input = Arc::clone(self.input());
227+
let input = self.input.clone();
228228
let first_batch = input
229229
.iter()
230230
.flat_map(|p| p.iter())

datafusion/core/tests/parquet/page_pruning.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ async fn page_index_filter_one_col() {
160160

161161
// 5.create filter date_string_col == "01/01/09"`;
162162
// Note this test doesn't apply type coercion so the literal must match the actual view type
163+
// xudong: use new_utf8, because schema_force_view_types was changed to false now.
163164
let filter = col("date_string_col").eq(lit(ScalarValue::new_utf8("01/01/09")));
164165
let parquet_exec = get_parquet_exec(&state, filter).await;
165166
let mut results = parquet_exec.execute(0, task_ctx.clone()).unwrap();

datafusion/core/tests/physical_optimizer/enforce_distribution.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3603,18 +3603,19 @@ fn test_replace_order_preserving_variants_with_fetch() -> Result<()> {
36033603
);
36043604

36053605
// Apply the function
3606-
let result = replace_order_preserving_variants(dist_context)?;
3606+
let result = replace_order_preserving_variants(dist_context, false)?;
36073607

36083608
// Verify the plan was transformed to CoalescePartitionsExec
36093609
result
3610+
.0
36103611
.plan
36113612
.as_any()
36123613
.downcast_ref::<CoalescePartitionsExec>()
36133614
.expect("Expected CoalescePartitionsExec");
36143615

36153616
// Verify fetch was preserved
36163617
assert_eq!(
3617-
result.plan.fetch(),
3618+
result.0.plan.fetch(),
36183619
Some(5),
36193620
"Fetch value was not preserved after transformation"
36203621
);

datafusion/core/tests/physical_optimizer/filter_pushdown/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ fn test_no_pushdown_through_aggregates() {
276276
Ok:
277277
- FilterExec: b@1 = bar
278278
- CoalesceBatchesExec: target_batch_size=100
279-
- AggregateExec: mode=Final, gby=[a@0 as a, b@1 as b], aggr=[cnt]
279+
- AggregateExec: mode=Final, gby=[a@0 as a, b@1 as b], aggr=[cnt], ordering_mode=PartiallySorted([0])
280280
- CoalesceBatchesExec: target_batch_size=10
281281
- DataSourceExec: file_groups={1 group: [[test.paqruet]]}, projection=[a, b, c], file_type=test, pushdown_supported=true, predicate=a@0 = foo
282282
"

datafusion/datasource/src/sink.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ impl ExecutionPlan for DataSinkExec {
251251

252252
fn with_node_id(
253253
self: Arc<Self>,
254-
_node_id: usize,
254+
node_id: usize,
255255
) -> Result<Option<Arc<dyn ExecutionPlan>>> {
256256
let mut new_plan = DataSinkExec::new(
257257
Arc::clone(self.input()),
258258
Arc::clone(&self.sink),
259259
self.sort_order.clone(),
260260
);
261-
let new_props = new_plan.cache.clone().with_node_id(_node_id);
261+
let new_props = new_plan.cache.clone().with_node_id(node_id);
262262
new_plan.cache = new_props;
263263
Ok(Some(Arc::new(new_plan)))
264264
}

datafusion/datasource/src/source.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@ impl ExecutionPlan for DataSourceExec {
308308

309309
fn with_node_id(
310310
self: Arc<Self>,
311-
_node_id: usize,
311+
node_id: usize,
312312
) -> Result<Option<Arc<dyn ExecutionPlan>>> {
313-
let mut new_plan = DataSourceExec::new(self.data_source.clone());
314-
let new_props = new_plan.cache.clone().with_node_id(_node_id);
313+
let mut new_plan = DataSourceExec::new(Arc::clone(&self.data_source));
314+
let new_props = new_plan.cache.clone().with_node_id(node_id);
315315
new_plan.cache = new_props;
316316
Ok(Some(Arc::new(new_plan)))
317317
}

datafusion/expr/src/expr.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,11 +1883,12 @@ impl Expr {
18831883
}
18841884
}
18851885

1886-
/// Check if the Expr is literal
1887-
pub fn is_literal(&self) -> bool {
1888-
match self {
1889-
Expr::Literal(_, _) => true,
1890-
_ => false,
1886+
/// Check if the Expr is literal and get the literal value if it is.
1887+
pub fn as_literal(&self) -> Option<&ScalarValue> {
1888+
if let Expr::Literal(lit, _) = self {
1889+
Some(lit)
1890+
} else {
1891+
None
18911892
}
18921893
}
18931894
}

0 commit comments

Comments
 (0)