calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject [03/10] incubator-calcite git commit: [CALCITE-617] Check at initialization time in CachingInvocationHandler that MD provider is not null (Jesus Camacho Rodriguez)
Date Sat, 28 Mar 2015 21:23:52 GMT
[CALCITE-617] Check at initialization time in CachingInvocationHandler that MD provider is
not null (Jesus Camacho Rodriguez)

Close apache/incubator-calcite#58


Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/321dc430
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/321dc430
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/321dc430

Branch: refs/heads/master
Commit: 321dc4303bccd260eb94a957dbc419fe6e5c6afe
Parents: 61eea9c
Author: Jesus Camacho Rodriguez <jcamachorodriguez@hortonworks.com>
Authored: Wed Mar 11 16:55:05 2015 -0700
Committer: Julian Hyde <jhyde@apache.org>
Committed: Fri Mar 27 11:37:44 2015 -0700

----------------------------------------------------------------------
 .../apache/calcite/rel/metadata/CachingRelMetadataProvider.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/321dc430/core/src/main/java/org/apache/calcite/rel/metadata/CachingRelMetadataProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/metadata/CachingRelMetadataProvider.java
b/core/src/main/java/org/apache/calcite/rel/metadata/CachingRelMetadataProvider.java
index a45501b..516de3a 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/CachingRelMetadataProvider.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/CachingRelMetadataProvider.java
@@ -20,6 +20,7 @@ import org.apache.calcite.plan.RelOptPlanner;
 import org.apache.calcite.rel.RelNode;
 
 import com.google.common.base.Function;
+import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
 
 import java.lang.reflect.InvocationHandler;
@@ -100,7 +101,7 @@ public class CachingRelMetadataProvider implements RelMetadataProvider
{
     private final Metadata metadata;
 
     public CachingInvocationHandler(Metadata metadata) {
-      this.metadata = metadata;
+      this.metadata = Preconditions.checkNotNull(metadata);
     }
 
     public Object invoke(Object proxy, Method method, Object[] args)


Mime
View raw message