Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Theta preamble diagnostic misreports historical single-item images

未關閉 適合新手
#773 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
78/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
java
領域
data

研究方向

從 theta.PreambleUtil.preambleToString() 開始,檢查對於長度為一個 preamble 的 image,CurrentCount 是如何推導出來的。使用提議的單項 compact sketch serialization,只清除 single-item 旗標,並驗證診斷報告 CurrentCount: 1,同時保留 SINGLE_ITEM: false;也要確認空 image 報告 CurrentCount: 0。

由索引模型根據 Issue 內容生成。

描述

Problem

theta.PreambleUtil.preambleToString() derives CurrentCount for one-preamble-long images from SINGLEITEM_FLAG_MASK.

Historical C++ single-item images may omit that flag. Java accepts those images because the theta parser deliberately does not depend on the flag, but the diagnostic output reports CurrentCount: 0 even though the image contains one retained item.

This was identified while resolving the cross-language differences tracked in apache/datasketches-cpp#460. Current C++ now writes the flag, but older valid images still expose the diagnostic mismatch.

Expected behavior

For a one-preamble-long theta image, derive the diagnostic count from the empty flag:

  • empty image: CurrentCount: 0
  • non-empty image: CurrentCount: 1

The printed SINGLE_ITEM field should continue to reflect the serialized flag itself.

Proposed test

Serialize a single-item compact sketch, clear only the single-item flag to model a historical C++ image, and verify that preambleToString() reports CurrentCount: 1 while preserving SINGLE_ITEM: false.

主要語言
Java
星號
958
分支
226
平均合併
2 天 7 小時
30 天內合併 PR
14

環境準備

我們還沒有檢查這個專案的環境設定檔。先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/datasketches-java 的其他 Issue

查看 apache/datasketches-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。