Hello, when running the following Presto query on ...
# troubleshooting
n
Hello, when running the following Presto query on top of Presto-Pinot-connector:
SELECT id FROM role_with_company WHERE (isPartialAdmin IS NULL)=true AND company='{company_id}'
I get -for some values of
company_id
- the following
java.lang.IndexOutOfBoundsException
exception back:
Copy code
PrestoExternalError(type=EXTERNAL, name=PINOT_EXCEPTION, message="Query SELECT "id" FROM role_with_company WHERE  (("company" = {company_id}) AND (("isPartialAdmin" IS NULL) = true)) LIMIT 100000 encountered exception {"message":"QueryExecutionError:\njava.lang.IndexOutOfBoundsException\n\tat java.base/java.nio.Buffer.checkIndex(Buffer.java:687)\n\tat java.base/java.nio.DirectCharBufferU.get(DirectCharBufferU.java:269)\n\tat org.roaringbitmap.buffer.MappeableArrayContainerCharIterator.nextAsInt(MappeableArrayContainer.java:1876)\n\tat org.roaringbitmap.buffer.ImmutableRoaringBitmap$ImmutableRoaringIntIterator.next(ImmutableRoaringBitmap.java:113)","errorCode":200} with pinot query "SELECT "id" FROM role_with_company WHERE  (("company" = {company_id}) AND (("isPartialAdmin" IS NULL) = true)) LIMIT 100000"", query_id=20220928_202056_30456_i2zba)
isPartialAdmin is a boolean dimension dictionary-encoded field. The error is happening very frequently.
👀 1
We run Pinot 0.10 version (ST v0.4)
m
Seems like related to null support.
r
Does the query run directly on Pinot?
n
@Mayank if you are referring to proper null support outside filter predicate, this is not enabled for these queries (this is v0.10)
m
isPartialAdmin IS NULL
-> You probably have null vector for this one right?
n
yes
m
That null vector is a RoarringBitMap. So I am suspecting something went wrong there to lead to IndexOutOfBound. (speculation)
n
@Jackie ^
j
The exception is thrown from RoaringBitmap library
Do you encounter the same exception if doing
SELECT id FROM role_with_company WHERE isPartialAdmin IS NULL AND company='{company_id}'
?
n
it works
do you know if this issue is potentially fixed in Pinot 0.11 or still need to get fixed?
j
I think it should be fixed in 0.11 as we added
IsNullTransformFunction
here
thankyou 1
But again, you should avoid writing the query this way because it will be solved as an EQUAL predicate over an expression, which is more expensive than directly solving the IS_NULL predicate
We should consider auto-rewrite it though
n
It is a bit complicated since we translate from a domain-specific query language to SQL automatically, but we plan to look into specializing this logic path.