Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Fix Java client time column access throwing ArrayIndexOutOfBoundsException for non-long typed getters

未关闭 适合新手
#17,407 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
java
领域
databases

调研方向

从 IoTDBRpcDataSet.java 开始,检查受影响的六个 ByTsBlockColumnIndex getter 方法,以及 getLongByTsBlockColumnIndex 和 getStringByTsBlockColumnIndex。验证树模型的时间列路径,然后在可用时运行相关的 Java 客户端测试;完成的标准是,所有列出的非 long getter 都报告明确的 StatementExecutionException,而不是访问列 -1。

由索引模型根据 Issue 内容生成。

描述

Search before asking
  • I searched in the issues and found nothing similar.
Version

Master

Describe the bug and provide the minimal reproduce step

In IoTDBRpcDataSet.java, several ByTsBlockColumnIndex getter methods do not handle the tsBlockColumnIndex < 0 case (time pseudo-column in tree model). Only getLongByTsBlockColumnIndex and getStringByTsBlockColumnIndex correctly handle this case.

When tree model is used, column index 1 maps to tsBlockColumnIndex = -1 (time column). Accessing it through typed getters other than getLong or getString causes ArrayIndexOutOfBoundsException from TsBlock.getColumn(-1).

Affected methods:

  • getBooleanByTsBlockColumnIndex
  • getIntByTsBlockColumnIndex
  • getFloatByTsBlockColumnIndex
  • getDoubleByTsBlockColumnIndex
  • getBinaryByTsBlockColumnIndex
  • getObjectByTsBlockColumnIndex

This is the Java equivalent of the C++ client bug fixed in #17400.

What did you expect to see?

A clear StatementExecutionException with message like "Cannot read boolean from time column" instead of an opaque ArrayIndexOutOfBoundsException.

What did you see instead?

ArrayIndexOutOfBoundsException with index -1.

Anything else?

No response

Are you willing to submit a PR?
  • I'm willing to submit a PR!
主要语言
Java
星标
6.4k
派生
1.2k
平均合并
1 天 8 小时
30 天内合并 PR
129

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/iotdb 的其他 Issue

查看 apache/iotdb 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。