Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#17,407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java
Domain
databases

Research direction

Start in IoTDBRpcDataSet.java and inspect the six affected ByTsBlockColumnIndex getter methods alongside getLongByTsBlockColumnIndex and getStringByTsBlockColumnIndex. Verify the tree-model time-column path, then run the relevant Java client tests if available; done means all listed non-long getters report a clear StatementExecutionException instead of accessing column -1.

Written by the indexing model from the issue text.

Description

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!
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 8h
Merged PRs (30d)
129

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iotdb

All issues in apache/iotdb

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.