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 ColumnExpression encode and decode are not matched #4413

Merged
merged 4 commits into from
Jul 18, 2022
Merged

Fix ColumnExpression encode and decode are not matched #4413

merged 4 commits into from
Jul 18, 2022

Conversation

Linary
Copy link
Contributor

@Linary Linary commented Jul 13, 2022

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

#4412

Description:

How do you solve it?

Let ColumnExpression writeTo encoder via Value instead of size_t

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
  • N/A

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

@CLAassistant
Copy link

CLAassistant commented Jul 13, 2022

CLA assistant check
All committers have signed the CLA.

@Sophie-Xie Sophie-Xie requested a review from dutor July 14, 2022 02:45
@Sophie-Xie Sophie-Xie added the ready-for-testing PR: ready for the CI test label Jul 14, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #4413 (069d0a2) into master (7079ef5) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4413      +/-   ##
==========================================
+ Coverage   84.53%   84.62%   +0.08%     
==========================================
  Files        1345     1345              
  Lines      134046   134045       -1     
==========================================
+ Hits       113318   113435     +117     
+ Misses      20728    20610     -118     
Impacted Files Coverage Δ
src/common/expression/ColumnExpression.cpp 95.45% <100.00%> (+50.00%) ⬆️
...rc/common/expression/test/ColumnExpressionTest.cpp 100.00% <100.00%> (ø)
src/graph/context/Result.cpp 70.00% <0.00%> (-7.78%) ⬇️
src/common/thread/GenericWorker.h 80.76% <0.00%> (-3.85%) ⬇️
src/common/base/Status.h 90.56% <0.00%> (-1.89%) ⬇️
src/graph/optimizer/Optimizer.cpp 91.52% <0.00%> (-1.70%) ⬇️
src/codec/RowReaderWrapper.h 95.08% <0.00%> (-1.64%) ⬇️
src/storage/mutate/AddEdgesProcessor.cpp 76.71% <0.00%> (-1.53%) ⬇️
src/common/meta/ServerBasedSchemaManager.cpp 84.37% <0.00%> (-1.05%) ⬇️
src/storage/admin/RebuildIndexTask.cpp 72.54% <0.00%> (-0.66%) ⬇️
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7079ef5...069d0a2. Read the comment docs.

@Sophie-Xie Sophie-Xie requested a review from codesigner July 14, 2022 08:08
@@ -34,7 +34,7 @@ void ColumnExpression::accept(ExprVisitor *visitor) {

void ColumnExpression::writeTo(Encoder &encoder) const {
encoder << kind_;
encoder << index_;
encoder << Value(index_);
Copy link
Contributor

Choose a reason for hiding this comment

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

ReadSize in decoder is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@Linary
Copy link
Contributor Author

Linary commented Jul 15, 2022

please review again?

@Sophie-Xie Sophie-Xie removed the request for review from codesigner July 18, 2022 01:43
@Sophie-Xie Sophie-Xie linked an issue Jul 18, 2022 that may be closed by this pull request
@Sophie-Xie Sophie-Xie added this to the v3.3.0 milestone Jul 18, 2022
Copy link
Contributor

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

@Sophie-Xie Sophie-Xie merged commit 930afc1 into vesoft-inc:master Jul 18, 2022
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.

ColumnExpression encode and decode are not matched
6 participants