Hello everyone, I have an offline Pinot table with...
# troubleshooting
m
Hello everyone, I have an offline Pinot table with a STRING multi valued column and when I try this request :
Copy code
select distinct myMultiValuedColumn from MyTable where otherColumn in ('MY_VALUE') limit 1000
I have this error :
Copy code
"message": "QueryExecutionError:\njava.lang.UnsupportedOperationException\n\tat org.apache.pinot.segment.spi.index.reader.ForwardIndexReader.readDictIds(ForwardIndexReader.java:84)\n\tat org.apache.pinot.core.common.DataFetcher$ColumnValueReader.readDictIds(DataFetcher.java:418)\n\tat org.apache.pinot.core.common.DataFetcher.fetchDictIds(DataFetcher.java:89)\n\tat org.apache.pinot.core.common.DataBlockCache.getDictIdsForSVColumn(DataBlockCache.java:109)",
    "errorCode": 200
If I remove the distinct or the where clause, I have no issue. Am I missing something ? Thank you !
m
Seems like Distinct is not supported for MV columns. Is this expected @Jackie? If not, what’s the issue here? If yes, can we fix the error message, as well document this?
m
@Mayank distinct seems to work fine when there is no where clause
it is used in our Superset dashboard when filters are loaded
and it works fine so far
but when a "where clause" is added we have the error
m
Hmm, what version of Pinot are you using?
m
we use 0.10 version
m
Ok, this doesn’t seem expected. Could you file a GH issue?
m
sure
👍 1
m
Thanks
s
@Mathieu Druart can you share your tableConfig? Are you using raw encoding for any of the multivalue columns?
j
@Mathieu Druart Pinot does not support distinct on MV column yet. The reason why it works without a filter is because Pinot will use dictionary to solve the query if there is no filter and only one single column within the distinct. Will comment under the issue
👍 1
m
thanks @Jackie is this functionality planned or not for the moment?
m
Can we improve error message and docs?
m
and do you know if it is relaiable/safe to use distinct on MV column this way (I mean with no filter and only one single column) ?
j
@Mayank Will create an issue, and we can support the simple single column scenario first and enhance the error message
🙏 2
@Mathieu Druart Yes, for single MV column without a filter, Pinot will return all the distinct values for the MV column
👍 1
Actually we already merged a PR to enhance the error message: https://github.com/apache/pinot/pull/8386
❤️ 1
👍 1
m
Nice!