mirror of https://github.com/apache/lucene.git
SOLR-10444: SQL interface does not use client cache
This commit is contained in:
parent
6e5f6fab53
commit
865f9b2b01
|
@ -115,6 +115,10 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
|
|||
return PermissionNameProvider.Name.READ_PERM;
|
||||
}
|
||||
|
||||
public static SolrClientCache getClientCache() {
|
||||
return clientCache;
|
||||
}
|
||||
|
||||
public void inform(SolrCore core) {
|
||||
|
||||
/* The stream factory will always contain the zkUrl for the given collection
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.calcite.schema.SchemaPlus;
|
|||
import org.apache.calcite.schema.TranslatableTable;
|
||||
import org.apache.calcite.schema.impl.AbstractTableQueryable;
|
||||
import org.apache.calcite.util.Pair;
|
||||
import org.apache.solr.client.solrj.io.SolrClientCache;
|
||||
import org.apache.solr.client.solrj.io.comp.ComparatorOrder;
|
||||
import org.apache.solr.client.solrj.io.comp.FieldComparator;
|
||||
import org.apache.solr.client.solrj.io.comp.MultipleFieldComparator;
|
||||
|
@ -51,6 +52,7 @@ import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
|||
import org.apache.solr.client.solrj.io.stream.metrics.*;
|
||||
import org.apache.solr.common.params.CommonParams;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.handler.StreamHandler;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
@ -158,6 +160,10 @@ class SolrTable extends AbstractQueryableTable implements TranslatableTable {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
StreamContext streamContext = new StreamContext();
|
||||
streamContext.setSolrClientCache(StreamHandler.getClientCache());
|
||||
tupleStream.setStreamContext(streamContext);
|
||||
|
||||
final TupleStream finalStream = tupleStream;
|
||||
|
||||
return new AbstractEnumerable<Object>() {
|
||||
|
|
Loading…
Reference in New Issue