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

Port tests in group_by.rs to sqllogictest #8834

Merged
merged 6 commits into from
Jan 12, 2024

Conversation

hiltontj
Copy link
Contributor

@hiltontj hiltontj commented Jan 11, 2024

Which issue does this PR close?

Closes #8202

Rationale for this change

See #6195

What changes are included in this PR?

  • Port tests from datafusion/core/tests/sql/group_by.rs to group_by.slt (formerly groupby.slt)
    • group_by_date_trunc
    • group_by_limit
    • group_by_dictionary
  • Remove the old group_by.rs file

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jan 11, 2024
Comment on lines +4353 to +4364
# GROUP BY using LIMIT
query IP
SELECT c2, MAX(t1)
FROM timestamp_table
GROUP BY c2
ORDER BY MAX(t1) DESC
LIMIT 4;
----
9 2020-12-19T00:00:00
8 2020-12-18T00:00:00
7 2020-12-17T00:00:00
6 2020-12-16T00:00:00
Copy link
Contributor Author

@hiltontj hiltontj Jan 11, 2024

Choose a reason for hiding this comment

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

This, along with the following EXPLAIN query, is intended to cover the original group_by_limit test. In the original test, the table used was different in that the trace_id column was UTF8, vs. INT here. I am re-using the same table from the date_trunc test here for convenience, but I believe this still maintains the assertions being made.

@hiltontj hiltontj marked this pull request as ready for review January 12, 2024 10:26
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @hiltontj -- this looks good to me and is very much appreciated 🙏

@alamb alamb merged commit 8353a2c into apache:main Jan 12, 2024
23 checks passed
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.

Port tests in group_by.rs to sqllogictest
2 participants