@Override public Cost getCost() { Double inputBytes = this.getDelegate().accept(new ByteCountVisitor()); Double outputBytes = this.accept(new ByteCountVisitor()); if (inputBytes == null || outputBytes == null) { return Cost.UNKNOWN; } int parallelLevel = CostUtil.estimateParallelLevel( false, context.getConnection().getQueryServices()); Cost cost = new Cost(0, 0, 0); if (!orderBy.getOrderByExpressions().isEmpty()) { Cost orderByCost = CostUtil.estimateOrderByCost(inputBytes, outputBytes, parallelLevel); cost = cost.plus(orderByCost); } return super.getCost().plus(cost); }
@Override public Cost getCost() { Double inputBytes = this.getDelegate().accept(new ByteCountVisitor()); Double outputBytes = this.accept(new ByteCountVisitor()); if (inputBytes == null || outputBytes == null) { return Cost.UNKNOWN; } int parallelLevel = CostUtil.estimateParallelLevel( false, context.getConnection().getQueryServices()); Cost cost = new Cost(0, 0, 0); if (!orderBy.getOrderByExpressions().isEmpty()) { Cost orderByCost = CostUtil.estimateOrderByCost(inputBytes, outputBytes, parallelLevel); cost = cost.plus(orderByCost); } return super.getCost().plus(cost); }
@Override public Cost getCost() { Double inputBytes = this.getDelegate().accept(new ByteCountVisitor()); Double outputBytes = this.accept(new ByteCountVisitor()); if (inputBytes == null || outputBytes == null) { return Cost.UNKNOWN; } int parallelLevel = CostUtil.estimateParallelLevel( false, context.getConnection().getQueryServices()); Cost cost = new Cost(0, 0, 0); if (!orderBy.getOrderByExpressions().isEmpty()) { Cost orderByCost = CostUtil.estimateOrderByCost(inputBytes, outputBytes, parallelLevel); cost = cost.plus(orderByCost); } return super.getCost().plus(cost); }