calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <jul...@hydromatic.net>
Subject Re: Exception in CachingRelMetadataProvider
Date Wed, 11 Mar 2015 17:00:28 GMT
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 <jcamachorodriguez@hortonworks.com>
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$CachingInvocationHandler.invoke(CachingRelMetadataProvider.java:111)
> at com.sun.proxy.$Proxy32.rel(Unknown Source)
> at org.apache.calcite.rel.metadata.CachingRelMetadataProvider$CachingInvocationHandler.invoke(CachingRelMetadataProvider.java:111)
> at com.sun.proxy.$Proxy32.distribution(Unknown Source)
> at org.apache.calcite.rel.metadata.RelMetadataQuery.distribution(RelMetadataQuery.java:310)
> at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin.obtainJoinAlgorithms(HiveJoin.java:257)
> at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin.chooseJoinAlgorithmAndGetCost(HiveJoin.java:148)
> at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin.computeSelfCost(HiveJoin.java:140)
> at org.apache.calcite.rel.metadata.RelMdPercentageOriginalRows.getNonCumulativeCost(RelMdPercentageOriginalRows.java:165)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.calcite.rel.metadata.ChainedRelMetadataProvider$ChainedInvocationHandler.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(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.calcite.rel.metadata.CachingRelMetadataProvider$CachingInvocationHandler.invoke(CachingRelMetadataProvider.java:131)
> at com.sun.proxy.$Proxy25.getNonCumulativeCost(Unknown Source)
> at org.apache.calcite.rel.metadata.RelMetadataQuery.getNonCumulativeCost(RelMetadataQuery.java:115)
> ...
> 
> Any feedback on this problem?
> 
> Thanks,
> Jesús
> 


Mime
View raw message