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

Fix expressions that shall be rewritten to LabelTagProperty #5054

Merged
merged 3 commits into from
Dec 21, 2022

Conversation

xtcyclist
Copy link
Contributor

@xtcyclist xtcyclist commented Dec 14, 2022

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Close #5051

Description:

LabelTagProperty expressions in unwind are treated as AttributeExpressions, causing property-not-found errors.

How do you solve it?

  • Rewrite them to LabelTagProperty expressions and get evaluated as such.
  • Hacked AttributeExpression to allow other hard-to-fix expressions like ListComprehensionExpression to work correctly.

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 added the ready-for-testing PR: ready for the CI test label Dec 14, 2022
@xtcyclist xtcyclist removed the ready-for-testing PR: ready for the CI test label Dec 14, 2022
@xtcyclist xtcyclist force-pushed the fix_unwind_expr branch 2 times, most recently from 5808198 to 0a07d8c Compare December 15, 2022 04:19
@xtcyclist xtcyclist added the ready-for-testing PR: ready for the CI test label Dec 15, 2022
@xtcyclist xtcyclist force-pushed the fix_unwind_expr branch 2 times, most recently from 64fa6e7 to 964e67a Compare December 15, 2022 04:50
@xtcyclist xtcyclist force-pushed the fix_unwind_expr branch 2 times, most recently from 5c6de3b to 4b3841c Compare December 15, 2022 12:46
@xtcyclist xtcyclist changed the title Fix unwind expr Fix expressions that shall be rewritten to LabelTagProperty Dec 15, 2022
@codecov-commenter
Copy link

Codecov Report

Base: 77.34% // Head: 77.31% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (06dd8ca) compared to base (fd46ba9).
Patch coverage: 85.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5054      +/-   ##
==========================================
- Coverage   77.34%   77.31%   -0.03%     
==========================================
  Files        1105     1105              
  Lines       82127    82148      +21     
==========================================
- Hits        63518    63511       -7     
- Misses      18609    18637      +28     
Impacted Files Coverage Δ
src/common/expression/AttributeExpression.cpp 94.59% <83.33%> (-3.74%) ⬇️
src/graph/validator/MatchValidator.cpp 89.52% <100.00%> (+0.01%) ⬆️
...rc/meta/processors/config/ListConfigsProcessor.cpp 75.00% <0.00%> (-20.84%) ⬇️
src/meta/processors/BaseProcessor.h 76.92% <0.00%> (-15.39%) ⬇️
src/graph/executor/query/TraverseExecutor.h 90.00% <0.00%> (-6.43%) ⬇️
src/common/thread/GenericWorker.h 80.76% <0.00%> (-3.85%) ⬇️
src/common/base/Status.cpp 60.75% <0.00%> (-3.35%) ⬇️
src/graph/executor/StorageAccessExecutor.h 56.81% <0.00%> (-2.28%) ⬇️
src/storage/mutate/AddVerticesProcessor.cpp 86.07% <0.00%> (-2.11%) ⬇️
...c/meta/processors/user/AuthenticationProcessor.cpp 87.35% <0.00%> (-1.92%) ⬇️
... and 32 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect result after unwind
5 participants