Skip to content

Commit

Permalink
test(12687): reproducer of missing metadata bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedld committed Oct 1, 2024
1 parent 0242767 commit acc63fc
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions datafusion/sqllogictest/test_files/metadata.slt
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,39 @@ WHERE "data"."id" = "samples"."id";
1
3



# Regression test: prevent field metadata loss per https://github.com/apache/datafusion/issues/12687
statement error DataFusion error: Internal error: Physical input schema should be the same as the one converted from logical input schema..
select count(distinct name) from table_with_metadata;

# Regression test: prevent field metadata loss per https://github.com/apache/datafusion/issues/12687
statement error DataFusion error: Internal error: Physical input schema should be the same as the one converted from logical input schema..
select approx_median(distinct id) from table_with_metadata;

# Regression test: prevent field metadata loss per https://github.com/apache/datafusion/issues/12687
statement error DataFusion error: Internal error: Physical input schema should be the same as the one converted from logical input schema..
select array_agg(distinct id) from table_with_metadata;

query I
select distinct id from table_with_metadata order by id;
----
1
3
NULL

query I
select count(id) from table_with_metadata;
----
2

query I
select count(id) cnt from table_with_metadata group by name order by cnt;
----
0
1
1


statement ok
drop table table_with_metadata;

0 comments on commit acc63fc

Please sign in to comment.