Skip to content

ListViewVector#getElementEndIndex Returns Size not Index #470

Open
@nbauernfeind

Description

@nbauernfeind

This method is incorrectly implemented:

  @Override
  public int getElementEndIndex(int index) {
    return sizeBuffer.getInt(index * OFFSET_WIDTH);
  }

https://github.com/apache/arrow-java/blob/main/vector/src/main/java/org/apache/arrow/vector/complex/ListViewVector.java#L957-L960

The javadoc indicates this is an offset not a length:

  /** Get data vector end index with the given list index. */
  int getElementEndIndex(int index);

This issue exists in main as of 480e1be.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions