Skip to content
Draft
Show file tree
Hide file tree
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 @@ -84,7 +84,7 @@ public static List<FieldAccessTypedExpr> analyzeJoinKeys(
io.github.zhztheplayer.velox4j.type.RowType inputType,
int[] joinKeys,
List<int[]> upsertKeys) {
Set<Integer> joinKeySet = new HashSet();
Set<Integer> joinKeySet = new HashSet<>(joinKeys.length, 1.0f);
Arrays.stream(joinKeys).forEach(joinKeySet::add);
List<int[]> uniqueKeysContainedByJoinKey =
upsertKeys.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

import io.github.zhztheplayer.velox4j.data.RowVector;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

/** Iterator for velox RowVector. */
public class VLVectorIterator implements Iterator<RowVector> {

private final List<RowVector> rows;
private final Deque<RowVector> rows;

public VLVectorIterator() {
this.rows = new LinkedList<>();
this.rows = new ArrayDeque<>();
}

public boolean hasNext() {
Expand All @@ -39,7 +39,7 @@ public RowVector next() {
if (!hasNext()) {
return null;
}
return rows.remove(0);
return rows.removeFirst();
}

public void addRow(RowVector row) {
Expand Down
Loading