-
Notifications
You must be signed in to change notification settings - Fork 584
The Roaring64NavigableMap result is incorrect when the groupBitmapState query data exceeds 32 #1157
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
Comments
@chenyongyin 你好,我也碰到类似问题,请问下怎么解决 |
I think before 0.41 fix this. You could manually reverse the highToBitmap using code like the following.
|
This has been fixed in v0.4.1, but you'll have to set |
before this i have tried to set Roaring64NavigableMap.SERIALIZATION_MODE = 1,but it didn’t work。I guess it's because clickhouse serializes the result differently, because the nbHighs value in the deserializePortable method is -7240854706849841152,The correct value should be 33
陈永银
***@***.***
…------------------ 原始邮件 ------------------
发件人: "ClickHouse/clickhouse-java" ***@***.***>;
发送时间: 2023年3月16日(星期四) 晚上7:46
***@***.***>;
***@***.******@***.***>;
主题: Re: [ClickHouse/clickhouse-java] The Roaring64NavigableMap result is incorrect when the groupBitmapState query data exceeds 32 (Issue #1157)
This has been fixed in v0.4.1, but you'll have to set Roaring64NavigableMap.SERIALIZATION_MODE to Roaring64NavigableMap.SERIALIZATION_MODE_PORTABLE at least once before serialization happens. It's probably better to drop RoaringBitmap dependency and move tailored code into the Java client for ease of use and better performance.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Please feel free to re-open the issue if v0.4.1 does not work for you. If you're looking for an working example, you may check the test at here. |
sorry,I don't have set Roaring64NavigableMap.SERIALIZATION_MODE = 1 in v0.4.1,I'll try again later。
陈永银
***@***.***
…------------------ 原始邮件 ------------------
发件人: "ClickHouse/clickhouse-java" ***@***.***>;
发送时间: 2023年3月16日(星期四) 晚上7:46
***@***.***>;
***@***.******@***.***>;
主题: Re: [ClickHouse/clickhouse-java] The Roaring64NavigableMap result is incorrect when the groupBitmapState query data exceeds 32 (Issue #1157)
This has been fixed in v0.4.1, but you'll have to set Roaring64NavigableMap.SERIALIZATION_MODE to Roaring64NavigableMap.SERIALIZATION_MODE_PORTABLE at least once before serialization happens. It's probably better to drop RoaringBitmap dependency and move tailored code into the Java client for ease of use and better performance.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
clickhouse version:22.5.1.2079
clickhouse-jdbc version:0.3.2-patch11
description:The Roaring64NavigableMap result is incorrect when the groupBitmapState query data exceeds 32
test code:
` @test
public void queryAssociatedMemberData() throws SQLException, IOException {
ClickHouseConnection conn = dataSource.getConnection();
ClickHouseStatement statement = conn.createStatement();
ClickHouseRowBinaryInputStream clickHouseRowBinaryInputStream = statement.executeQueryClickhouseRowBinaryStream("SELECT groupBitmapState (submit_id) FROM ( select submit_id FROM test_table order by submit_id desc LIMIT 32 )");
ClickHouseBitmap bit = clickHouseRowBinaryInputStream.readBitmap(ClickHouseDataType.UInt64);
Roaring64NavigableMap obj = (Roaring64NavigableMap) bit.unwrap();
System.out.println(Arrays.toString(obj.toArray()));
}
`
The text was updated successfully, but these errors were encountered: