epugh commented on code in PR #4691:
URL: https://github.com/apache/solr/pull/4691#discussion_r3708443525


##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/metrics/StdMetric.java:
##########
@@ -75,11 +70,28 @@ private void init(String functionName, String columnName, 
boolean outputLong) {
   }
 
   @Override
-  public void update(Tuple tuple) {}
+  public void update(Tuple tuple) {
+    Object o = tuple.get(columnName);
+    double val;
+    if (o instanceof Double d) {

Review Comment:
   there definitly are some unusla coding patterns in the streaming code...   
but we tend to follow them once they exist as there are so many of them!



##########
solr/solr-ref-guide/modules/query-guide/pages/stream-decorator-reference.adoc:
##########
@@ -1448,7 +1448,7 @@ For faster aggregation over low to moderate cardinality 
fields, the `facet` func
 * `StreamExpression` (Mandatory)
 * `over`: (Mandatory) A list of fields to group by.
 * `metrics`: (Mandatory) The list of metrics to compute.
-Currently supported metrics are `sum(col)`, `avg(col)`, `min(col)`, 
`max(col)`, `count(*)`, `missing(col)`, `countDist(col)`, `per(col, 
percentile)`.
+Currently supported metrics are `sum(col)`, `avg(col)`, `min(col)`, 
`max(col)`, `count(*)`, `missing(col)`, `countDist(col)`, `per(col, 
percentile)`, `std(col)`.

Review Comment:
   is there any more docs on these indivdual ones or is this mention what the 
pattern is?  Just wondering if folks will know how to use it...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to