-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix: Use Decimal Writer for CBOR Spatial Geography Point #176
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @no1melman
I can see there is indeed a change from decimal (as a string) to f64
type. Can you change the Write
and Read
methods so that each use the DoubleConverter
?
Note that GeometryPointConverter
also follows the same logic. Can you also make the change for this converter?
@Odonno all done I can't - for some reason - build the rust-embedded stuff, so I can't actually build the whole project and run tests...
On Win 11, x64, rust version: 1.84.1 (cargo the same). |
Perfect!
You can run the tests for remote (HTTP, WS) by disabling the embedded mode. See this section in the readme file: https://github.com/surrealdb/surrealdb.net?tab=readme-ov-file#embedded-mode If serialization works for remote, it should work for embedded too. |
@Odonno I've updated the affected tests, they all work now.... bar 1 test which had a depth problem
|
This is weird. Can you try adjusting the settings like this: AssertionOptions.FormattingOptions.MaxDepth = 10; You can increase this value up to Does it fix the problem? |
Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.
What is the motivation?
Current bug where surreal is expecting an array of two decimal values
What does this change do?
Ensures the converter for the Geography Point writes two decimal values
What is your testing strategy?
Yes
Is this related to any issues?
#175
Have you read the Contributing Guidelines?