Skip to content
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

minor: port date_bin tests to sqllogictests #5115

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jan 30, 2023

Which issue does this PR close?

Part of #4853

Rationale for this change

I plan to add some additional coercion for date_bin and I want to write the tests using sqllogictest. This PR moves the test. I will build on this PR for #4853

What changes are included in this PR?

port date_bin test to use sqllogictest framework

Are these changes tested?

yes (they are tests)

Are there any user-facing changes?

no

@alamb
Copy link
Contributor Author

alamb commented Jan 30, 2023

FYI @stuartcarnie as the original author of these tests

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jan 30, 2023
@alamb alamb marked this pull request as ready for review January 30, 2023 21:21
@stuartcarnie
Copy link
Contributor

Very nice – looks like the test files are YAML?

@alamb
Copy link
Contributor Author

alamb commented Jan 30, 2023

Very nice – looks like the test files are YAML?

The test files are actually sqllite style "sqllogictest" files -- details on the format can be found in https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/tests/sqllogictests/README.md

@alamb
Copy link
Contributor Author

alamb commented Feb 1, 2023

@xudong963 or @melgenek could I trouble one of you for a review of this PR?

Copy link
Contributor

@melgenek melgenek left a comment

Choose a reason for hiding this comment

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

I guess it would be nice to understand if Datafusion wants to have type checks in sqllogictest at all.
Otherwise, query <LETTER> don't mean much for now. For example, the letter T is supposed to be "text" in sqllogictest.

It is probably easier to go DuckDBs way and check only the number of columns. And rely on arrow_type for type checks.

@alamb
Copy link
Contributor Author

alamb commented Feb 1, 2023

I guess it would be nice to understand if Datafusion wants to have type checks in sqllogictest at all.
Otherwise, query don't mean much for now. For example, the letter T is supposed to be "text" in sqllogictest.

I think adding this verification is tracked in #4499 - it seems like a valuable addition to me, but I haven't gotten around to implement it yet. I agree having a bunch of letters that look like they are checked but are silently ignored is probably worse than not having them at all

It is probably easier to go DuckDBs way and check only the number of columns. And rely on arrow_type for type checks.

That would be fine with me too

Co-authored-by: xudong.w <wxd963996380@gmail.com>
@alamb alamb merged commit 11e8906 into apache:master Feb 1, 2023
@ursabot
Copy link

ursabot commented Feb 1, 2023

Benchmark runs are scheduled for baseline = bd64527 and contender = 11e8906. 11e8906 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@alamb alamb deleted the alamb/port_datebin_tests branch July 26, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants