Skip to content

Commit cb9752d

Browse files
committed
update
1 parent 5fbb500 commit cb9752d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

datafusion/optimizer/src/unions_to_filter.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,10 @@ mod tests {
383383
struct VolatileTestUdf;
384384

385385
impl ScalarUDFImpl for VolatileTestUdf {
386+
fn as_any(&self) -> &dyn std::any::Any {
387+
self
388+
}
389+
386390
fn name(&self) -> &str {
387391
"volatile_test"
388392
}

datafusion/substrait/tests/cases/roundtrip_logical_plan.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,13 +985,20 @@ async fn roundtrip_is_not_unknown() -> Result<()> {
985985

986986
#[tokio::test]
987987
async fn roundtrip_union() -> Result<()> {
988-
roundtrip("SELECT a, e FROM data UNION SELECT a, e FROM data").await
988+
assert_expected_plan(
989+
"SELECT a, e FROM data UNION SELECT a, e FROM data",
990+
"Aggregate: groupBy=[[data.a, data.e]], aggr=[[]]\n TableScan: data projection=[a, e]",
991+
false,
992+
)
993+
.await
989994
}
990995

991996
#[tokio::test]
992997
async fn roundtrip_union2() -> Result<()> {
993-
roundtrip(
998+
assert_expected_plan(
994999
"SELECT a, b FROM data UNION SELECT a, b FROM data UNION SELECT a, b FROM data",
1000+
"Aggregate: groupBy=[[data.a, data.b]], aggr=[[]]\n TableScan: data projection=[a, b]",
1001+
false,
9951002
)
9961003
.await
9971004
}

0 commit comments

Comments
 (0)