It seems one of the MD providers was not being initialized properly. Thanks Julian, Jesús
On 3/11/15, 10:00 AM, "Julian Hyde" <[email protected]> wrote: >It looks as if the metadata field of CachingInvocationHandler is null. >I'm pretty sure that it should not be. Can you change its constructor from > >public CachingInvocationHandler(Metadata metadata) { > this.metadata = metadata; >} > >to > >public CachingInvocationHandler(Metadata metadata) { > this.metadata = Preconditions.checkNotNull(metadata); >} > >and work backwards to find out who is giving the bad metadata. Probably >one of your providers is badly written. > >Julian > > >> On Mar 10, 2015, at 6:53 PM, Jesus Camachorodriguez >><[email protected]> wrote: >> >> Hello, >> >> I was doing tests on CBO branch in Hive with the latest Calcite >>snapshot, and there is the following Exception that shows up now: >> >> java.lang.NullPointerException >> at >>org.apache.calcite.rel.metadata.CachingRelMetadataProvider$CachingInvocat >>ionHandler.invoke(CachingRelMetadataProvider.java:111) >> at com.sun.proxy.$Proxy32.rel(Unknown Source) >> at >>org.apache.calcite.rel.metadata.CachingRelMetadataProvider$CachingInvocat >>ionHandler.invoke(CachingRelMetadataProvider.java:111) >> at com.sun.proxy.$Proxy32.distribution(Unknown Source) >> at >>org.apache.calcite.rel.metadata.RelMetadataQuery.distribution(RelMetadata >>Query.java:310) >> at >>org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin.obtainJ >>oinAlgorithms(HiveJoin.java:257) >> at >>org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin.chooseJ >>oinAlgorithmAndGetCost(HiveJoin.java:148) >> at >>org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin.compute >>SelfCost(HiveJoin.java:140) >> at >>org.apache.calcite.rel.metadata.RelMdPercentageOriginalRows.getNonCumulat >>iveCost(RelMdPercentageOriginalRows.java:165) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java >>:57) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI >>mpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >>org.apache.calcite.rel.metadata.ReflectiveRelMetadataProvider$2$1.invoke( >>ReflectiveRelMetadataProvider.java:194) >> at com.sun.proxy.$Proxy25.getNonCumulativeCost(Unknown Source) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java >>:57) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI >>mpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >>org.apache.calcite.rel.metadata.ChainedRelMetadataProvider$ChainedInvocat >>ionHandler.invoke(ChainedRelMetadataProvider.java:109) >> at com.sun.proxy.$Proxy25.getNonCumulativeCost(Unknown Source) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java >>:57) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI >>mpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >>org.apache.calcite.rel.metadata.CachingRelMetadataProvider$CachingInvocat >>ionHandler.invoke(CachingRelMetadataProvider.java:131) >> at com.sun.proxy.$Proxy25.getNonCumulativeCost(Unknown Source) >> at >>org.apache.calcite.rel.metadata.RelMetadataQuery.getNonCumulativeCost(Rel >>MetadataQuery.java:115) >> ... >> >> Any feedback on this problem? >> >> Thanks, >> Jesús >> >
