Hi everyone, I found if one column doesn't have te...
# general
m
Hi everyone, I found if one column doesn't have text index, and I use
TEXT_MATCH
function on it as predicate expression, like this:
Copy code
select * from transcript where TEXT_MATCH(firstName, 'firstName*') limit 10
it will throw exception like this:
Copy code
[
  {
    "message": "QueryExecutionError:\njava.lang.NullPointerException\n\tat org.apache.pinot.core.operator.filter.TextMatchFilterOperator.getNextBlock(TextMatchFilterOperator.java:45)\n\tat org.apache.pinot.core.operator.filter.TextMatchFilterOperator.getNextBlock(TextMatchFilterOperator.java:30)\n\tat org.apache.pinot.core.operator.BaseOperator.nextBlock(BaseOperator.java:49)\n\tat org.apache.pinot.core.operator.DocIdSetOperator.getNextBlock(DocIdSetOperator.java:62)",
    "errorCode": 200
  },
  {
    "message": "QueryExecutionError:\njava.lang.NullPointerException\n\tat org.apache.pinot.core.operator.filter.TextMatchFilterOperator.getNextBlock(TextMatchFilterOperator.java:45)\n\tat org.apache.pinot.core.operator.filter.TextMatchFilterOperator.getNextBlock(TextMatchFilterOperator.java:30)\n\tat org.apache.pinot.core.operator.BaseOperator.nextBlock(BaseOperator.java:49)\n\tat org.apache.pinot.core.operator.DocIdSetOperator.getNextBlock(DocIdSetOperator.java:62)",
    "errorCode": 200
  }
]
Is
TEXT_MATCH
function only used by text index columns? Like Presto, if they can't predicate expressions to connectors, they will add filter operator on top of it.So maybe it's better for users to use pql if pinot supports this syntax too?
k
Here is the latest code for that class from the current snapshot. For reference.
It's possible that
_textIndexReader
is null here, which is why that exception is getting thrown. I would open up a new issue and explain that this needs better exception handling and error reporting.
k
@User you can use TEXT_MATCH udf only on columns that have textIndexEnabled on other columns you can use like or regexp_like
m
Thanks, regexp_like works for me.