From: <tho...@us...> - 2010-11-12 02:08:14
|
Revision: 3939 http://bigdata.svn.sourceforge.net/bigdata/?rev=3939&view=rev Author: thompsonbry Date: 2010-11-12 00:58:16 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Missed an update to BOpUtility which broke the build. Added some comments on JoinGraph. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/controller/JoinGraph.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java 2010-11-12 00:18:05 UTC (rev 3938) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java 2010-11-12 00:58:16 UTC (rev 3939) @@ -912,4 +912,39 @@ } + /** + * Inject (or replace) an {@link Integer} "rowId" column. This does not have + * a side-effect on the source {@link IBindingSet}s. + * + * @param var + * The name of the column. + * @param start + * The starting value for the identifier. + * @param in + * The source {@link IBindingSet}s. + * + * @return The modified {@link IBindingSet}s. + */ + public static IBindingSet[] injectRowIdColumn(final IVariable var, + final int start, final IBindingSet[] in) { + + if (in == null) + throw new IllegalArgumentException(); + + final IBindingSet[] out = new IBindingSet[in.length]; + + for (int i = 0; i < out.length; i++) { + + final IBindingSet bset = in[i].clone(); + + bset.set(var, new Constant<Integer>(Integer.valueOf(start + i))); + + out[i] = bset; + + } + + return out; + + } + } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/controller/JoinGraph.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/controller/JoinGraph.java 2010-11-12 00:18:05 UTC (rev 3938) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/controller/JoinGraph.java 2010-11-12 00:58:16 UTC (rev 3939) @@ -880,6 +880,11 @@ * will be falsely high by whatever ratio the chosen vertex * cardinality exceeds the one having the minimum cardinality which * is connected via an edge to the target vertex). + * + * FIXME I am not convinced that this approach is quite right. I am + * also not convinced that this approach will correctly carry the + * additional metadata on the EdgeSample (exact, estimate overflow + * and underflow, etc). */ final VertexSample moreSelectiveVertexSample = vSource.sample.rangeCount < vTarget.sample.rangeCount ? vSource.sample : vTarget.sample; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |