Skip to content

Add slt tests for datafusion.execution.parquet.coerce_int96 setting #15723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2025

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Apr 15, 2025

Which issue does this PR close?

Rationale for this change

Testing a feature using slt tests ensures it is tested end to end

Turns out it was a valuable exercise, I found a bug:

  1. When datafusion.execution.parquet.coerce_int96 is set, timestamp type is still reported as Timestamp(nanoseconds) #15721

What changes are included in this PR?

Add slt tests

Are these changes tested?

They are only tests

Are there any user-facing changes?

@alamb
Copy link
Contributor Author

alamb commented Apr 16, 2025

FYI @mbutrovich

query TTT
describe int96_from_spark
----
a Timestamp(Nanosecond, None) YES
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is a reproducer showing the type is still reported as nanoseconds

query P
select * from int96_from_spark
----
2024-01-01T20:34:56.123
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can see here the output is incorrect due to the arrow-rs issue, but at least it is clear that the setting the config flag results in something different than the default

@Omega359
Copy link
Contributor

lgtm

Copy link
Contributor

@mbutrovich mbutrovich left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @alamb! I'll look at adding a new one when I fix the complex type issue.

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @alamb
there as a merge conflict

@alamb alamb merged commit cc65b72 into apache:main Apr 28, 2025
27 checks passed
@alamb alamb deleted the alamb/int96_sql_tests branch April 28, 2025 16:18
@alamb
Copy link
Contributor Author

alamb commented Apr 28, 2025

Thanks @comphead

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.

4 participants