[
https://issues.apache.org/jira/browse/TINKERPOP-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17285162#comment-17285162
]
ASF GitHub Bot commented on TINKERPOP-2487:
-------------------------------------------
spmallette commented on pull request #1375:
URL: https://github.com/apache/tinkerpop/pull/1375#issuecomment-779802925
After looking at this in more detail, I think that there are several things
to discuss:
1. Part of the problem is in the `JavaTranslator` which isn't recognized the
signature of your `int` varargs because it checks for `Object[]` and not the
primitive forms. That's worked until now. I'm not sure how we best resolve
that, but I'm not sure it's best to keep hacking in "side cases" to
`JavaTranslator`.
2. I wonder if `int` is the right data type there. Looking at SQL and Cypher
their approach is to use double between 0.0 and 1.0.
3. I wonder about the return type which changes based on the number of
percentiles - i.e. you get a number for a single percentile but a `Map` for
multiple. There is some precedence for that with `select()` though.
I think that items 2 and 3 probably need to be brought to the dev list for
further discussion to see if anyone has any thoughts on the matter.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add steps to support basic analysis like standard deviation and percentile
> --------------------------------------------------------------------------
>
> Key: TINKERPOP-2487
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2487
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.4.8
> Reporter: Guo Junshi
> Priority: Minor
>
> When using tinkerpop Gremlin for real use cases, we found that some general
> analytical steps are very useful, yet not supported now. Some analytical
> steps are general enough to be part of the official gremlin package, e.g.
> steps to calculate standard deviation and percentile. The example usage might
> be:
>
> {code:java}
> gremlin> g.V().values('ages')
> ==>1
> ==>2
> ==>3
> gremlin> g.V().values('ages').stdev()
> ==>0.816
> gremlin> g.V().values('ages').fold().stdev(Scope.local)
> ==>0.816
> gremlin> g.V().values('ages').percentile(50)
> ==>2
> // one percentile, return single value
> gremlin> g.V().values('ages').percentile(0, 100)
> ==>[0: 1, 100: 3]
> // multiple percentiles, return a map{code}
> These steps are frequently used in our cases, and we think it would be great
> to support them in official versions.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)