Skip to content

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

@erenavsarogullari

Description

@erenavsarogullari

Is your feature request related to a problem or challenge?

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 instead of 15-03-2024

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 extension and add additional functional coverages for datafusion.format.* configs.

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

Describe the solution you'd like

Explained at the first section.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions