|
From: <tho...@us...> - 2014-01-13 14:32:19
|
Revision: 7779
http://bigdata.svn.sourceforge.net/bigdata/?rev=7779&view=rev
Author: thompsonbry
Date: 2014-01-13 14:32:13 +0000 (Mon, 13 Jan 2014)
Log Message:
-----------
javadoc on ChunkedMaterializationOp.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java 2014-01-13 14:31:38 UTC (rev 7778)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java 2014-01-13 14:32:13 UTC (rev 7779)
@@ -47,6 +47,7 @@
import com.bigdata.bop.ap.Predicate;
import com.bigdata.bop.engine.BOpStats;
import com.bigdata.rdf.internal.IV;
+import com.bigdata.rdf.internal.IVCache;
import com.bigdata.rdf.lexicon.LexiconRelation;
import com.bigdata.rdf.model.BigdataValue;
import com.bigdata.rdf.store.BigdataBindingSetResolverator;
@@ -270,7 +271,8 @@
* {@link BigdataValue}s.
*
* @param required
- * The variable(s) to be materialized.
+ * The variable(s) to be materialized or <code>null</code> to
+ * materialize all variable bindings.
* @param lex
* The lexicon reference.
* @param chunk
@@ -279,7 +281,7 @@
static void resolveChunk(final IVariable<?>[] required,
final LexiconRelation lex,//
final IBindingSet[] chunk,//
- final boolean materializeInlineIVs
+ final boolean materializeInlineIVs//
) {
if (log.isInfoEnabled())
@@ -310,6 +312,7 @@
if (required == null) {
+ // Materialize all variable bindings.
@SuppressWarnings("rawtypes")
final Iterator<Map.Entry<IVariable, IConstant>> itr = bindingSet
.iterator();
@@ -329,15 +332,16 @@
}
if (iv.needsMaterialization() || materializeInlineIVs) {
-
- ids.add(iv);
-
+
+ ids.add(iv);
+
}
}
} else {
+ // Materialize the specified variable bindings.
for (IVariable<?> v : required) {
final IConstant<?> c = bindingSet.get(v);
@@ -356,9 +360,9 @@
}
if (iv.needsMaterialization() || materializeInlineIVs) {
-
- ids.add(iv);
-
+
+ ids.add(iv);
+
}
}
@@ -382,7 +386,7 @@
*/
for (IBindingSet e : chunk) {
- getBindingSet(e, required, terms);
+ getBindingSet(required, e, terms);
}
@@ -392,17 +396,24 @@
* Resolve the term identifiers in the {@link IBindingSet} using the map
* populated when we fetched the current chunk.
*
+ * @param required
+ * The variables to be resolved -or- <code>null</code> if all
+ * variables should have been resolved.
* @param bindingSet
- * A solution whose {@link Long}s will be interpreted as term
- * identifiers and resolved to the corresponding
- * {@link BigdataValue}s.
+ * A solution whose {@link IV}s will be resolved to the
+ * corresponding {@link BigdataValue}s in the caller's
+ * <code>terms</code> map. The {@link IVCache} associations are
+ * set as a side-effect.
+ * @param terms
+ * A map from {@link IV}s to {@link BigdataValue}s.
*
* @throws IllegalStateException
* if the {@link IBindingSet} was not materialized with the
* {@link IBindingSet}.
*/
- static private void getBindingSet(final IBindingSet bindingSet,
+ static private void getBindingSet(//
final IVariable<?>[] required,
+ final IBindingSet bindingSet,
final Map<IV<?, ?>, BigdataValue> terms) {
if (bindingSet == null)
@@ -411,7 +422,7 @@
if (terms == null)
throw new IllegalArgumentException();
- if(required != null) {
+ if (required != null) {
/*
* Only the specified variables.
@@ -420,10 +431,10 @@
for (IVariable<?> var : required) {
@SuppressWarnings("unchecked")
- final IConstant<IV<?,?>> c = bindingSet.get(var);
+ final IConstant<IV<?, ?>> c = bindingSet.get(var);
if (c == null) {
-
+ // Variable is not bound in this solution.
continue;
}
@@ -435,7 +446,7 @@
continue;
}
-
+
final BigdataValue value = terms.get(iv);
if (value == null && iv.needsMaterialization()) {
@@ -471,7 +482,7 @@
final Object boundValue = entry.getValue().get();
- if (!(boundValue instanceof IV<?, ?>)) {
+ if (!(boundValue instanceof IV)) {
continue;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jer...@us...> - 2014-10-26 05:02:27
|
Revision: 8690
http://sourceforge.net/p/bigdata/code/8690
Author: jeremy_carroll
Date: 2014-10-26 05:02:24 +0000 (Sun, 26 Oct 2014)
Log Message:
-----------
Fix for trac1028: do not (accidentally) remove an iv from a literal.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java 2014-10-17 20:40:08 UTC (rev 8689)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java 2014-10-26 05:02:24 UTC (rev 8690)
@@ -503,20 +503,25 @@
final BigdataValue value = terms.get(iv);
- if (value == null && iv.needsMaterialization()) {
+ if (value == null ) {
+
+ if ( iv.needsMaterialization() ) {
- throw new RuntimeException("Could not resolve: iv=" + iv);
+ throw new RuntimeException("Could not resolve: iv=" + iv);
+
+ } // else do nothing, e.g. for a literal - DO NOT remove the binding, trac1028.
+ } else {
+
+ /*
+ * Replace the binding.
+ *
+ * FIXME This probably needs to strip out the
+ * BigdataSail#NULL_GRAPH since that should not become bound.
+ */
+ ((IV) iv).setValue(value);
}
- /*
- * Replace the binding.
- *
- * FIXME This probably needs to strip out the
- * BigdataSail#NULL_GRAPH since that should not become bound.
- */
- ((IV) iv).setValue(value);
-
}
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2014-10-28 13:12:54
|
Revision: 8691
http://sourceforge.net/p/bigdata/code/8691
Author: thompsonbry
Date: 2014-10-28 13:12:49 +0000 (Tue, 28 Oct 2014)
Log Message:
-----------
Rolling back change for a 1.3.3 release.
See #1038 (xsd:boolean materialization issue)
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java 2014-10-26 05:02:24 UTC (rev 8690)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationOp.java 2014-10-28 13:12:49 UTC (rev 8691)
@@ -502,26 +502,21 @@
}
final BigdataValue value = terms.get(iv);
+ // FIXME Temporarily rolled back for 1.3.3 release. See #1028 (xsd:boolean materialization issue)
+ if (value == null && iv.needsMaterialization()) {
- if (value == null ) {
-
- if ( iv.needsMaterialization() ) {
+ throw new RuntimeException("Could not resolve: iv=" + iv);
- throw new RuntimeException("Could not resolve: iv=" + iv);
-
- } // else do nothing, e.g. for a literal - DO NOT remove the binding, trac1028.
+ }
- } else {
+ /*
+ * Replace the binding.
+ *
+ * FIXME This probably needs to strip out the
+ * BigdataSail#NULL_GRAPH since that should not become bound.
+ */
+ ((IV) iv).setValue(value);
- /*
- * Replace the binding.
- *
- * FIXME This probably needs to strip out the
- * BigdataSail#NULL_GRAPH since that should not become bound.
- */
- ((IV) iv).setValue(value);
- }
-
}
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|