You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2014/04/09 00:16:38 UTC
[40/50] [abbrv] git commit: add NullableTypeComputer to avoid NPE
add NullableTypeComputer to avoid NPE
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/c13ad120
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/c13ad120
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/c13ad120
Branch: refs/heads/master
Commit: c13ad1202af4da31406b0ac2e83d833e87a4c64d
Parents: 3f4797b
Author: Till Westmann <we...@gmail.com>
Authored: Thu Apr 3 10:47:21 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Sun Apr 6 09:50:42 2014 -0700
----------------------------------------------------------------------
.../org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c13ad120/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java b/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
index 91c7764..2fdfbea 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
@@ -41,6 +41,7 @@ import org.apache.vxquery.xmlquery.ast.ModuleNode;
import org.apache.vxquery.xmlquery.translator.XMLQueryTranslator;
import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.common.exceptions.NotImplementedException;
import edu.uci.ics.hyracks.algebricks.common.utils.Pair;
import edu.uci.ics.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder;
import edu.uci.ics.hyracks.algebricks.compiler.api.ICompiler;
@@ -149,6 +150,12 @@ public class XMLQueryCompiler {
return null;
}
});
+ builder.setNullableTypeComputer(new INullableTypeComputer() {
+ @Override
+ public Object makeNullableType(Object type) throws AlgebricksException {
+ throw new NotImplementedException("NullableTypeComputer is not implented");
+ }
+ });
builder.setNullWriterFactory(new VXQueryNullWriterFactory());
if (availableProcessors < 1) {
builder.setClusterLocations(VXQueryMetadataProvider.getClusterLocations(nodeList));