Fix Java client time column access throwing ArrayIndexOutOfBoundsException for non-long typed getters
まだ誰も着手していません。
評価
調査の方向性
IoTDBRpcDataSet.java から開始し、影響を受ける6つの ByTsBlockColumnIndex getter メソッドを getLongByTsBlockColumnIndex および getStringByTsBlockColumnIndex と併せて調査します。ツリーモデルの時間列パスを確認し、利用可能であれば関連する Java クライアントテストを実行します。完了の条件は、列 -1 にアクセスする代わりに、列挙されたすべての non-long getter が明確な StatementExecutionException を報告することです。
索引モデルが 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時間
- マージ済み PR(30日)
- 129
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column name オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·