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

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

GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/631

    TINKERPOP-1445 Add ellipses for long property values

    https://issues.apache.org/jira/browse/TINKERPOP-1445
    
    This was an easy change but I decided to do this as a PR so that the change 
would be noted as it does affect something that is user facing. I did this 
change for 3.3.0 only in case someone is depending on the `toString()` value of 
`Property` for some reason.
    
    ```text
    gremlin> graph = TinkerGraph.open()
    ==>tinkergraph[vertices:0 edges:0]
    gremlin> g = graph.traversal()
    ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
    gremlin> g.addV().property('short','pretty short').property('long','this 
one is much longer so it is going to get truncated a bit').as('a').
    ......1>   addE('self').property('short','pretty short').property('long', 
'this one is much longer so it is going to get truncated a 
bit').from('a').to('a')
    ==>e[3][0-self->0]
    gremlin> g.V().properties()
    ==>vp[short->pretty short]
    ==>vp[long->this one is much ...]
    gremlin> g.E().properties()
    ==>p[short->pretty short]
    ==>p[long->this one is much ...]
    ```
    
    Builds with `mvn clean install`
    
    VOTE +1

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

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1445

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

    https://github.com/apache/tinkerpop/pull/631.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 #631
    
----
commit 47afd7a664ecb7c737341cac7c005e403c0b569e
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-06-18T18:25:15Z

    TINKERPOP-1445 Add ellipses for long property values

----


> Large nested VertexProperties and Properties do not get printed well
> --------------------------------------------------------------------
>
>                 Key: TINKERPOP-1445
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1445
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.2
>            Reporter: Kevin Gallardo
>            Priority: Minor
>
> {code}
> gremlin> m = ['hello':'world', 'helo':'fromtheotherside']
> ==>hello=world
> ==>helo=fromtheotherside
> gremlin> graph.traversal().E().next().property('longMap', m)
> ==>p[longMap->{hello=world, helo=f]
> {code}
> Maybe the printing could be improved just to at least inform that there's 
> more in the value with a {{...}} or {{\[...\]}} for example.
> It seems to be the {{substring()}} call in 
> [propertyString|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/StringFactory.java#L113].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to