[Mulgara-svn] r1764 - trunk/src/jar/krule/java/org/mulgara/krule
pag at mulgara.org
pag at mulgara.org
Fri Jul 10 16:41:35 UTC 2009
Author: pag
Date: 2009-07-10 09:41:34 -0700 (Fri, 10 Jul 2009)
New Revision: 1764
Modified:
trunk/src/jar/krule/java/org/mulgara/krule/Rule.java
Log:
Added the getRowExpectedCount method to supplant getRowUpperBound
Modified: trunk/src/jar/krule/java/org/mulgara/krule/Rule.java
===================================================================
--- trunk/src/jar/krule/java/org/mulgara/krule/Rule.java 2009-07-10 16:40:35 UTC (rev 1763)
+++ trunk/src/jar/krule/java/org/mulgara/krule/Rule.java 2009-07-10 16:41:34 UTC (rev 1764)
@@ -355,6 +355,15 @@
return tuples.getRowUpperBound();
}
+ public long getRowExpectedCount() throws TuplesException {
+ if (statementsPerRow > 1) {
+ BigInteger rowExpected = BigInteger.valueOf(tuples.getRowExpectedCount());
+ rowExpected = rowExpected.multiply(BigInteger.valueOf(statementsPerRow));
+ return rowExpected.bitLength() > 63 ? Long.MAX_VALUE : rowExpected.longValue();
+ }
+ return tuples.getRowUpperBound();
+ }
+
public Variable[] getVariables() {
return variables.toArray(new Variable[statementSize]);
}
More information about the Mulgara-svn
mailing list