Theta sketch output doesn't match between Java and CPP
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the Java Union and C++ updateThetaSketch examples shown in the issue, then compare their serialized byte layouts around the highlighted bytes. Trace the serialization and deserialization entry points used by both implementations; done means the differing bytes are explained and compatible output or documented format behavior is established.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- C++
- Stars
- 273
- Forks
- 88
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/datasketches-cpp
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/datasketches-cpp#499 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
apache/datasketches-cpp#502 · 11 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
apache/datasketches-cpp#457 · 8 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
apache/datasketches-cpp#419 · 6 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/datasketches-cpp#416 · 13 comments ·
All issues in apache/datasketches-cpp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100