Java Code Examples for org.apache.spark.sql.vectorized.ColumnarArray

The following examples show how to use org.apache.spark.sql.vectorized.ColumnarArray. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
final ColumnarArray getArray(int rowId) {
  ArrowBuf offsets = accessor.getOffsetBuffer();
  int index = rowId * ListVector.OFFSET_WIDTH;
  int start = offsets.getInt(index);
  int end = offsets.getInt(index + ListVector.OFFSET_WIDTH);
  return new ColumnarArray(arrayData, start, end - start);
}
 
Example 2
@Override
public ColumnarArray getArray(int rowId) {
  if (isNullAt(rowId)) {
    return null;
  }
  return accessor.getArray(rowId);
}
 
Example 3
@Override
final ColumnarArray getArray(int rowId) {
  ArrowBuf offsets = accessor.getOffsetBuffer();
  int index = rowId * ListVector.OFFSET_WIDTH;
  int start = offsets.getInt(index);
  int end = offsets.getInt(index + ListVector.OFFSET_WIDTH);
  return new ColumnarArray(arrayData, start, end - start);
}
 
Example 4
Source Project: iceberg   Source File: IcebergArrowColumnVector.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public ColumnarArray getArray(int rowId) {
  if (isNullAt(rowId)) {
    return null;
  }
  return accessor.getArray(rowId);
}
 
Example 5
Source Project: iceberg   Source File: ArrowVectorAccessors.java    License: Apache License 2.0 5 votes vote down vote up
@Override
final ColumnarArray getArray(int rowId) {
  ArrowBuf offsets = vector.getOffsetBuffer();
  int index = rowId * ListVector.OFFSET_WIDTH;
  int start = offsets.getInt(index);
  int end = offsets.getInt(index + ListVector.OFFSET_WIDTH);
  return new ColumnarArray(arrayData, start, end - start);
}
 
Example 6
@Override
public ColumnarArray getArray(int rowId) {
  if (isNullAt(rowId)) return null;
  return accessor.getArray(rowId);
}
 
Example 7
ColumnarArray getArray(int rowId) {
  throw new UnsupportedOperationException();
}
 
Example 8
ColumnarArray getArray(int rowId) {
  throw new UnsupportedOperationException();
}
 
Example 9
Source Project: iceberg   Source File: ArrowVectorAccessor.java    License: Apache License 2.0 4 votes vote down vote up
ColumnarArray getArray(int rowId) {
  throw new UnsupportedOperationException("Unsupported type: array");
}
 
Example 10
Source Project: iceberg   Source File: NullValuesColumnVector.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public ColumnarArray getArray(int rowId) {
  throw new UnsupportedOperationException();
}