美文网首页
Clickhouset通过JDBC直接查询Bitmap

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