typhon-project / typhonql

Typhon Query Language
Eclipse Public License 2.0
4 stars 1 forks source link

[BUG] #104

Closed barmpis closed 3 years ago

barmpis commented 3 years ago

Describe the bug

attempting to query a non-null float value from neo4j fails.

Query

{ "query" : "from SellsOn x select x.merchant, x.amount" }

Model

entity SellsOn {
    amount: float
    merchant -> Merchant[1] 
    specialEvent -> SpecialEvent[1] 
}

graphdb Marketing {
    edges {
        edge SellsOn {
            from merchant
            to specialEvent
        }
    }
}

Expected behavior

the query should return the float value alongside the uuid of the merchant nb: this works fine if the value is unset (aka null) or only has zeroes as decimal values (like 0.0 or 2.0)

REST API

query sent normally, error reported (detailed below)

Additional context

server error:

typhonql-server_1 | Nov 02, 2020 4:35:16 PM org.neo4j.driver.internal.logging.JULogger info typhonql-server_1 | INFO: Direct driver instance 1725604323 created for server address marketing:7687 typhonql-server_1 | Nov 02, 2020 4:35:16 PM org.neo4j.driver.internal.logging.JULogger info typhonql-server_1 | INFO: Closing driver instance 1725604323 typhonql-server_1 | Nov 02, 2020 4:35:16 PM org.neo4j.driver.internal.logging.JULogger info typhonql-server_1 | INFO: Closing connection pool towards marketing:7687 typhonql-server_1 | ) typhonql-server_1 | unknown location: Java("LossyCoercion","Cannot coerce FLOAT to Java float without losing precision")

DavyLandman commented 3 years ago

I think I fixed it with latest commit on dev, could you check if it's enough?

barmpis commented 3 years ago

in the latest dev image it works, thank you.