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

Test queries cleanup #20903

Merged
merged 5 commits into from
Mar 1, 2024
Merged

Test queries cleanup #20903

merged 5 commits into from
Mar 1, 2024

Conversation

findepi
Copy link
Member

@findepi findepi commented Mar 1, 2024

No description provided.

findepi added 5 commits March 1, 2024 14:36
Replace with non-deprecated equivalents.
`returnsEmptyResult()` can be followed by e.g. `isFullyPushedDown`, so
not always can it be replaced with `.result().isEmpty()`.
Replace with non-deprecated equivalents.
Replace with non-deprecated equivalent.
@findepi findepi added test no-release-notes This pull request does not require release notes entry labels Mar 1, 2024
@cla-bot cla-bot bot added the cla-signed label Mar 1, 2024
@github-actions github-actions bot added tests:hive iceberg Iceberg connector delta-lake Delta Lake connector hive Hive connector bigquery BigQuery connector labels Mar 1, 2024
/**
* @deprecated use {@code result().isEmpty()} instead.
*/
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

You can consider adding QueryAssert and() to ResultAssert so you can get back to top level assertions.
Not a great fan - but have seen stuff like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

i wouldn't want that. ie ResultAssert should not depend on QueryAssert. maybe there wasn't any query in the first place?

Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

looks good to me. one question.

/**
* @deprecated use {@code result().isEmpty()} instead.
*/
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

re: " Undeprecate returnsEmptyResult() "

when using isFullyPushedDown the query runs twice with and without pushdown. Why is it useful to match what the result is? e.g. we don't use matches in push down tests for example.

Copy link
Member Author

Choose a reason for hiding this comment

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

good question. when i introduced isFullyPushedDown i felt there are cases where it's valuable to assert results, as away to witness that test query is reasonable.

@findepi findepi merged commit 2942b9f into trinodb:master Mar 1, 2024
93 checks passed
@github-actions github-actions bot added this to the 440 milestone Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery BigQuery connector cla-signed delta-lake Delta Lake connector hive Hive connector iceberg Iceberg connector no-release-notes This pull request does not require release notes entry test
Development

Successfully merging this pull request may close these issues.

3 participants