[
https://issues.apache.org/jira/browse/SOLR-9691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15605628#comment-15605628
]
Timothy Potter commented on SOLR-9691:
--------------------------------------
NPE results:
{code}
2016-10-25 15:35:14.737 ERROR (qtp1348949648-22) [c:transactions s:shard2
r:core_node2 x:transactions_shard2_replica1] o.a.s.c.s.i.s.ExceptionStream
java.lang.NullPointerException
at
org.apache.solr.client.solrj.io.stream.metrics.SumMetric.update(SumMetric.java:69)
at
org.apache.solr.client.solrj.io.stream.RollupStream.read(RollupStream.java:254)
at
org.apache.solr.client.solrj.io.stream.ExceptionStream.read(ExceptionStream.java:68)
at
org.apache.solr.handler.StreamHandler$TimerStream.read(StreamHandler.java:449)
at
org.apache.solr.response.TextResponseWriter.writeTupleStream(TextResponseWriter.java:308)
at
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:168)
at
org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:178)
at
org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:294)
at
org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:90)
at
org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:55)
at
org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65)
at
org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:726)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:468)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
{code}
> Streaming expressions need to be able to use a metric computed by the facet
> stream as a field in other streams.
> ---------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-9691
> URL: https://issues.apache.org/jira/browse/SOLR-9691
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Parallel SQL
> Affects Versions: 6.2.1
> Reporter: Timothy Potter
>
> Using 6.2.1, I want to use a facet stream to do an intermediate count and
> then sum up the counts in a rollup stream, i.e. something like:
> {code}
> rollup(
> sort(
> hashJoin(
> search(products,
> q="*:*",
> fl="product_id,model_num",
> sort="product_id asc",
> qt="/export",
> partitionKeys="product_id"),
> hashed=facet(transactions, q="*:*", buckets="product_id",
> bucketSizeLimit=1000000, bucketSorts="product_id asc", count(*)),
> on="product_id"
> ),
> by="model_num asc"
> ),
> over="model_num",
> sum(count(*))
> )
> {code}
> Basically, I want to get a count of each product_id from the transactions
> collection (# of transactions per product) and then join that with the
> products table to generate a projection containing:
> {code}
> {
> "result-set": {
> "docs": [
> {
> "product_id": "1234",
> "count(*)": 4,
> "model_num": "X"
> },
> {
> "product_id": "5678",
> "count(*)": 5,
> "model_num": "Y"
> },
> ...
> ]
> }
> }
> {code}
> This works, but the outer rollup doesn't recognize the count(*) as a field. I
> get this error:
> {code}
> {
> "result-set": {
> "docs": [
> {
> "EXCEPTION": "Invalid expression sum(count(*)) - expected
> sum(columnName)",
> "EOF": true
> }
> ]
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]