List<Object> singleColumnResults = size < 0 ? new ArrayList<>() : new ArrayList<>((int)size); while (batch != null) { if (!batch.isEmpty()) {
List<Object> singleColumnResults = size < 0 ? new ArrayList<>() : new ArrayList<>((int)size); while (batch != null) { if (!batch.isEmpty()) {
AtomicReference<Batch> copyOutput ) { assert batch != null; if (batch.isEmpty()) { if (copyOutput != null) copyOutput.set(batch); return 0L;
AtomicReference<Batch> copyOutput ) { assert batch != null; if (batch.isEmpty()) { if (copyOutput != null) copyOutput.set(batch); return 0L;
@Override public boolean isEmpty() { return batch.isEmpty(); }
/** * Create a copy of a batch that always has a {@link Batch#rowCount()}. * * @param batch the original batch; may be null * @return the batch that has a true {@link Batch#rowCount()}, or the original batch if null or empty or if the original has a * non-negative row count */ public static Batch copy( Batch batch ) { if (batch == null) return batch; if (batch.isEmpty() || batch.width() < 1) return emptyBatch(batch.getWorkspaceName(), 1); // Otherwise, create a copy ... return batch.width() == 1 ? new SingleWidthBatch(batch) : new MultiWidthBatch(batch); }
/** * Create a batch that always has a {@link Batch#rowCount()}, even if that means returning a new Batch that buffers the * original's rows it into memory. * * @param batch the original batch; may be null * @return the batch that has a true {@link Batch#rowCount()}, or the original batch if null or empty or if the original has a * non-negative row count */ public static Batch batchWithCount( Batch batch ) { if (batch == null || batch.isEmpty() || batch.rowCount() >= 0 || batch.width() < 1) return batch; // Otherwise, the batch doesn't know it's row count, so we have to copy it ... return batch.width() == 1 ? new SingleWidthBatch(batch) : new MultiWidthBatch(batch); }
@Override public boolean isEmpty() { return right.isEmpty(); }
/** * Create a batch that always has a {@link Batch#rowCount()}, even if that means returning a new Batch that buffers the * original's rows it into memory. * * @param batch the original batch; may be null * @return the batch that has a true {@link Batch#rowCount()}, or the original batch if null or empty or if the original has a * non-negative row count */ public static Batch batchWithCount( Batch batch ) { if (batch == null || batch.isEmpty() || batch.rowCount() >= 0 || batch.width() < 1) return batch; // Otherwise, the batch doesn't know it's row count, so we have to copy it ... return batch.width() == 1 ? new SingleWidthBatch(batch) : new MultiWidthBatch(batch); }
/** * Create a copy of a batch that always has a {@link Batch#rowCount()}. * * @param batch the original batch; may be null * @return the batch that has a true {@link Batch#rowCount()}, or the original batch if null or empty or if the original has a * non-negative row count */ public static Batch copy( Batch batch ) { if (batch == null) return batch; if (batch.isEmpty() || batch.width() < 1) return emptyBatch(batch.getWorkspaceName(), 1); // Otherwise, create a copy ... return batch.width() == 1 ? new SingleWidthBatch(batch) : new MultiWidthBatch(batch); }
@Override public boolean isEmpty() { return sequence.isEmpty(); }
@Override public boolean isEmpty() { return original.isEmpty(); }
protected Batch findNextNonEmptyLeftBatch() { while (currentLeft == null) { currentLeft = left.nextBatch(); if (currentLeft == null) return null; // no more left if (currentLeft.isEmpty() || !currentLeft.hasNext()) { // Skip any empty batches ... currentLeft = null; } } return currentLeft; }
@Override public boolean isEmpty() { return original.isEmpty(); }
@Override public boolean isEmpty() { return sequence.isEmpty(); }
@Override public boolean isEmpty() { return right.isEmpty(); }
@Override public boolean isEmpty() { return left.isEmpty(); }
@Override public boolean isEmpty() { return batch.isEmpty(); }
@Override public boolean isEmpty() { return left.isEmpty(); }
protected Batch findNextNonEmptyLeftBatch() { while (currentLeft == null) { currentLeft = left.nextBatch(); if (currentLeft == null) return null; // no more left if (currentLeft.isEmpty() || !currentLeft.hasNext()) { // Skip any empty batches ... currentLeft = null; } } return currentLeft; }