Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use array instead of List for from(Table, DataType) #1064

Merged
merged 1 commit into from
Nov 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public abstract class UnsafeRowToColumnarBatchIterator implements Iterator<Colum
protected final int numRowsEstimate;
protected final long dataLength;
protected final DType[] rapidsTypes;
protected final ArrayList<DataType> outputTypes;
protected final DataType[] outputTypes;
protected final SQLMetric totalTime;
protected final SQLMetric numInputRows;
protected final SQLMetric numOutputRows;
Expand All @@ -69,11 +69,11 @@ protected UnsafeRowToColumnarBatchIterator(
Math.min(Integer.MAX_VALUE - 1, goal.targetSizeBytes() / sizePerRowEstimate));
dataLength = ((long) sizePerRowEstimate) * numRowsEstimate;
rapidsTypes = new DType[schema.length];
outputTypes = new ArrayList<>(schema.length);
outputTypes = new DataType[schema.length];

for (int i = 0; i < schema.length; i++) {
rapidsTypes[i] = GpuColumnVector.getRapidsType(schema[i].dataType());
outputTypes.add(schema[i].dataType());
outputTypes[i] = schema[i].dataType();
}
this.totalTime = totalTime;
this.numInputRows = numInputRows;
Expand Down