use of com.facebook.presto.split.EmptySplitPageSource in project presto by prestodb.
the class ScanFilterAndProjectOperator method addSplit.
@Override
public Supplier<Optional<UpdatablePageSource>> addSplit(Split split) {
requireNonNull(split, "split is null");
checkState(this.split == null, "Table scan split already set");
if (finishing) {
return Optional::empty;
}
this.split = split;
Object splitInfo = split.getInfo();
if (splitInfo != null) {
operatorContext.setInfoSupplier(Suppliers.ofInstance(new SplitOperatorInfo(splitInfo)));
}
blocked.set(null);
if (split.getConnectorSplit() instanceof EmptySplit) {
pageSource = new EmptySplitPageSource();
}
return () -> {
if (pageSource instanceof UpdatablePageSource) {
return Optional.of((UpdatablePageSource) pageSource);
}
return Optional.empty();
};
}
use of com.facebook.presto.split.EmptySplitPageSource in project presto by prestodb.
the class TableScanOperator method addSplit.
@Override
public Supplier<Optional<UpdatablePageSource>> addSplit(Split split) {
requireNonNull(split, "split is null");
checkState(this.split == null, "Table scan split already set");
if (finished) {
return Optional::empty;
}
this.split = split;
Object splitInfo = split.getInfo();
if (splitInfo != null) {
operatorContext.setInfoSupplier(Suppliers.ofInstance(new SplitOperatorInfo(splitInfo)));
}
blocked.set(null);
if (split.getConnectorSplit() instanceof EmptySplit) {
source = new EmptySplitPageSource();
}
return () -> {
if (source instanceof UpdatablePageSource) {
return Optional.of((UpdatablePageSource) source);
}
return Optional.empty();
};
}
Aggregations