Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Bug: Float and Double Queries that use 'Special Numbers' fail #54

Open
Du-z opened this issue Sep 22, 2022 · 4 comments
Open

Bug: Float and Double Queries that use 'Special Numbers' fail #54

Du-z opened this issue Sep 22, 2022 · 4 comments
Labels
blocked Work on this issue is blocked until further notice bug Something isn't working confirmed The issue is confirmed

Comments

@Du-z
Copy link
Collaborator

Du-z commented Sep 22, 2022

Some tests from ResultTests.FloatTryGetValueQueryTest and ResultTests.DoubleTryGetValueQueryTest do not return the correct response.

This is because the parameter inserts rather than inf into the query.

The query parameterization needs to be updated to use inf etc

@ProphetLamb
Copy link
Collaborator

ProphetLamb commented Sep 22, 2022

So far I've been unable to query infinity and nan using the <float> cast syntax.
Using a rest client: nan returns zero and ∞ fails to execute at all.
I am currently experimenting on the behavior without casts.
If you could send me a demo query for nan that'd be greatly appreciated 👍

@ProphetLamb
Copy link
Collaborator

Double neg inf

Double inf

Current implementation queries like so:
Double inf string

and so:

Double min value

@ProphetLamb
Copy link
Collaborator

The former two examples cannot be produced using the current serializer.
Which is good!

@ProphetLamb ProphetLamb added bug Something isn't working confirmed The issue is confirmed help-needed The resolution of this issue requires help labels Sep 22, 2022
@tobiemh
Copy link

tobiemh commented Sep 22, 2022

Hey @ProphetLamb SurrealDB doesn't support NaN or -Inf or +Inf yet. It does however support (as you probably know) arbitrary large decimal numbers.

@ProphetLamb ProphetLamb added blocked Work on this issue is blocked until further notice and removed help-needed The resolution of this issue requires help labels Oct 1, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
blocked Work on this issue is blocked until further notice bug Something isn't working confirmed The issue is confirmed
Projects
None yet
Development

No branches or pull requests

3 participants