Possible bug with custom filters


(Richard) #1

Some of our users are building large custom filters in Google Sheets to copy into a Look. We’ve noticed that filters such as

contains(${web_stats.landing_page}, "ulr_1") OR
contains(${web_stats.landing_page}, "ulr_2") OR
contains(${web_stats.landing_page}, "ulr_2") OR ...

that contain 50 or more arguments produce this error: nesting of 101 is too deep. Obviously there’s no need for a customer filter here but it seems to be required by users creating large filters semi-automatically.

I’ve also noticed that contains() is case-sensitive, despite us having the model parameter case_sensitive: false.

We’re using Looker 3.56.12 & Redshift.

Not a big one but thought I’d mention…


(Dave Hunsinger) #2

Hi Rich -

Can you do me a favor and email support at looker about this issue? I’d like to get it in to our tracking systems and associated with your account. Thanks!


(Richard) #3

No problem - have done.


(Brian Pogrund) #4

We are having the exact same issue. I know it’s only been a week since you heard about it, but do you know if a fix is on the way? Or, is there a workaround?


(Brian Pogrund) #5

We are having the exact same issue. I know it’s only been a week since you heard about it, but do you know if a fix is on the way? Or, is there a workaround?


(Richard) #6

Hi Brian,

Looker have replied to confirm this is a reproducible bug that will get fixed, but I don’t know when. They’ve also confirmed that these filters are always case-sensitive in Redshift which they will also change at some point.

Sorry, no work-around other than asking our users not to do that!


(Margaret Trinh) #7

I’m still experiencing this bug with the case sensitivity =/


(lloyd tabb) #8

Sorry, Margaret. We probably won’t make the contains function respect the setting of case_sensitive in the model. When expressing something as a function we really want it always return the same result. Since the function can take an arbitrary value as input and you can set case_sensitive on a field by field basis, things start to get really complex.

All that said, you can achieve the desired result by using an upper or lower function and being more explicit. The following code would match both ugly and UGLY.

contains(upper(${foo.d}),"UGLY")