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

opt: fix st_distance -> st_dwithin rule to cast distance param as float #54366

Merged
merged 1 commit into from
Sep 15, 2020

Commits on Sep 14, 2020

  1. opt: fix st_distance -> st_dwithin rule to cast distance param as float

    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.
    rytaft committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    06f6f36 View commit details
    Browse the repository at this point in the history