Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented May 19, 2025

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Add a test showing the impact of setting datafusion.execution.collect_statistics via SQL

Are these changes tested?

Only tests

Are there any user-facing changes?

No, just tests

@alamb alamb marked this pull request as draft May 19, 2025 13:13
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label May 19, 2025
01)CoalesceBatchesExec: target_batch_size=8192, statistics=[Rows=Absent, Bytes=Absent, [(Col[0]:)]]
02)--FilterExec: column1@0 = 1, statistics=[Rows=Absent, Bytes=Absent, [(Col[0]: Min=Exact(Int64(1)) Max=Exact(Int64(1)))]]
03)----RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=2, statistics=[Rows=Absent, Bytes=Absent, [(Col[0]:)]]
04)------DataSourceExec: file_groups={2 groups: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet_statistics/test_table/0.parquet], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet_statistics/test_table/1.parquet]]}, projection=[column1], file_type=parquet, predicate=column1@0 = 1, pruning_predicate=column1_null_count@2 != row_count@3 AND column1_min@0 <= 1 AND 1 <= column1_max@1, required_guarantees=[column1 in (1)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is incorrect -- the statistics should be present in this query

statement ok
set datafusion.explain.show_statistics = true;

# By default, the statistics are gathered
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# By default, the statistics are gathered
# By default, the statistics are NOT gathered

@alamb
Copy link
Contributor Author

alamb commented May 19, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant