[client-v2] Review hasNext() logic in `com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader`

未關閉
#3,365 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
55/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
java
領域
database

研究方向

Start with com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader#hasNext and the two failures reported in NativeFormatReaderDataSetTest, which exercise dataset reads. Trace how the readers check for end of stream and how repeated hasNext() calls affect the next operation. Done means reader checks are idempotent, the tests can read the expected rows, and no extra work is done for the next operation.

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

描述

area:client-read client-api-v2 planned_work
Description

Methods like com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader#hasNext should be idempotent.
Beside current readers may do too complex logic of checking end of stream

  • make all reader idempotent method - idempotent
  • add tests reading enough data from DB to verify work of the reader
  • make sure no extra work is done for next operation.

Update:
Two failing tests:

[ERROR] Failures: 
[ERROR]   NativeFormatReaderDataSetTest>AbstractAccessorDataSetTest.testReadDataSet:118->AbstractBinaryReaderDataSetTest.readAndVerify:81 More rows than in the data set: 12 expected [true] but found [false]
[ERROR]   NativeFormatReaderDataSetTest>AbstractAccessorDataSetTest.testReadDataSet:118->AbstractBinaryReaderDataSetTest.readAndVerify:81 More rows than in the data set: 17 expected [true] but found [false]

主要語言
Java
星號
1.6k
分支
657
平均合併
2 天 6 小時
30 天內合併 PR
36

環境準備

從這裡開始

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

ClickHouse/clickhouse-java 的其他 Issue

查看 ClickHouse/clickhouse-java 的全部 Issue

相似的 Issue

更多 Java Issue

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

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