Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Aug 3, 2023

Which issue does this PR close?

Related to #5885

Rationale for this change

As DataFusion's memory limiting gets more sophisticated so do the tests for these limits. I made them better in #7131 and #7130 but they could be more self describing

What changes are included in this PR?

Complete switching memory_limit tests to builder style so each test reads more fluently and it is easier to understand what is going on

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Aug 3, 2023
@alamb alamb marked this pull request as draft August 3, 2023 20:48
@alamb alamb force-pushed the alamb/sort_test_cleanup branch from 8fc21b6 to 30c5254 Compare August 9, 2023 18:43
@github-actions github-actions bot removed the sqllogictest SQL Logic Tests (.slt) label Aug 9, 2023
@alamb alamb changed the title Minor: refine memory_limit tests Minor: make memory_limit tests more self describing Aug 18, 2023
"select * from t order by host DESC",
vec![
TestCase::new()
.with_query("select * from t order by host DESC")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the major change is that by using a builder pattern, now the tests are more explicit about what the values are

@alamb alamb marked this pull request as ready for review August 18, 2023 14:01
Copy link
Contributor

@metesynnada metesynnada 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 for the effort.

@alamb
Copy link
Contributor Author

alamb commented Aug 18, 2023

Thank you for the review @metesynnada

Copy link
Member

@yjshen yjshen left a comment

Choose a reason for hiding this comment

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

After the refactor, the builder-style tests appear much clearer; thanks @alamb!

@yjshen yjshen merged commit 672f5bd into apache:main Aug 18, 2023
@alamb alamb deleted the alamb/sort_test_cleanup branch August 21, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants