Skip to content

Commit

Permalink
[SPARK-20473] Enabling missing types in ColumnVector.Array
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?
ColumnVector implementations originally did not support some Catalyst types (float, short, and boolean). Now that they do, those types should be also added to the ColumnVector.Array.

## How was this patch tested?
Tested using existing unit tests.

Author: Michal Szafranski <[email protected]>

Closes #17772 from michal-databricks/spark-20473.
  • Loading branch information
michal-databricks authored and rxin committed Apr 26, 2017
1 parent 66dd5b8 commit 99c6cf9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ public Object[] array() {

@Override
public boolean getBoolean(int ordinal) {
throw new UnsupportedOperationException();
return data.getBoolean(offset + ordinal);
}

@Override
public byte getByte(int ordinal) { return data.getByte(offset + ordinal); }

@Override
public short getShort(int ordinal) {
throw new UnsupportedOperationException();
return data.getShort(offset + ordinal);
}

@Override
Expand All @@ -199,7 +199,7 @@ public short getShort(int ordinal) {

@Override
public float getFloat(int ordinal) {
throw new UnsupportedOperationException();
return data.getFloat(offset + ordinal);
}

@Override
Expand Down

0 comments on commit 99c6cf9

Please sign in to comment.