ClickHouseStatement statement = null;
try {
statement = connection.createStatement();
ClickHouseRowBinaryInputStream in = statement.executeQueryClickhouseRowBinaryStream(sql);
ClickHouseBitmap bit = in.readBitmap(ClickHouseDataType.UInt64);
Roaring64NavigableMap obj = (Roaring64NavigableMap) bit.unwrap();
return new ExtRoaringBitmap(obj);
} catch (Exception e) {
log.error("查询位图错误 [ip:{}][sql:{}]", ip, sql, e);
throw e;
} finally {
DbUtils.close(statement);
}
网友评论