Skip to content

clp-s: Fix search bug caused by NarrowTypes (fixes #254)#263

Merged
gibber9809 merged 10 commits into
y-scope:mainfrom
gibber9809:fix-254
Feb 15, 2024
Merged

clp-s: Fix search bug caused by NarrowTypes (fixes #254)#263
gibber9809 merged 10 commits into
y-scope:mainfrom
gibber9809:fix-254

Conversation

@gibber9809

Copy link
Copy Markdown
Contributor

References

Fixes #254

Description

This PR fixes a bug in NarrowTypes where we weren't considering an edge case involving not equals operations on string columns. See #254 for more details.

The fix also includes an optimization to avoid blowing up the AST for long not equals clauses on the same column.

Validation performed

wraymo
wraymo previously approved these changes Feb 15, 2024

@wraymo wraymo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great PR! One minor thing is about how we initialize values. I guess for class members we will use {}, but for variables declared in a function, I'm not sure if we want to follow the same style. Other than that, it looks good to me.

@kirkrodrigues kirkrodrigues left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor writing comments.

Comment thread components/core/src/clp_s/search/ColumnDescriptor.hpp Outdated
bool matches_exactly(LiteralTypeBitmask mask) override { return m_flags == mask; }

/**
* Equal to operator to allow comparison between two column descriptors.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ditto comment about docstring.

Comment thread components/core/src/clp_s/search/NarrowTypes.cpp Outdated
Comment thread components/core/src/clp_s/search/NarrowTypes.cpp Outdated
gibber9809 and others added 2 commits February 15, 2024 14:30
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
wraymo
wraymo previously approved these changes Feb 15, 2024

@kirkrodrigues kirkrodrigues left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Commit msg: clp-s: Handle multiple string types when narrowing types in a != filter (fixes #254).?

@gibber9809 gibber9809 merged commit a7368cf into y-scope:main Feb 15, 2024
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
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.

Schema matching fails on query with negated varstring and clpstring filters on same key

3 participants