Theta sketch output doesn't match between Java and CPP
还没有人认领这个 Issue。
评估
调研方向
首先重现 issue 中展示的 Java Union 和 C++ updateThetaSketch 示例,然后比较它们在突出显示字节附近的序列化字节布局。跟踪两个实现所使用的序列化和反序列化入口点;当不同的字节得到解释,并且建立了兼容的输出或有文档记录的格式行为时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I have run a simple theta sketch computation as below in Java and CPP
Union union = Union.builder().buildUnion();
union.update(1);
union.update(2);
CompactSketch compactSketch = union.getResult();
byte[] bytes = union.getResult().toByteArray()
Java output:
02 03 03 00 00 1a cc 93 02 00 00 00 00 00 80 3f
15 f9 7d cb bd 86 a1 05 c3 97 fc 12 81 70 9d 1e
CPP :
updateThetaSketch update_sketch = updateThetaSketch::builder().build();
update_sketch.update(1);
update_sketch.update(2);
auto bytes = update_sketch.compact().serialize();
CPP output:
02 03 03 00 00 1a cc 93 02 00 00 00 00 00 00 00
15 f9 7d cb bd 86 a1 05 c3 97 fc 12 81 70 9d 1e
The output seems to not match, as we see in bold at the end of first line, 4 bytes "80 3f" is missing in CPP.
Can anyone share why this is so?
- 主要语言
- C++
- 星标
- 273
- 派生
- 88
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/datasketches-cpp 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
apache/datasketches-cpp#499 ·
-
难度 5/5 一周以上 新手友好度 35/100
apache/datasketches-cpp#502 · 11 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 45/100
apache/datasketches-cpp#457 · 8 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
apache/datasketches-cpp#419 · 6 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
apache/datasketches-cpp#416 · 13 条评论 ·
查看 apache/datasketches-cpp 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
AXERA-TECH/ax-llm#77 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
games-on-whales/wolf#509 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
-
bug-unconfirmed
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 74/100
NVIDIA/cuda-samples#453 ·