You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/30 13:39:31 UTC

[GitHub] [pinot] Eywek opened a new issue #7842: feature request: `LIKE` operator in `JSON_MATCH`

Eywek opened a new issue #7842:
URL: https://github.com/apache/pinot/issues/7842


   Hello,
   
   I was wondering if it was planned to add the LIKE operator to JSON_MATCH ? I’m currently using
   ```sql
   REGEXP_LIKE(JSONEXTRACTSCALAR("labels", '$.demande_intention', 'STRING'), 'terminal')
   ```
   but it’s very slow (even with small number of scanned documents (21). And I was thinking that maybe having it directly with JSON_MATCH could speed-up this operation?
   ```sql
   JSON_MATCH("labels", 'demande_intention LIKE ''terminal''')
   ```
   
   Thank you
   
   cc @atris 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] richardstartin commented on issue #7842: feature request: `LIKE` operator in `JSON_MATCH`

Posted by GitBox <gi...@apache.org>.
richardstartin commented on issue #7842:
URL: https://github.com/apache/pinot/issues/7842#issuecomment-982651511


   Hi @Eywek how slow is "very slow"? 
   
   Is there a natural way for you to filter the JSON documents before applying the `JSONEXTRACTSCALAR` and `REGEXP_LIKE` functions? Without an index structured to support these functions, they are naturally quite expensive.
   
   Have you considered extracting `$.demande_intention` into a text column during ingestion so you can create a text index on it, instead of storing it embedded in JSON?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Eywek commented on issue #7842: feature request: `LIKE` operator in `JSON_MATCH`

Posted by GitBox <gi...@apache.org>.
Eywek commented on issue #7842:
URL: https://github.com/apache/pinot/issues/7842#issuecomment-982655500


   > how slow is "very slow"?
   
   ~600-800ms for 21 documents (vs 22-40ms without this filter)
   
   
   > Is there a natural way for you to filter the JSON documents before applying the `JSONEXTRACTSCALAR` and `REGEXP_LIKE` functions? Without an index structured to support these functions, they are naturally quite expensive.
   
   I'm using a JSON index on the column and operations like `JSON_MATCH(labels, 'demande_intention  = ''foo''')` are fast (30-40ms)
   
   > Have you considered extracting `$.demande_intention` into a text column during ingestion so you can create a text index on it, instead of storing it embedded in JSON?
   
   Yep I know it would be the best way to do it but since the `labels` column contains dynamic data, we don't want to add each field of the JSON object to the schema


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org