commit | 53e20a3e9508ed4ac29864afd6dc3fcd1a410af9 | [log] [tgz] |
---|---|---|
author | ramangrover29 <ramangrover29@gmail.com> | Sun May 19 16:56:51 2013 -0700 |
committer | ramangrover29 <ramangrover29@gmail.com> | Sun May 19 16:56:51 2013 -0700 |
tree | f77d756eab7fc3055334ee1499f1e189f180ee43 | |
parent | 290a8c48924a007b84ad060998ec90b8ba7b9a3c [diff] | |
parent | 5cadee65be1891bf30a636a2e9436bfb8d23ff67 [diff] |
Merge branch 'master' of https://code.google.com/p/asterixdb
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java index 6f834a7..127d4a6 100644 --- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java +++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/common/FunctionManagerImpl.java
@@ -37,7 +37,11 @@ @Override public synchronized IFunctionDescriptor lookupFunction(FunctionIdentifier fid) throws AlgebricksException { Pair<FunctionIdentifier, Integer> key = new Pair<FunctionIdentifier, Integer>(fid, fid.getArity()); - return functions.get(key).createFunctionDescriptor(); + IFunctionDescriptorFactory factory = functions.get(key); + if (factory == null) { + throw new AlgebricksException("Inappropriate use of function " + "'" + fid.getName() + "'"); + } + return factory.createFunctionDescriptor(); } @Override