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

feat(spanner/spansql): fix (date|timestamp) comparison parse. #4471

Closed
wants to merge 2 commits into from

Commits on Jul 21, 2021

  1. feat(spanner/spansql): fix (date|timestamp) comparison parse.

    This fixes case when query has `date = @date` or `timestamp =
    @timestamp` case.
    Since date and timestamp are not reserved keyword, they can be used as
    ID
    takeshi.nakata committed Jul 21, 2021
    Copy the full SHA
    3d305fa View commit details
    Browse the repository at this point in the history
  2. 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
    02731d4 View commit details
    Browse the repository at this point in the history