[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 摘要。