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 struct pack bug #1515

Merged
merged 1 commit into from
May 5, 2023
Merged

Fix struct pack bug #1515

merged 1 commit into from
May 5, 2023

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented May 5, 2023

This PR fixes the struct_pack bug which is caused by inconsistent struct field vector state during query processing.
The solution is that:

  1. In functionEvaluator:
    If the parameter vector state is inconsistent with the result vector state, then we create a new structFieldVector and add it to the resultVector. Otherwise, we simply add the parameter vector to the resultVector.2;
  2. During queryExecution:
    If the parameter vector state is inconsistent with the result vector state, then we copy the value stored in parameter to structFieldVector.
    a. If the structFieldVector is flat, we copy the value to the curIdx.
    b. If the structFieldVector is unflat, we copy the value to each selectedPosition.

@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (6c9b8ae) 91.90% compared to head (c3aeb10) 91.92%.

❗ Current head c3aeb10 differs from pull request most recent head 3108a21. Consider uploading reports for the commit 3108a21 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1515      +/-   ##
==========================================
+ Coverage   91.90%   91.92%   +0.01%     
==========================================
  Files         678      678              
  Lines       24439    24458      +19     
==========================================
+ Hits        22461    22482      +21     
+ Misses       1978     1976       -2     
Impacted Files Coverage Δ
src/expression_evaluator/function_evaluator.cpp 100.00% <100.00%> (ø)
...include/function/struct/vector_struct_operations.h 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

@acquamarin acquamarin merged commit bfc1b0d into master May 5, 2023
5 checks passed
@acquamarin acquamarin deleted the struct-pack-fix branch May 5, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants