Hello, I was wondering if it was planned to add th...
# troubleshooting
e
Hello, I was wondering if it was planned to add the
LIKE
operator to
JSON_MATCH
? I’m currently using
Copy code
REGEXP_LIKE(JSONEXTRACTSCALAR("labels", '$.demande_intention', 'STRING'), 'terminal')
but it’s very slow (even with small number of scanned documents (21). And maybe having it directly with
JSON_MATCH
could speed-up this operation?
Copy code
JSON_MATCH("labels", 'demande_intention LIKE ''terminal''')
Thank you
a
Can you open an issue about it and tag me, please?
e
r
on this in particular, there are a lot of performance problems in the JsonPath library, but I've fixed a lot of them. For instance, since you mentioned that your labels are sparse, JsonPath throws an exception when it can't produce a value. Unfortunately the changes haven't been released yet.
Fixing this won't be as effective as a specialised index, but it would be interesting to see how much it helps
a
Yeah, I am only looking at supporting LIKE within JSON_MATCH
🙌 1
Even for completeness dake
Sake
e
For exceptions, I’ve seen this, I use a
JSON_MATCH(labels, 'demande_intention IS NOT NULL')
before trying to extract
r
well, the exception is still thrown but caught
e
Do you have any idea when you will be able to implement the LIKE and release it?
a
I can't promise a timeline, but should be a part of the next Pinot release for sure
e
And you think using the LIKE with JSON_MATCH will be more performant than using JSONEXTRACTSCALAR ?