Skip to content

Extend sqllogictest framework to uptake custom datafusion.format.* settings#21577

Open
erenavsarogullari wants to merge 1 commit intoapache:mainfrom
erenavsarogullari:datafusion_extend_sqllogictest_framework_for_format_configs
Open

Extend sqllogictest framework to uptake custom datafusion.format.* settings#21577
erenavsarogullari wants to merge 1 commit intoapache:mainfrom
erenavsarogullari:datafusion_extend_sqllogictest_framework_for_format_configs

Conversation

@erenavsarogullari
Copy link
Copy Markdown
Member

Which issue does this PR close?

Rationale for this change

Ref Discussion: #21355 (comment)
Currently, sqllogictest framework does not support custom datafusion.format.* configs updates and it always runs the tests with default format settings and the results as follows:
Current Behavior:

statement ok
SET datafusion.format.date_format = '%d-%m-%Y'

query D
SELECT DATE '2024-03-15'
----
Returns 2024-03-15 (as default date_format) instead of 15-03-2024.

What is the root-cause of this problem?
The reason is that sqllogictest framework needs to be extended in order to uptake datafusion.format.* settings by SessionContext instead default format settings: https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs#L239 like following expected behavior. This ticket aims to address this improvement and add additional functional coverages for datafusion.format.* configs for the custom settings.

Expected Behavior:

statement ok
SET datafusion.format.date_format = '%d-%m-%Y'

query D
SELECT DATE '2024-03-15'
----
15-03-2024

statement ok
RESET datafusion.format.date_format

query D
SELECT DATE '2024-03-15'
----
2024-03-15

What changes are included in this PR?

This PR extends sqllogictest framework to uptake custom datafusion.format.* settings and adds comprehensive test coverage for datafusion.format.* configurations.

Are these changes tested?

Yes, by adding comprehensive test coverage for datafusion.format.* configurations.

Are there any user-facing changes?

No

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Apr 12, 2026
@erenavsarogullari
Copy link
Copy Markdown
Member Author

erenavsarogullari commented Apr 12, 2026

@alamb This PR aims to fix #21355 (comment). It is ready for the review when you have chance. Thanks in advance.

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.

Extend sqllogictest framework to uptake custom datafusion.format.* settings

1 participant