Clickhouset通过JDBC直接查询Bitmap

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)