You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "XiangpengHao (via GitHub)" <gi...@apache.org> on 2025/07/10 22:03:45 UTC
[PR] Fix in list round trip in df proto [datafusion]
XiangpengHao opened a new pull request, #16744:
URL: https://github.com/apache/datafusion/pull/16744
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
- Closes https://github.com/apache/datafusion/issues/16665.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
Credits:
1. @ding-young for identifying the root cause, i.e., index should be applied on projection schema, not the full schema
2. Claude for fixing it
I looked at the patch and can't produce anything better than Claude
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3063812572
Thank you @XiangpengHao
FYI @NGA-TRAN and @LiaCastaneda
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "NGA-TRAN (via GitHub)" <gi...@apache.org>.
NGA-TRAN commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3062503974
@XiangpengHao: If you believe the round-trip bug reproduced in `test_round_trip_tpch_queries` from PR #16742 is distinct, we can file a separate issue and tackle it independently. @LiaCastaneda is interested and may be available to work on a fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "XiangpengHao (via GitHub)" <gi...@apache.org>.
XiangpengHao commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3059497366
Ok I run a bisect and find the code is broken since #15769, I guess it's because the filter is moved to a different sub-structure.
@adriangb can you take a look if this is the right way to fix it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3062283423
> @adriangb can you take a look if this is the right way to fix it?
I took an initial look and... I'm a bit stumped. I don't fully understand where this is running or how. What I'll say about https://github.com/apache/datafusion/pull/15769 is that it shouldn't have changed the structure of `FilterExec`. It just moves the filters from `FilterExec` into `ParquetSource`. In other words: the plan is being rewritten in the optimizer pass, but I think the final state of the ExecutionPlan tree should not have changed in terms of serialization.
But I think I need to take another look at this.
I'll be completely AFK for the the weekend until Tuesday and have an early end to my day today so if I don't get back to give a deeper analysis for this I suggest that as long as:
1. This fixes the tests.
2. Does not break any other tests (especially #16742).
It's worth just proceeding with it and I can try to find a deeper meaning to it next week.
Might also be worth asking Claude to explain _why_ this is the fix to give us pointers into what to look at?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #16744:
URL: https://github.com/apache/datafusion/pull/16744
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "XiangpengHao (via GitHub)" <gi...@apache.org>.
XiangpengHao commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3062721623
> @XiangpengHao: If you believe the round-trip bug reproduced in `test_round_trip_tpch_queries` from PR #16742 is distinct, we can file a separate issue and tackle it independently. @LiaCastaneda is interested and may be available to work on a fix.
I think it's a different bug, see https://github.com/apache/datafusion/pull/16742#issuecomment-3062716781
@LiaCastaneda feel free to fix it!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "NGA-TRAN (via GitHub)" <gi...@apache.org>.
NGA-TRAN commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3062022168
Thanks @XiangpengHao for the fix. Could you also run the tests [in this PR](https://github.com/apache/datafusion/pull/16742)? The deserialization bug only happens to 1 tpc-h queries but when I run roundtrip tests, only 4 queries pass. Hopefully, this fix will also solve that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "XiangpengHao (via GitHub)" <gi...@apache.org>.
XiangpengHao commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3062727458
> > @adriangb can you take a look if this is the right way to fix it?
>
> I took an initial look and... I'm a bit stumped. I don't fully understand where this is running or how, I haven't looked too deeply into proto serialization of plans and I don't know if DataDog is doing that before or after optimizer rules are applied, etc. What I'll say about #15769 is that it shouldn't have changed the structure of `FilterExec`. It just moves the filters from `FilterExec` into `ParquetSource`. In other words: the plan is being rewritten in the optimizer pass, but I think the final state of the ExecutionPlan tree should not have changed in terms of serialization.
>
> But I think I need to take another look at this.
>
> I'll be completely AFK for the the weekend until Tuesday and have an early end to my day today so if I don't get back to give a deeper analysis for this I suggest that as long as:
>
> 1. This fixes the tests.
> 2. Does not break any other tests (especially [Add serialization/deserialization and round-trip tests for all tpc-h queries #16742](https://github.com/apache/datafusion/pull/16742)).
>
> It's worth just proceeding with it and I can try to find a deeper meaning to it next week.
>
> Might also be worth asking Claude to explain _why_ this is the fix to give us pointers into what to look at?
Agree! I think it's not that https://github.com/apache/datafusion/pull/15769 introduces the bug, it just surfaces up the bug. I plan to dig deeper on this over the weekend.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#issuecomment-3196577165
@haohuaijin has found what seems to be a regression that may be related to this PR
- https://github.com/apache/datafusion/issues/17225
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix in list round trip in df proto [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #16744:
URL: https://github.com/apache/datafusion/pull/16744#discussion_r2201840244
##########
datafusion/proto/tests/cases/roundtrip_physical_plan.rs:
##########
@@ -1739,7 +1739,7 @@ async fn roundtrip_physical_plan_node() {
}
// Failing due to https://github.com/apache/datafusion/pull/16662
-#[ignore]
+// Fixed: Column index mismatch during protobuf deserialization
Review Comment:
```suggestion
// Test case for https://github.com/apache/datafusion/pull/16662
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org