lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: solr 7.x sql query returns null
Date Thu, 18 Apr 2019 15:04:32 GMT
On 4/18/2019 1:47 AM, David Barnett wrote:
> I have a large solr 7.3 collection 400m + documents.
> 
> I’m trying to use the Solr JDBC driver to query the data but I get a
> 
> java.io.IOException: Failed to execute sqlQuery 'select id from document limit 10' against
JDBC connection 'jdbc:calcitesolr:'.
> Error while executing SQL "select id from document limit 10": null

<snip>

By the way, either that JDBC url is extremely incomplete or you nuked it 
from the log before sharing.  Seeing the construction of the full URL 
might be helpful.  If you need to redact it in some way for privacy 
concerns, do so in a way so that we can still tell what the URL was - 
change a real password to PASSWORD, change things like host names to 
something like HOST_NAME, etc.

> Caused by: java.lang.NullPointerException
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.validate(VolcanoPlanner.java:891
>          at 
org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:866)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:883)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:101)
>          at org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:336)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1496)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:863)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:883)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:101)
>          at org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:336)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1496)
>          at org.apache.calcite.plan.volcano.VolcanoPlanner.setRoot(VolcanoPlanner.java:308)
>          at org.apache.calcite.tools.Programs$5.run(Programs.java:309)
>          at org.apache.calcite.tools.Programs$SequenceProgram.run(Programs.java:387)
>          at org.apache.calcite.prepare.Prepare.optimize(Prepare.java:186)
>          at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:319)
>          at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:228)
>          at org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:784)
>          at org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:639)
>          at org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:609)
>          at org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:214)
>          at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:603)
>          at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:638)
>          at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:149)

The root cause is an NPE in pure calcite code (no Solr classes listed). 
Calcite didn't like the SQL query for some reason.  I'm not at all 
familiar with Calcite.

Did you try to query a single core (shard replica) rather than the 
collection?  I wonder if doing that might make the driver think it's not 
talking to SolrCloud.  Joel is the expert here, I don't know much about it.

What context is this being used in?  The dataimport handler, or 
something you wrote yourself?  I don't know if this information is 
important, just trying to provide as much information for Joel as I can.

Thanks,
Shawn

Mime
View raw message