You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/03 17:44:11 UTC

[jira] [Commented] (TINKERPOP-982) valuesDecr, valuesIncr, keysDecr, and valuesDecr is lame.

    [ https://issues.apache.org/jira/browse/TINKERPOP-982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15038062#comment-15038062 ] 

ASF GitHub Bot commented on TINKERPOP-982:
------------------------------------------

GitHub user okram opened a pull request:

    https://github.com/apache/incubator-tinkerpop/pull/169

    TINKERPOP3-982: valuesDecr, valuesIncr, keysDecr, and valuesDecr is lame.

    https://issues.apache.org/jira/browse/TINKERPOP3-982
    
    I made it so the `Column` enum implements `Function<Object,Object>` and where `Column.keys` and `Column.values` project out the respective "column" for `Map`, `Map.Entry`, `Path`, etc. What is cool about this is that now we no longer need `SelectColumnStep` -- `select(keys) == map(keys)`. Of course, like `where(traversal) == filter(traversal)`, I left `select(column)` in `GraphTraversal` and don't plan to remove it. 
    
    Given that this is a minor version push (3.1.1), I will NOT deprecate `Order.valueDecr`/etc. until 3.2.0 and have the following ticket to remind me.  https://issues.apache.org/jira/browse/TINKERPOP-1021
    
    Finally, `mvn clean install` and a full `publish-docs.sh` are happy happy long time.
    
    VOTE +1.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP3-982

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-tinkerpop/pull/169.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #169
    
----
commit 8771ee5f58c7ec133cfb50987fe91b862fb9ad14
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2015-11-24T22:04:02Z

    Column enum now implements Function. SelectColumnStep goes away as now select(column) is simply  (un(ddadhe covers) map(column) -- bam. Order.valueDecr/etc. goes away in favor of order().by(values,decr). This means we have decoupled the selector from the comparator so people can do other things besides decr and incr on values.

commit 0bda36c74edaf93fef3585f09c31b05e4f46c908
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2015-11-30T19:45:53Z

    this is a breaking push. need to get Groovy GremlinLoader happy about comparator. Will get back to this.

commit 8d04c825c74933155a6b651edb413e37b30bd970
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2015-12-03T16:42:27Z

    added more docs to Order Step around Columm.keys and Column.values. Added a GraphTraversal.by() safeguard to ensure no ambiguous method call issues.

commit 8662fcb8eb24329da99908cff0194c1d81bbefae
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2015-12-03T16:42:34Z

    Merge branch 'master' into TINKERPOP3-982

----


> valuesDecr, valuesIncr, keysDecr, and valuesDecr is lame.
> ---------------------------------------------------------
>
>                 Key: TINKERPOP-982
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-982
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.0.1-incubating, 3.1.0-incubating
>            Reporter: Marko A. Rodriguez
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.1.1-incubating
>
>
> I'm always doing this.
> {code}
> g.V().blah().groupCount().order(local).by(valuesDecr)
> {code}
> Why does this suck? Cause we already have {{decr}}. I think we should treat this like {{sample}}-step.
> {code}
> g.V().blah().groupCount().order(local).by(select(values),decr)
> {code}
> ......or something. Above is bad cause it would actually be {{by(select(values).unfold(),decr)}} which is even suckier................ [~dkuppitz] help a poor dying man.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)