Skip to content

Commit 7a73f0b

Browse files
committed
Merge remote-tracking branch 'apache/main' into alamb/update_arrow_57.2.0
2 parents 2cb7928 + f60b68a commit 7a73f0b

File tree

26 files changed

+705
-137
lines changed

26 files changed

+705
-137
lines changed

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4444
- name: Install cargo-audit
45-
uses: taiki-e/install-action@3522286d40783523f9c7880e33f785905b4c20d0 # v2.66.1
45+
uses: taiki-e/install-action@03ef6f57d573ca4522fb02950f326083373b85bf # v2.66.2
4646
with:
4747
tool: cargo-audit
4848
- name: Run audit check

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ jobs:
421421
sudo apt-get update -qq
422422
sudo apt-get install -y -qq clang
423423
- name: Setup wasm-pack
424-
uses: taiki-e/install-action@3522286d40783523f9c7880e33f785905b4c20d0 # v2.66.1
424+
uses: taiki-e/install-action@03ef6f57d573ca4522fb02950f326083373b85bf # v2.66.2
425425
with:
426426
tool: wasm-pack
427427
- name: Run tests with headless mode
@@ -741,7 +741,7 @@ jobs:
741741
- name: Setup Rust toolchain
742742
uses: ./.github/actions/setup-builder
743743
- name: Install cargo-msrv
744-
uses: taiki-e/install-action@3522286d40783523f9c7880e33f785905b4c20d0 # v2.66.1
744+
uses: taiki-e/install-action@03ef6f57d573ca4522fb02950f326083373b85bf # v2.66.2
745745
with:
746746
tool: cargo-msrv
747747

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ recursive = "0.1.1"
181181
regex = "1.12"
182182
rstest = "0.26.1"
183183
serde_json = "1"
184-
sqlparser = { version = "0.59.0", default-features = false, features = ["std", "visitor"] }
184+
sqlparser = { version = "0.60.0", default-features = false, features = ["std", "visitor"] }
185185
strum = "0.27.2"
186186
strum_macros = "0.27.2"
187187
tempfile = "3"

benchmarks/bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ run_tpch_mem() {
683683

684684
# Runs the tpcds benchmark
685685
run_tpcds() {
686-
TPCDS_DIR="${DATA_DIR}"
686+
TPCDS_DIR="${DATA_DIR}/tpcds_sf1"
687687

688688
# Check if TPCDS data directory and representative file exists
689689
if [ ! -f "${TPCDS_DIR}/web_site.parquet" ]; then

datafusion-examples/examples/relation_planner/match_recognize.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ impl RelationPlanner for MatchRecognizePlanner {
362362
..
363363
} = relation
364364
else {
365-
return Ok(RelationPlanning::Original(relation));
365+
return Ok(RelationPlanning::Original(Box::new(relation)));
366366
};
367367

368368
// Plan the input table
@@ -401,6 +401,8 @@ impl RelationPlanner for MatchRecognizePlanner {
401401
node: Arc::new(node),
402402
});
403403

404-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
404+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
405+
plan, alias,
406+
))))
405407
}
406408
}

datafusion-examples/examples/relation_planner/pivot_unpivot.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ impl RelationPlanner for PivotUnpivotPlanner {
339339
alias,
340340
),
341341

342-
other => Ok(RelationPlanning::Original(other)),
342+
other => Ok(RelationPlanning::Original(Box::new(other))),
343343
}
344344
}
345345
}
@@ -459,7 +459,9 @@ fn plan_pivot(
459459
.aggregate(group_by_cols, pivot_exprs)?
460460
.build()?;
461461

462-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
462+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
463+
plan, alias,
464+
))))
463465
}
464466

465467
// ============================================================================
@@ -540,7 +542,9 @@ fn plan_unpivot(
540542
.build()?;
541543
}
542544

543-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
545+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
546+
plan, alias,
547+
))))
544548
}
545549

546550
// ============================================================================

datafusion-examples/examples/relation_planner/table_sample.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ impl RelationPlanner for TableSamplePlanner {
331331
index_hints,
332332
} = relation
333333
else {
334-
return Ok(RelationPlanning::Original(relation));
334+
return Ok(RelationPlanning::Original(Box::new(relation)));
335335
};
336336

337337
// Extract sample spec (handles both before/after alias positions)
@@ -401,7 +401,9 @@ impl RelationPlanner for TableSamplePlanner {
401401

402402
let fraction = bucket_num as f64 / total as f64;
403403
let plan = TableSamplePlanNode::new(input, fraction, seed).into_plan();
404-
return Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)));
404+
return Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
405+
plan, alias,
406+
))));
405407
}
406408

407409
// Handle quantity-based sampling
@@ -422,15 +424,19 @@ impl RelationPlanner for TableSamplePlanner {
422424
let plan = LogicalPlanBuilder::from(input)
423425
.limit(0, Some(rows as usize))?
424426
.build()?;
425-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
427+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
428+
plan, alias,
429+
))))
426430
}
427431

428432
// TABLESAMPLE (N PERCENT) - percentage sampling
429433
Some(TableSampleUnit::Percent) => {
430434
let percent: f64 = parse_literal::<Float64Type>(&quantity_value_expr)?;
431435
let fraction = percent / 100.0;
432436
let plan = TableSamplePlanNode::new(input, fraction, seed).into_plan();
433-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
437+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
438+
plan, alias,
439+
))))
434440
}
435441

436442
// TABLESAMPLE (N) - fraction if <1.0, row limit if >=1.0
@@ -448,7 +454,9 @@ impl RelationPlanner for TableSamplePlanner {
448454
// Interpret as fraction
449455
TableSamplePlanNode::new(input, value, seed).into_plan()
450456
};
451-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
457+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
458+
plan, alias,
459+
))))
452460
}
453461
}
454462
}

datafusion/core/tests/user_defined/relation_planner.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ fn plan_static_values_table(
6868
.project(vec![col("column1").alias(column_name)])?
6969
.build()?;
7070

71-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
71+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
72+
plan, alias,
73+
))))
7274
}
73-
other => Ok(RelationPlanning::Original(other)),
75+
other => Ok(RelationPlanning::Original(Box::new(other))),
7476
}
7577
}
7678

@@ -176,9 +178,11 @@ impl RelationPlanner for SamplingJoinPlanner {
176178
.cross_join(right_sampled)?
177179
.build()?;
178180

179-
Ok(RelationPlanning::Planned(PlannedRelation::new(plan, alias)))
181+
Ok(RelationPlanning::Planned(Box::new(PlannedRelation::new(
182+
plan, alias,
183+
))))
180184
}
181-
other => Ok(RelationPlanning::Original(other)),
185+
other => Ok(RelationPlanning::Original(Box::new(other))),
182186
}
183187
}
184188
}
@@ -195,7 +199,7 @@ impl RelationPlanner for PassThroughPlanner {
195199
_context: &mut dyn RelationPlannerContext,
196200
) -> Result<RelationPlanning> {
197201
// Never handles anything - always delegates
198-
Ok(RelationPlanning::Original(relation))
202+
Ok(RelationPlanning::Original(Box::new(relation)))
199203
}
200204
}
201205

@@ -217,7 +221,7 @@ impl RelationPlanner for PremiumFeaturePlanner {
217221
to unlock advanced array operations."
218222
.to_string(),
219223
)),
220-
other => Ok(RelationPlanning::Original(other)),
224+
other => Ok(RelationPlanning::Original(Box::new(other))),
221225
}
222226
}
223227
}

datafusion/core/tests/user_defined/user_defined_scalar_functions.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,19 +1306,14 @@ async fn create_scalar_function_from_sql_statement_default_arguments() -> Result
13061306
"Error during planning: Non-default arguments cannot follow default arguments.";
13071307
assert!(expected.starts_with(&err.strip_backtrace()));
13081308

1309-
// FIXME: The `DEFAULT` syntax does not work with positional params
1310-
let bad_expression_sql = r#"
1309+
let expression_sql = r#"
13111310
CREATE FUNCTION bad_expression_fun(DOUBLE, DOUBLE DEFAULT 2.0)
13121311
RETURNS DOUBLE
13131312
RETURN $1 + $2
13141313
"#;
1315-
let err = ctx
1316-
.sql(bad_expression_sql)
1317-
.await
1318-
.expect_err("sqlparser error");
1319-
let expected =
1320-
"SQL error: ParserError(\"Expected: ), found: 2.0 at Line: 2, Column: 63\")";
1321-
assert!(expected.starts_with(&err.strip_backtrace()));
1314+
let result = ctx.sql(expression_sql).await;
1315+
1316+
assert!(result.is_ok());
13221317
Ok(())
13231318
}
13241319

0 commit comments

Comments
 (0)