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 filtering of the redundant decompress chunk clauses over a compressed index path #5962

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

akuzm
Copy link
Member

@akuzm akuzm commented Aug 11, 2023

We just had a bad cast inside is_redundant_derived_clause before, because it doesn't work with IndexClauses. Filtering didn't work as a result.

Disable-check: force-changelog-file
Disable-check: commit-count

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #5962 (a6180e1) into main (3a27669) will increase coverage by 0.01%.
The diff coverage is 88.23%.

@@            Coverage Diff             @@
##             main    #5962      +/-   ##
==========================================
+ Coverage   86.99%   87.01%   +0.01%     
==========================================
  Files         243      243              
  Lines       56005    55960      -45     
  Branches    12401    12384      -17     
==========================================
- Hits        48722    48694      -28     
+ Misses       4946     4900      -46     
- Partials     2337     2366      +29     
Files Changed Coverage Δ
tsl/src/nodes/decompress_chunk/decompress_chunk.c 89.03% <86.95%> (-0.27%) ⬇️
tsl/src/nodes/decompress_chunk/planner.c 85.71% <90.90%> (-0.10%) ⬇️

... and 33 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@akuzm akuzm marked this pull request as ready for review August 11, 2023 12:23
@github-actions
Copy link

@RafiaSabih, @jnidzwetzki: please review this pull request.

Powered by pull-review

if (is_redundant_derived_clause(rinfo, ipath->indexclauses))
continue; /* dup or derived from same EquivalenceClass */

ListCell *indexclause_cell = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Could you add a comment that this code is based on is_redundant_derived_clause but modified for IndexClause? This would make the code easier to read without knowing this change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added above.

Copy link
Contributor

@jnidzwetzki jnidzwetzki left a comment

Choose a reason for hiding this comment

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

Added a comment, rest looks good to me.

We just had a bad cast inside is_redundant_derived_clause before,
because it doesn't work with IndexClauses. Filtering didn't work as a
result.
We used to add join clauses that referenced a compressed column at the
level of the compressed scan, and later remove them. This is wrong and
useless, just don't add them.
@akuzm akuzm enabled auto-merge (rebase) August 16, 2023 09:27
@akuzm akuzm merged commit d088b3a into timescale:main Aug 16, 2023
35 of 38 checks passed
@akuzm akuzm deleted the redundant branch August 16, 2023 09:58
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.

4 participants