-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
"expected *DFloat, found *tree.DInt" SQL panic in st_distance() #54326
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
having a schema repro might be useful cc @rytaft mind taking a look? i think a normalisation rule is missing transforming this to an int somehow? |
here's a repro -- definitely normalisation:
|
54366: opt: fix st_distance -> st_dwithin rule to cast distance param as float r=rytaft a=rytaft Release justification: low-risk updates to new functionality This commit fixes an error that could occur when the normalization rule was applied that converts `st_distance(g1, g2) <= d` to `st_dwithin(g1, g2, d)`. The error occurred when `d`, the distance parameter, was some type other than `float`. Since `st_dwithin` requires the distance parameter to have type `float`, this commit fixes the problem by casting the parameter to type `float`. Fixes #54326 Release note (bug fix): fixed an internal error and/or panic that could occur when the ST_Distance or ST_MaxDistance functions were compared against a constant or variable with any type other than float. For example, previously, a query with the predicate `WHERE ST_Distance(g1, g2) < 10::int` could cause an error. Co-authored-by: Rebecca Taft <becca@cockroachlabs.com>
Release justification: low-risk updates to new functionality This commit fixes an error that could occur when the normalization rule was applied that converts st_distance(g1, g2) <= d to st_dwithin(g1, g2, d). The error occurred when d, the distance parameter, was some type other than float. Since st_dwithin requires the distance parameter to have type float, this commit fixes the problem by casting the parameter to type float. Fixes cockroachdb#54326 Release note (bug fix): fixed an internal error and/or panic that could occur when the ST_Distance or ST_MaxDistance functions were compared against a constant or variable with any type other than float. For example, previously, a query with the predicate `WHERE ST_Distance(g1, g2) < 10::int` could cause an error.
Describe the problem
A panic in the
st_distance()
function.To Reproduce
(I can provide steps if the log below isn't enough to determine the issue.)
Additional data / screenshots
Expected behavior
No panic.
Environment:
The text was updated successfully, but these errors were encountered: