-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RoaringBitmap support #596
Conversation
|
您好 请问下用哪种方式去从CK里面读取RoaringBitmap比较好?直接读的话 貌似会有内存溢出的问题 |
|
目前使用什么方式读取导致内存溢出?当前版本还是建议用extended API,例如: try (ClickHouseRowBinaryInputStream in = statement.executeQueryClickhouseRowBinaryStream("SELECT * FROM my_bitmap_table")) {
...
ClickHouseBitmap bitmap = in.readBitmap(ClickHouseDataType.UInt32);
RoaringBitmap rb = (RoaringBitmap)bitmap.unwrap();
...
} |
|
|
It's so convenient |
用上面的方法单条提交没有问题,如果批量提交的话,就报 void DB::ParalleParsingBlockInputStream::onBackgroundException(): Code 33, e.displayText() = DB::Exception Cannot read all data.Bytes expected: 105. Stack trace.... |
This method will generate a large size sql script, isn't it written directly insert into a bitmap object? |
I guess you're using JDBC API which wii generate a large SQL as you said - you should use extended API. Behind the scene, in most cases, it's just about how to use input function and/or external/temp table. Starting 0.3.2, the situation has changed: 1) extended API is replaced by new Java client; and 2) you can load bitmap or use it as a query parameter using standard JDBC API. Please take a look at examples at here. |
Usage