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/44faa1f3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/44faa1f3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/44faa1f3 Branch: refs/heads/master Commit: 44faa1f3f369268fd05b04fd3348a8404c112eee Parents: a09d1f5 Author: Till Westmann <[email protected]> Authored: Thu Apr 3 10:47:21 2014 -0700 Committer: Till Westmann <[email protected]> Committed: Thu Apr 3 10:47:21 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/44faa1f3/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 e6a9007..a3f5e93 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.translator.XMLQueryTranslator; import edu.uci.ics.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint; 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; @@ -142,6 +143,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()); builder.setClusterLocations(new AlgebricksAbsolutePartitionConstraint(nodeList)); cFactory = builder.create();
