Skip to content

Conversation

@NGA-TRAN
Copy link
Contributor

@NGA-TRAN NGA-TRAN commented Jul 2, 2025

Which issue does this PR close?

Reproducing a bug

Rationale for this change

Datadog is working on building a distributed version of DataFusion, which requires query serialization and deserialization. While testing with TPC-H queries, we found that Q16 fails during deserialization—potentially due to an issue in the serialization step. I've minimized the query to a smaller form that still reproduces the problem.

What changes are included in this PR?

Adding a test

Are these changes tested?

This is not a code change. It is a test to reproduce a bug

Are there any user-facing changes?

No

@github-actions github-actions bot added the proto Related to proto crate label Jul 2, 2025
@github-actions github-actions bot added the core Core DataFusion crate label Jul 3, 2025
@NGA-TRAN NGA-TRAN requested a review from gabotechs July 3, 2025 17:25
Copy link
Contributor

@gabotechs gabotechs left a comment

Choose a reason for hiding this comment

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

Nice catch! +1

Comment on lines 1780 to 1788
let err =
result.expect_err("Expected deserialization to fail due to type mismatch bug");
assert!(
err.to_string().contains("inlist should be same")
&& err.to_string().contains("Int64")
&& err.to_string().contains("Int32"),
"Expected type mismatch error with Int64/Int32, got: {}",
err
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Other option could be to instead of expecting the current error, write the test with the normal expectations (it succeeding), and mark it as #[ignore] with a TODO comment just above the test name.

Just giving options, don't have a strong preference, if you think it's fine as it is right now lets go with that 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree it would be better to mark this test as #[ignore] as that follows the patterns of the rest of this repo more closely

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made the test failed and ignore it. Thanks @gabotechs and @alamb

Comment on lines 1780 to 1788
let err =
result.expect_err("Expected deserialization to fail due to type mismatch bug");
assert!(
err.to_string().contains("inlist should be same")
&& err.to_string().contains("Int64")
&& err.to_string().contains("Int32"),
"Expected type mismatch error with Int64/Int32, got: {}",
err
);
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree it would be better to mark this test as #[ignore] as that follows the patterns of the rest of this repo more closely

@alamb
Copy link
Contributor

alamb commented Jul 7, 2025

Thanks @NGA-TRAN and @gabotechs

NGA-TRAN and others added 2 commits July 7, 2025 08:55
@NGA-TRAN NGA-TRAN requested a review from alamb July 7, 2025 13:04
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 @NGA-TRAN and @gabotechs

I also wonder if we should add examples / tpch serialization for all the remaining tpch queries in datafuison-proto 🤔

The clippy failure seems to be some sort of network issue unrelated to this PR

@alamb
Copy link
Contributor

alamb commented Jul 7, 2025

Actually there was a real clippy bug but I pushed a fix as I had this PR open anyways locally

@NGA-TRAN
Copy link
Contributor Author

NGA-TRAN commented Jul 7, 2025

I also wonder if we should add examples / tpch serialization for all the remaining tpch queries in datafuison-proto

Good idea. I did this in the distributed repro but I will add them here (in a different PR)

@alamb alamb merged commit 9e144b2 into apache:main Jul 7, 2025
27 checks passed
@alamb
Copy link
Contributor

alamb commented Jul 7, 2025

Thanks again @NGA-TRAN and @gabotechs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants