Fix Java client time column access throwing ArrayIndexOutOfBoundsException for non-long typed getters
还没有人认领这个 Issue。
评估
调研方向
从 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:
getBooleanByTsBlockColumnIndexgetIntByTsBlockColumnIndexgetFloatByTsBlockColumnIndexgetDoubleByTsBlockColumnIndexgetBinaryByTsBlockColumnIndexgetObjectByTsBlockColumnIndex
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iotdb 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports success 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
相似的 Issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
apache/flink-agents#1152 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
jenkinsci/blueocean-plugin#5417 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
objectionary/eo-graphs#75 ·