relBuilder.convert(sort.getRowType(), false);
relBuilder.convert(sort.getRowType(), false);
@Override public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) { // Higher cost if rows are wider discourages pushing a project through a // sort. final double rowCount = mq.getRowCount(this); final double bytesPerRow = getRowType().getFieldCount() * 4; final double cpu = Util.nLogN(rowCount) * bytesPerRow; return planner.getCostFactory().makeCost(rowCount, cpu, 0); }
collationIndexes.add(fCol.getFieldIndex()); collationDirections.add(fCol.getDirection()); if (sort.getRowType().getFieldList().get(fCol.getFieldIndex()).getType().getFamily() == SqlTypeFamily.NUMERIC) { numericCollationBitSetBuilder.set(fCol.getFieldIndex());
@Override public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) { // Higher cost if rows are wider discourages pushing a project through a // sort. final double rowCount = mq.getRowCount(this); final double bytesPerRow = getRowType().getFieldCount() * 4; final double cpu = Util.nLogN(rowCount) * bytesPerRow; return planner.getCostFactory().makeCost(rowCount, cpu, 0); }
collationIndexes.add(fCol.getFieldIndex()); collationDirections.add(fCol.getDirection()); if (sort.getRowType().getFieldList().get(fCol.getFieldIndex()).getType().getFamily() == SqlTypeFamily.NUMERIC) { numericCollationBitSetBuilder.set(fCol.getFieldIndex());
ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { final RelDataType rowType = sort.getRowType(); final int fieldCount = rowType.getFieldCount(); final RelCollation collation = sort.getCollation();
ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { final RelDataType rowType = sort.getRowType(); final int fieldCount = rowType.getFieldCount(); final RelCollation collation = sort.getCollation();