Clickhouset通过JDBC直接查询Bitmap
作者:
和平菌 | 来源:发表于
2021-08-11 17:49 被阅读0次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);
}
本文标题:Clickhouset通过JDBC直接查询Bitmap
本文链接:https://www.haomeiwen.com/subject/mggtvktx.html
网友评论