use of org.apache.calcite.linq4j.AbstractEnumerable in project calcite by apache.
the class CsvScannableTable method scan.
public Enumerable<Object[]> scan(DataContext root) {
final int[] fields = CsvEnumerator.identityList(fieldTypes.size());
final AtomicBoolean cancelFlag = DataContext.Variable.CANCEL_FLAG.get(root);
return new AbstractEnumerable<Object[]>() {
public Enumerator<Object[]> enumerator() {
return new CsvEnumerator<>(source, cancelFlag, false, null, new CsvEnumerator.ArrayRowConverter(fieldTypes, fields));
}
};
}
use of org.apache.calcite.linq4j.AbstractEnumerable in project calcite by apache.
the class CsvStreamScannableTable method scan.
public Enumerable<Object[]> scan(DataContext root) {
final int[] fields = CsvEnumerator.identityList(fieldTypes.size());
final AtomicBoolean cancelFlag = DataContext.Variable.CANCEL_FLAG.get(root);
return new AbstractEnumerable<Object[]>() {
public Enumerator<Object[]> enumerator() {
return new CsvEnumerator<>(source, cancelFlag, true, null, new CsvEnumerator.ArrayRowConverter(fieldTypes, fields, true));
}
};
}
Aggregations