Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior with q and numbers #1258

Open
kiskit opened this issue Oct 27, 2022 · 6 comments
Open

Strange behavior with q and numbers #1258

kiskit opened this issue Oct 27, 2022 · 6 comments

Comments

@kiskit
Copy link

kiskit commented Oct 27, 2022

Hello there,

and entity created with the field xy set to -1.03 is not returned by this query:
/entities?type=Temperature&q=xy==-1.03
If the entity is created with field set to a negative integer, this request works:
/entities?type=Temperature&q=xy==-103

Funny story, we pulled version 1.15.0-next and from what the debugger shows, it always goes into the QNodeIntegerValue case for negative numbers (line 184 of qLex.cpp).

Additionally, it seems impossible to specify numbers as in RFC 8259 (e.g. 103E-2).

@kzangeli kzangeli self-assigned this Oct 27, 2022
@kzangeli
Copy link
Collaborator

ok, interesting!

Might be I have never tested a negative floating point number ...
I'll get right on this. Pretty important bug!

Thanks for reporting!!!

@kzangeli kzangeli added the bug Something isn't working label Oct 27, 2022
kzangeli added a commit that referenced this issue Oct 27, 2022
@kzangeli
Copy link
Collaborator

Hopefully fixed it.
Stupid bug, thanks for finding it !!!
Please try again tomorrow morning (or once a new image has been pushed to dockerhub)

kzangeli added a commit that referenced this issue Oct 27, 2022
@kiskit
Copy link
Author

kiskit commented Oct 28, 2022

Hi Ken,

Excellent reactivity and good job, we'll test it eventually. Did you also see the fact that the standard allows for numbers to be expressed with exponentials (I don't know if this is the right term), like 1.03E4 (for 1.03 times 10 to the power of 4)? I don't think Orion can do that or at least couldn't make it work.

@kzangeli
Copy link
Collaborator

Yes, about that you're perfectly right.
Haven't implemented that, perhaps I should.
I'll add it to my ever-growing To-Do-list ... :)

@kzangeli kzangeli added Fixed - needs validation and removed bug Something isn't working labels Oct 28, 2022
@kiskit
Copy link
Author

kiskit commented Oct 28, 2022

Maybe I can help. Stay tuned :)

@kzangeli
Copy link
Collaborator

ok! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants