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

feat: Add aggregate expression fuzz testing in CI #1374

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Feb 6, 2025

Which issue does this PR close?

Part of #1345

Rationale for this change

We want to add randomized testing to help prevent regressions and increase test coverage.

What changes are included in this PR?

  • Add a framework for aggregate expressions to report which input types are supported
  • Add checks to QueryPlanSerde using the new framework
  • Add a fuzz test suite that will invoke the aggregate expressions for the types that they say they support

How are these changes tested?

New test, enabled in CI.

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.17%. Comparing base (f09f8af) to head (b6a7cda).
Report is 21 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #1374       +/-   ##
=============================================
- Coverage     56.12%   39.17%   -16.95%     
- Complexity      976     2065     +1089     
=============================================
  Files           119      262      +143     
  Lines         11743    60327    +48584     
  Branches       2251    12836    +10585     
=============================================
+ Hits           6591    23635    +17044     
- Misses         4012    32221    +28209     
- Partials       1140     4471     +3331     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andygrove andygrove closed this Feb 7, 2025
@andygrove andygrove reopened this Feb 7, 2025
// ok
} else {

def almostEqual(a: Double, b: Double, tolerance: Double = 1e-6f): Boolean = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there are multiple identical definitions of almostEqual?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the code is hacky and experimental. Will clean up before marking as ready for review.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, the two implementations of almostEqual have different input types (float vs double).

// ok
} else {

def almostEqual(a: Double, b: Double, tolerance: Double = 1e-6f): Boolean = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same implementation as above


val scanTypes = Seq(
CometConf.SCAN_NATIVE_COMET
/*CometConf.SCAN_NATIVE_DATAFUSION,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we plan to have these scan implementations also added to the fuzz testing at some point?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. These are commented out for now because they fail due to timestamp issues.

@andygrove andygrove changed the title feat: [wip] experimental fuzz testing in test suite feat: Add aggregate expression fuzz testing in CI Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants