public static JavaRowFormat deduceFormat(RelOptTable table) { final Class elementType = deduceElementType(table.unwrap(Table.class)); return elementType == Object[].class ? JavaRowFormat.ARRAY : JavaRowFormat.CUSTOM; }
public static JavaRowFormat deduceFormat(RelOptTable table) { final Class elementType = deduceElementType(table.unwrap(Table.class)); return elementType == Object[].class ? JavaRowFormat.ARRAY : JavaRowFormat.CUSTOM; }
@Override public RelNode copy(RelTraitSet traitSet, List<RelNode> inputs) { final Table tbl = this.table.unwrap(Table.class); Class elementType = EnumerableTableScan.deduceElementType(tbl); return new DirPrunedEnumerableTableScan(getCluster(), traitSet, table, elementType, digestFromSelection); }
/** Creates an EnumerableTableScan. */ public static EnumerableTableScan create(RelOptCluster cluster, RelOptTable relOptTable) { final Table table = relOptTable.unwrap(Table.class); Class elementType = EnumerableTableScan.deduceElementType(table); final RelTraitSet traitSet = cluster.traitSetOf(EnumerableConvention.INSTANCE) .replaceIfs(RelCollationTraitDef.INSTANCE, () -> { if (table != null) { return table.getStatistic().getCollations(); } return ImmutableList.of(); }); return new EnumerableTableScan(cluster, traitSet, relOptTable, elementType); }
/** Creates an EnumerableTableScan. */ public static EnumerableTableScan create(RelOptCluster cluster, RelOptTable relOptTable) { final Table table = relOptTable.unwrap(Table.class); Class elementType = EnumerableTableScan.deduceElementType(table); final RelTraitSet traitSet = cluster.traitSetOf(EnumerableConvention.INSTANCE) .replaceIfs(RelCollationTraitDef.INSTANCE, () -> { if (table != null) { return table.getStatistic().getCollations(); } return ImmutableList.of(); }); return new EnumerableTableScan(cluster, traitSet, relOptTable, elementType); }
/** Creates an DirPrunedEnumerableTableScan. */ public static EnumerableTableScan create(RelOptCluster cluster, RelOptTable relOptTable, String digestFromSelection) { final Table table = relOptTable.unwrap(Table.class); Class elementType = EnumerableTableScan.deduceElementType(table); final RelTraitSet traitSet = cluster.traitSetOf(EnumerableConvention.INSTANCE) .replaceIfs(RelCollationTraitDef.INSTANCE, () -> { if (table != null) { return table.getStatistic().getCollations(); } return ImmutableList.of(); }); return new DirPrunedEnumerableTableScan(cluster, traitSet, relOptTable, elementType, digestFromSelection); }