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

Remove the pruning of Expression::Kind::kVarProperty in agg. #4990

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

xtcyclist
Copy link
Contributor

@xtcyclist xtcyclist commented Dec 5, 2022

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Close #4974

Description:

match (v0:player)-[e0]->(v1) where id(v0) == "Tim Duncan" unwind e0.start_year as a return count(a)

$a was pruned in this query, causing the unwind operator to produce NULL dataset, which in the end leads to wrong counting results.

How do you solve it?

Disable the pruning of Expression::Kind::kVarProperty and Expression::Kind::kInputProperty in PropertyTrackerVisitor.

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • TCK

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

@xtcyclist xtcyclist marked this pull request as draft December 5, 2022 15:14
@xtcyclist xtcyclist added the ready-for-testing PR: ready for the CI test label Dec 5, 2022
@xtcyclist xtcyclist marked this pull request as ready for review December 5, 2022 15:20
@xtcyclist xtcyclist changed the title Count nulls and fix the pruning of properties needed by agg after unwind Count nulls and fix the pruning of Expression::Kind::kVarProperty in agg. Dec 5, 2022
@xtcyclist xtcyclist changed the title Count nulls and fix the pruning of Expression::Kind::kVarProperty in agg. Count nulls and remove the pruning of Expression::Kind::kVarProperty in agg. Dec 5, 2022
@xtcyclist xtcyclist force-pushed the fix_unwind branch 2 times, most recently from 6ee10a5 to 099797c Compare December 5, 2022 15:50
@xtcyclist xtcyclist changed the title Count nulls and remove the pruning of Expression::Kind::kVarProperty in agg. Remove the pruning of Expression::Kind::kVarProperty in agg. Dec 5, 2022
yixinglu
yixinglu previously approved these changes Dec 6, 2022
@codecov-commenter
Copy link

Codecov Report

Base: 76.86% // Head: 76.82% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (bcbc623) compared to base (8adec8d).
Patch coverage: 95.74% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4990      +/-   ##
==========================================
- Coverage   76.86%   76.82%   -0.05%     
==========================================
  Files        1105     1105              
  Lines       81432    81473      +41     
==========================================
- Hits        62594    62588       -6     
- Misses      18838    18885      +47     
Impacted Files Coverage Δ
src/graph/executor/query/TraverseExecutor.h 100.00% <ø> (ø)
src/meta/processors/parts/ListHostsProcessor.cpp 69.52% <0.00%> (-2.77%) ⬇️
src/clients/meta/MetaClient.cpp 76.07% <100.00%> (-0.45%) ⬇️
src/common/function/FunctionManager.cpp 79.40% <100.00%> (+0.12%) ⬆️
src/graph/optimizer/rule/PushEFilterDownRule.cpp 78.35% <100.00%> (-0.44%) ⬇️
src/graph/visitor/PropertyTrackerVisitor.cpp 82.71% <100.00%> (+0.41%) ⬆️
src/meta/processors/admin/HBProcessor.cpp 89.04% <100.00%> (+0.15%) ⬆️
src/meta/processors/job/StorageJobExecutor.cpp 78.99% <100.00%> (ø)
src/meta/processors/listener/ListenerProcessor.cpp 69.90% <100.00%> (ø)
src/storage/StorageServer.cpp 80.27% <100.00%> (ø)
... and 38 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@xtcyclist xtcyclist merged commit 2bc6f83 into vesoft-inc:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect unwind result
4 participants