-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
geo: higher precision for DefaultGeoJSONDecimalDigits #124175
Labels
A-cdc
Change Data Capture
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-support
Originated from a customer
P-2
Issues/test failures with a fix SLA of 3 months
T-cdc
Comments
wenyihu6
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-queries
SQL Queries Team
labels
May 14, 2024
I heard SQL queries is owning the geo package now. Feel free to re-direct if not. |
I tested that |
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 16, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note: Do not limit precision when encoding geo data types to JSON.
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 16, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note: Do not limit precision when encoding geo data types to JSON.
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 16, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note: Do not limit precision when encoding geo data types to JSON.
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 17, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note: Do not limit precision when encoding geo data types to JSON.
cc @cockroachdb/cdc |
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 21, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note(sql change): Do not limit precision when encoding geo data types to JSON.
craig bot
pushed a commit
that referenced
this issue
May 21, 2024
124312: geo: allow arbitrary precision when encoding to json r=rharding6373 a=rharding6373 We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: #124175 Release note: Do not limit precision when encoding geo data types to JSON. 124412: jwtauthccl: add http client to jwt authenticator conf r=souravcrl a=souravcrl Currently, we create a new http client every time we fetch the jwks URL or fetch jwk set from jwks URL. We can simply reuse the http client by adding it to authenticator conf struct. fixes CRDB-38629 Epic None Release note: None 124499: raft: panic on leader attempting to apply snapshot r=pav-kv a=nvanbenschoten This commit replaces a warning and an attempt to gracefully handle a raft leader applying a snapshot with a panic. There's no use trying to handle this correctly when it is a bug that is not possible with the structure of the code. Epic: None Release note: None Co-authored-by: rharding6373 <harding@cockroachlabs.com> Co-authored-by: Sourav Sarangi <sourav.sarangi@cockroachlabs.com> Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 21, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note(sql change): Do not limit precision when encoding geo data types to JSON.
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 21, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note(sql change): Do not limit precision when encoding geo data types to JSON.
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 21, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note(sql change): Do not limit precision when encoding geo data types to JSON.
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 21, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note(sql change): Do not limit precision when encoding geo data types to JSON.
This was referenced May 21, 2024
rharding6373
added a commit
to rharding6373/cockroach
that referenced
this issue
May 22, 2024
We used to set a default limit of 9 digit precision when converting geo datums to json. However, some users expect higher precision in json. This PR changes the default precision to -1, which allows arbitrary precision with our geo library. Because of truncation when the data enters the database, there is a limit to the precision, but now the json output matches the database data. Epic: none Fixes: cockroachdb#124175 Release note(sql change): Do not limit precision when encoding geo data types to JSON.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-cdc
Change Data Capture
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-support
Originated from a customer
P-2
Issues/test failures with a fix SLA of 3 months
T-cdc
Is your feature request related to a problem? Please describe.
Currently, the number of decimal digits coordinates in GeoJSON is hardcoded at 9
via the DefaultGeoJSONDecimalDigits constant. A customer wants a higher precision
in this escalation https://github.com/cockroachlabs/support/issues/2946. Is it possible to increase the
default decimal digits or make this number configurable?
If this is not something we want to support, are there any workarounds for this?
I recommended adding a new column using the built in function
ST_AsText()
, but Iwas wondering if there are better options here.
Jira issue: CRDB-38745
The text was updated successfully, but these errors were encountered: