/** Returns an {@link org.apache.calcite.linq4j.Enumerable} over the rows of * a given table, representing each row as an object array. */ public static Enumerable<Object[]> enumerable(final ScannableTable table, final DataContext root) { return table.scan(root); }
/** Returns an {@link org.apache.calcite.linq4j.Enumerable} over the rows of * a given table, representing each row as an object array. */ public static Enumerable<Object[]> enumerable(final ScannableTable table, final DataContext root) { return table.scan(root); }
public Enumerable<Object[]> bind(DataContext dataContext) { // TODO: filterable and projectable return table.unwrap(ScannableTable.class).scan(dataContext); }
public Enumerable<Object[]> bind(DataContext dataContext) { // TODO: filterable and projectable return table.unwrap(ScannableTable.class).scan(dataContext); }
@Override public Enumerable<Object[]> bind(DataContext dataContext) { return table.unwrap(ScannableTable.class).scan(dataContext); }
@Override public Enumerable<Object[]> bind(DataContext dataContext) { return table.unwrap(ScannableTable.class).scan(dataContext); }
private double cardinality(Lattice lattice, Lattice.Column column) { final String sql = lattice.countSql(ImmutableBitSet.of(column.ordinal)); final Table table = new MaterializationService.DefaultTableFactory() .createTable(lattice.rootSchema, sql, ImmutableList.of()); final Object[] values = Iterables.getOnlyElement(((ScannableTable) table).scan(null)); return ((Number) values[0]).doubleValue(); } }
private double cardinality(Lattice lattice, Lattice.Column column) { final String sql = lattice.countSql(ImmutableBitSet.of(column.ordinal)); final Table table = new MaterializationService.DefaultTableFactory() .createTable(lattice.rootSchema, sql, ImmutableList.of()); final Object[] values = Iterables.getOnlyElement(((ScannableTable) table).scan(null)); return ((Number) values[0]).doubleValue(); } }
private static TableScanNode createScannable(Compiler compiler, TableScan rel, ImmutableList<RexNode> filters, ImmutableIntList projects, ScannableTable scannableTable) { final Enumerable<Row> rowEnumerable = Enumerables.toRow(scannableTable.scan(compiler.getDataContext())); return createEnumerable(compiler, rel, rowEnumerable, null, filters, projects); }
private static TableScanNode createScannable(Compiler compiler, TableScan rel, ImmutableList<RexNode> filters, ImmutableIntList projects, ScannableTable scannableTable) { final Enumerable<Row> rowEnumerable = Enumerables.toRow(scannableTable.scan(compiler.getDataContext())); return createEnumerable(compiler, rel, rowEnumerable, null, filters, projects); }
ImmutableList.of(); final Enumerable<List<Comparable>> rows = ((ScannableTable) table).scan(null) .select(values -> { for (int i = 0; i < values.length; i++) {
ImmutableList.of(); final Enumerable<List<Comparable>> rows = ((ScannableTable) table).scan(null) .select(values -> { for (int i = 0; i < values.length; i++) {