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

Expand LIKE simplification #13260

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Nov 5, 2024

  1. Fix incorrect ... LIKE '%' simplification

    `expr LIKE '%'` was previously simplified to `true`, but the expression
    returns `NULL` when `expr` is null.
    The conversion was conditional on `!is_null(expr)` which means "is not
    always true, i.e. is not a null literal".
    
    This commit adds correct simplification logic. It additionally expands
    the rule coverage to include string view (Utf8View) and large string
    (LargeUtf8). This allows writing shared test cases even despite
    `utf8_view LIKE '%'` returning incorrect results at execution time
    (tracked by apache#12637). I.e. the
    simplification masks the bug for cases where pattern is statically
    known.
    findepi committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    aa98a7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f4798a1 View commit details
    Browse the repository at this point in the history
  3. Expand LIKE simplification

    - cover expression known not to be null
    - cover NULL pattern
    - cover repeated '%%' in pattern
    findepi committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    be26107 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6c57af7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e4eae46 View commit details
    Browse the repository at this point in the history