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 specific fuzz tests for cast and try_cast and fix NPE found during fuzz testing #514

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

andygrove
Copy link
Member

Which issue does this PR close?

N/A

Rationale for this change

Ongoing improvements to fuzz testing.

What changes are included in this PR?

  • Add specific tests for cast and try_cast
  • Improve error handing in fuzz testing tool
  • Fix an NPE found during fuzz testing

How are these changes tested?

Manual testing

Comment on lines -2172 to -2175
optExprWithInfo(optExpr, expr, null, srcCast, trimCast)
optExprWithInfo(optExpr, expr, srcCast, trimCast)
} else {
val optExpr = scalarExprToProto(trimType, srcExpr)
optExprWithInfo(optExpr, expr, null, srcCast)
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes an NPE that was discovered during fuzz testing

Copy link
Contributor

@parthchandra parthchandra left a comment

Choose a reason for hiding this comment

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

LGTM

} else {
val optExpr = scalarExprToProto(trimType, srcExpr)
optExprWithInfo(optExpr, expr, null, srcCast)
optExprWithInfo(optExpr, expr, srcCast)
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for finding and fixing this Andy!

@andygrove
Copy link
Member Author

@kazuyukitanimura @huaxingao Could I get a committer review please

Copy link
Contributor

@huaxingao huaxingao 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 PR!

@andygrove andygrove merged commit a668a86 into apache:main Jun 4, 2024
43 checks passed
@andygrove andygrove deleted the fuzz-test-cast branch June 4, 2024 17:09
Copy link
Contributor

@kazuyukitanimura kazuyukitanimura left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@viirya viirya 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.

himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
… during fuzz testing (apache#514)

* Varius improvements to fuzz testing tool

* Fix NPE in QueryPlanSerde handling of trim expression

* format
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.

5 participants