Skip to content
Snippets Groups Projects
Unverified Commit 49dd6369 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Convert simple filter with case-insensitive string function (#18374)

This is more of a quick workaround (read: hack) until we have a better
parsing infrastructure.

The idea is to have an extra argument to contains/startsWith/endsWith,
which will be "case-insensitive" if the comparison is to be carred out
by ignoring the case. If this extra argument wasn't specified, then
it'll be assumed that the case-sensitive comparison is intended.

IOW, this MBQL `["contains", X, Y`] or `["contains", X, Y,
{case-sensitive: true}]` will be equivalent to the user-visible custom
expression `CONTAINS(X)`.

Meanwhile, MBQL `["contains", X, Y, {case-sensitive: false}]`
will be mapped to the user-visible custom expresson
`CONTAINS(X, Y, "case-insensitive")`.

With this, we achieve a lossless conversion for 3 string functions
(contains, startsWith, endsWith) when involving case-sensitivity.
parent 5186f6a6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment