@SuppressWarnings("deprecation") public final double getRows() { return estimateRowCount(RelMetadataQuery.instance()); }
@SuppressWarnings("deprecation") public final double getRows() { return estimateRowCount(RelMetadataQuery.instance()); }
@Override public double estimateRowCount(RelMetadataQuery mq) { // Calculate result as the sum of the input row count estimates, // assuming there are any, otherwise use the superclass default. So // for a no-input UDX, behave like an AbstractRelNode; for a one-input // UDX, behave like a SingleRel; for a multi-input UDX, behave like // UNION ALL. TODO jvs 10-Sep-2007: UDX-supplied costing metadata. if (inputs.size() == 0) { return super.estimateRowCount(mq); } double nRows = 0.0; for (RelNode input : inputs) { Double d = mq.getRowCount(input); if (d != null) { nRows += d; } } return nRows; }
@Override public double estimateRowCount(RelMetadataQuery mq) { // Calculate result as the sum of the input row count estimates, // assuming there are any, otherwise use the superclass default. So // for a no-input UDX, behave like an AbstractRelNode; for a one-input // UDX, behave like a SingleRel; for a multi-input UDX, behave like // UNION ALL. TODO jvs 10-Sep-2007: UDX-supplied costing metadata. if (inputs.size() == 0) { return super.estimateRowCount(mq); } double nRows = 0.0; for (RelNode input : inputs) { Double d = mq.getRowCount(input); if (d != null) { nRows += d; } } return nRows; }