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

fix(spanner/spansql): fix unstable SelectFromTable SQL #4473

Merged
merged 1 commit into from Jul 21, 2021

Commits on Jul 21, 2021

  1. feat(spanner/spansql): fix unstable SelectFromTable SQL

    googleapis#4457 made unstable SQL string, and fail test sometimes like this.
    ```
    --- FAIL: TestSQL (0.00s)
        sql_test.go:410: {{false [A] [{Table  map[FORCE_INDEX:Idx GROUPBY_SCAN_OPTIMIZATION:TRUE]}] {4 B b <nil>} [] [] []} [] <nil> <nil>}.SQL() wrong.
             got SELECT A FROM Table@{GROUPBY_SCAN_OPTIMIZATION=TRUE,FORCE_INDEX=Idx} WHERE B = @b
            want SELECT A FROM Table@{FORCE_INDEX=Idx,GROUPBY_SCAN_OPTIMIZATION=TRUE} WHERE B = @b
    ```
    Because map range result is unstable.
    This PR makes the SQL output stable by sorting the Hints keys.
    takeshi.nakata committed Jul 21, 2021
    Copy the full SHA
    32364a1 View commit details
    Browse the repository at this point in the history