[jira] [Commented] (SOLR-10356) Add Streaming Evaluators for basic math functions
[ https://issues.apache.org/jira/browse/SOLR-10356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115854#comment-16115854 ] Erick Erickson commented on SOLR-10356: --- Can this be closed? > Add Streaming Evaluators for basic math functions > - > > Key: SOLR-10356 > URL: https://issues.apache.org/jira/browse/SOLR-10356 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Dennis Gove >Assignee: Dennis Gove >Priority: Minor > Attachments: SOLR-10356.patch, SOLR-10356.patch, SOLR-10356.patch, > SOLR-10356.patch > > -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-10356) Add Streaming Evaluators for basic math functions
[ https://issues.apache.org/jira/browse/SOLR-10356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15952511#comment-15952511 ] ASF subversion and git services commented on SOLR-10356: Commit 6ce02bc693d4ef67872e9c536155c5308227d6e9 in lucene-solr's branch refs/heads/branch_6x from [~dpgove] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6ce02bc ] SOLR-10356: Adds basic math streaming evaluators > Add Streaming Evaluators for basic math functions > - > > Key: SOLR-10356 > URL: https://issues.apache.org/jira/browse/SOLR-10356 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Dennis Gove >Assignee: Dennis Gove >Priority: Minor > Attachments: SOLR-10356.patch, SOLR-10356.patch, SOLR-10356.patch, > SOLR-10356.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-10356) Add Streaming Evaluators for basic math functions
[ https://issues.apache.org/jira/browse/SOLR-10356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15952502#comment-15952502 ] ASF subversion and git services commented on SOLR-10356: Commit 674ce4e89393efe3147629e76f053c9901c182dc in lucene-solr's branch refs/heads/master from [~dpgove] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=674ce4e ] SOLR-10356: Adds basic math streaming evaluators > Add Streaming Evaluators for basic math functions > - > > Key: SOLR-10356 > URL: https://issues.apache.org/jira/browse/SOLR-10356 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Dennis Gove >Assignee: Dennis Gove >Priority: Minor > Attachments: SOLR-10356.patch, SOLR-10356.patch, SOLR-10356.patch, > SOLR-10356.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-10356) Add Streaming Evaluators for basic math functions
[ https://issues.apache.org/jira/browse/SOLR-10356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940769#comment-15940769 ] Vish Persaud commented on SOLR-10356: - I think the scale will control placement of the decimal (10^1, 10^2, 10^-1, etc), as opposed to rounding. Seems like rounding while retaining one or more decimal places would need to be handled by setting precision in BigDecimal. In any case, not sure how performant that is, compared to say basic rounding to integers via Math.round(). > Add Streaming Evaluators for basic math functions > - > > Key: SOLR-10356 > URL: https://issues.apache.org/jira/browse/SOLR-10356 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Dennis Gove >Assignee: Dennis Gove >Priority: Minor > Attachments: SOLR-10356.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-10356) Add Streaming Evaluators for basic math functions
[ https://issues.apache.org/jira/browse/SOLR-10356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940294#comment-15940294 ] Dennis Gove commented on SOLR-10356: I haven't confirmed, but I think BigDecimal can accomplish this by setting the scale {code} a.setScale(b, RoundingMode.HALF_UP) {code} > Add Streaming Evaluators for basic math functions > - > > Key: SOLR-10356 > URL: https://issues.apache.org/jira/browse/SOLR-10356 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Dennis Gove >Assignee: Dennis Gove >Priority: Minor > Attachments: SOLR-10356.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-10356) Add Streaming Evaluators for basic math functions
[ https://issues.apache.org/jira/browse/SOLR-10356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940233#comment-15940233 ] Vish Persaud commented on SOLR-10356: - In round(a,b), 'a' is the value to round and 'b' is the desired number of decimal places, i.e.: round(4.17) = 4 round(4.17,0) = 4 round(4.17,1) = 4.2 round(4.17,9) = 4.17 round(a) is same as java.lang.Math.round(a), but I'm unclear if there's a sufficiently performant implementation for round(a,b). After a quick search, it looks like there are implementations involving Math.round with additional multiplication & division, and some involving DecimalFormat, NumberFormat, or BigDecimal. So not sure if round(a,b) is worthwhile. > Add Streaming Evaluators for basic math functions > - > > Key: SOLR-10356 > URL: https://issues.apache.org/jira/browse/SOLR-10356 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Dennis Gove >Assignee: Dennis Gove >Priority: Minor > Attachments: SOLR-10356.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-10356) Add Streaming Evaluators for basic math functions
[ https://issues.apache.org/jira/browse/SOLR-10356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940215#comment-15940215 ] Dennis Gove commented on SOLR-10356: Yeah, intended for streaming expressions. So far we have the following {code} abs(a) // |a| add(a,b,...,z) // a + b + ... + z div(a,b) // a/b mult(a,b,...,z) // a * b * ... * z sub(a,b,...,z) // a - b - ... - z log(a) // natural log pow(a,b) // a^b mod(a,b) // a % b ceil(a) // ceiling of a floor(a) // floor of a {code} I'll add these ones {code} coalesce(a,b,...,z) // this won't actually be specific to math, we can coalesce on any value type round(a) sqrt(a) cbrt(a) // cubed root sin(a) // sine of a sinh(a) // hyperbolic sine of a asin(a) // arc sine of a cos(a) // cosine of a cosh(a) // hyperbolic cosine of a acos(a) // arc cosine of a tan(a) // tangent of a tanh(a) // hyperbolic tangent of a atan(a) // arc tangent of a {code} What were you thinking for round(a,b)? > Add Streaming Evaluators for basic math functions > - > > Key: SOLR-10356 > URL: https://issues.apache.org/jira/browse/SOLR-10356 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Dennis Gove >Assignee: Dennis Gove >Priority: Minor > Attachments: SOLR-10356.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org