[
https://issues.apache.org/jira/browse/KYLIN-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16839172#comment-16839172
]
Temple Zhou edited comment on KYLIN-3978 at 5/14/19 7:37 AM:
-------------------------------------------------------------
This issue is caused by the duplicated *SegmentQueryCacheKey*.
The SegmentQueryCacheKey will be same regardless of the value of
storageContext.isExactAggregation().
However, the storageContext.isExactAggregation() decided the bitmap format
getting from the storage,
so if you have two SQL with different isExactAggregation() and different
bitmap format, the latter will be failed because it will use the same
SegmentCache with incompatible bitmap format.
The related code(BitmapSerializer.java):
{code:java}
@Override
public BitmapCounter deserialize(ByteBuffer in) {
try {
//The length of RoaringBitmap is larger than 12
if (peekLength(in) == RESULT_SIZE) {
int flag = in.getInt();
return factory.newBitmap(in.getLong());
} else {
return factory.newBitmap(in);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
{code}
was (Author: temple.zhou):
This issue is caused by the duplicated *SegmentQueryCacheKey*.
The SegmentQueryCacheKey will be same regardless of the value of
storageContext.isExactAggregation().
However, the storageContext.isExactAggregation() decided the bitmap format
getting from the storage,
so if you have two SQL with different isExactAggregation() and different bitmap
format, the latter will be failed because it will use the same SegmentCache
with Incompatible bitmap format.
> InternalErrorException: null with precise count distinct
> --------------------------------------------------------
>
> Key: KYLIN-3978
> URL: https://issues.apache.org/jira/browse/KYLIN-3978
> Project: Kylin
> Issue Type: Bug
> Reporter: Temple Zhou
> Assignee: Temple Zhou
> Priority: Major
>
> when kylin.query.segment-cache-enabled=true and sql with precise count
> distinct, the InternalErrorException: null happens sometimes
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)