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

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

Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/682
  
    I didn't get a chance to review/vote on this before it was merged, but I 
dont' think this is what I expected to happen when I wrote the JIRA. I didn't 
think we would produce direct support for `BigDecimal` so much as coerce 
`BigDecimal` into double so that when Groovy did its magic to:
    
    ```groovy
    g.withSack(2).V().sack(Operator.div).by(constant(3.0)).sack()
    ```
    
    we'd just get back a double - not a `BigDecimal`. Directly supporting 
`BigDecimal` means we need to support it as a GraphSON type. We already do, but 
only in the extended module so if you wanted to use `BigDecimal` you'd have to 
include that configuration. No GLV at this point supports the extended module 
(though @davebshow is working on that). Do we really need to provide direct 
support for `BigDecimal` when the problem we were trying to solve was related 
to Groovy taking a literal and auto-assigning it to `BigDecimal` (sorta 
unexpected)? or do users really need the ability to do 
`constant(BigDecimal.valueOf(3))`?


> Sack step evaluated by groovy interprets numbers in an unexpected way
> ---------------------------------------------------------------------
>
>                 Key: TINKERPOP-1736
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1736
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.5
>            Reporter: stephen mallette
>            Assignee: Daniel Kuppitz
>             Fix For: 3.3.0, 3.1.8, 3.2.6
>
>
> The issue is discussed to some detail on the dev mailing list:
> https://lists.apache.org/thread.html/6b8060c89f5b3744e7a9d1e421b9de980a3e24eb50563423c7690893@%3Cdev.tinkerpop.apache.org%3E
> but basically, this fails:
> {code}
> gremlin> g.withSack(2).V().sack(div).by(constant(3.0)).sack()
> Non-terminating decimal expansion; no exact representable decimal result.
> {code}



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

Reply via email to