Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sqlc-dev/sqlc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: claude/sqlc-issue-4648-261xzo
Choose a base ref
...
head repository: sqlc-dev/sqlc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 85 files changed
  • 3 contributors

Commits on Oct 19, 2026

  1. googlesql: Spanner schemas, arrays, and a function seed from Spanner (#…

    …4645)
    
    * googlesql: convert ALTER TABLE, views, renames and HIDDEN columns
    
    ALTER TABLE was dropped as unsupported, so columns it added, dropped or
    retyped never reached the catalog. It now converts ADD/DROP COLUMN,
    Spanner's ALTER COLUMN (which restates the type and nullability), ALTER
    COLUMN ... DROP NOT NULL, RENAME COLUMN and RENAME TO; RENAME TABLE
    converts too. CREATE [OR REPLACE] VIEW and DROP VIEW convert, and a
    HIDDEN column is left out of SELECT * as Spanner does.
    
    The new googlesql cases' schemas were checked against Spanner Omni.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01L8QoGi6VRtADkb4jL3BFHP
    
    * googlesql: type arrays, UNNEST, subscripts and typed literals
    
    The converter now handles typed literals (DATE, TIMESTAMP, NUMERIC, JSON,
    bytes), array constructors, INTERVAL, the OFFSET/ORDINAL/SAFE_* subscripts
    and "x IN UNNEST(array)", which becomes "x = ANY(array)".
    
    In the analysis core:
    - A subscript is the array's element, nullable, with an integer index.
    - ARRAY(subquery) is an array of the column, not its first value.
    - "x = ANY(array)" types a placeholder as an array of x's type, as
      PostgreSQL does; sqlc.slice() still gets the element.
    - A polymorphic function taking anyarray and returning anyelement, as
      unnest does, returns the array's element, and a function in FROM takes
      that resolved type, with its alias naming the column.
    
    GoogleSQL gains an unnest seed. analyze_arrays is checked against Spanner
    Omni; the rest are in array_unnest, where Spanner's wire types lose the
    nullability and lengths the golden pins.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01L8QoGi6VRtADkb4jL3BFHP
    
    * googlesql: seed Spanner's functions and operators
    
    functions.jsonl held only count, so every other function typed as any.
    It now lists 291 signatures across aggregates, math, strings, dates and
    timestamps, JSON, arrays, hashing, search and vector distance. Their
    return types, and those of the operators, were read from Spanner Omni by
    compiling each call in PLAN mode; the search functions and
    PENDING_COMMIT_TIMESTAMP, which cannot be compiled in a select list, are
    typed from Spanner's reference. Spanner has no window functions, so none
    are listed.
    
    GoogleSQL now propagates NULL through function arguments, with the
    functions that return NULL from non-null input marked nullable.
    
    The converter maps COALESCE, IFNULL, NULLIF, IF, GREATEST and LEAST onto
    the nodes the core types them by, makes SAFE.f(...) nullable, passes date
    parts (DAY, WEEK(MONDAY)) as strings rather than columns, and converts
    EXTRACT.
    
    In the core, an operator a dialect lists now replaces the one its
    arithmetic rule generates for the same operands, which is how INT64 /
    INT64 is a FLOAT64; and a placeholder passed for a polymorphic parameter
    takes its type from the other arguments, so the value in
    array_includes(array, @v) is the array's element.
    
    analyze_functions is checked against Spanner Omni; func_nullability
    covers what Spanner's wire types cannot report.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01L8QoGi6VRtADkb4jL3BFHP
    
    * goldeneye: generate Spanner's types, functions and operators
    
    Spanner keeps no catalog of its library, so goldeneye now reads it by
    asking. spanner/library.jsonl lists the function signatures to try; each
    is compiled in PLAN mode against a probe database, and the ones Spanner
    accepts are written to functions.jsonl with the type it reports. A
    polymorphic signature is tried with INT64 and STRING and its result must
    hold for both. Calls a select list cannot make are compiled the way they
    can be: SEARCH in a WHERE clause, SCORE over a search index,
    PENDING_COMMIT_TIMESTAMP in an INSERT. operators.jsonl is every binary
    operator Spanner accepts over the operands tried, and types.jsonl the
    types the dialect lists, each one Spanner has checked by a cast; the
    GoogleSQL types only BigQuery has are kept as they are.
    
    The generated files hold the same records the seed already did; they
    are rewritten in goldeneye's compact form, and TestDialect now checks
    all four files against Spanner. The dialect package's Function gains
    never_null, which the seed already reads.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01L8QoGi6VRtADkb4jL3BFHP
    
    ---------
    
    Co-authored-by: Claude <noreply@anthropic.com>
    kyleconroy and claude authored Oct 19, 2026
    Configuration menu
    Copy the full SHA
    40f5d7e View commit details
    Browse the repository at this point in the history
  2. build(deps): bump github.com/jackc/pgx/v4 (#4644)

    Bumps the production-dependencies group with 1 update in the /internal/endtoend/testdata directory: [github.com/jackc/pgx/v4](https://github.com/jackc/pgx).
    
    
    Updates `github.com/jackc/pgx/v4` from 4.18.2 to 4.18.3
    - [Release notes](https://github.com/jackc/pgx/releases)
    - [Changelog](https://github.com/jackc/pgx/blob/v4.18.3/CHANGELOG.md)
    - [Commits](jackc/pgx@v4.18.2...v4.18.3)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/jackc/pgx/v4
      dependency-version: 4.18.3
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: production-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 19, 2026
    Configuration menu
    Copy the full SHA
    0f1602f View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2026

  1. build(deps): bump the production-dependencies group across 2 director…

    …ies with 2 updates (#4650)
    
    Bumps the production-dependencies group with 2 updates in the /examples directory: [github.com/googleapis/go-sql-spanner](https://github.com/googleapis/go-sql-spanner) and [google.golang.org/api](https://github.com/googleapis/google-api-go-client).
    Bumps the production-dependencies group with 1 update in the /internal/goldeneye directory: [google.golang.org/api](https://github.com/googleapis/google-api-go-client).
    
    
    Updates `github.com/googleapis/go-sql-spanner` from 1.26.0 to 1.27.0
    - [Release notes](https://github.com/googleapis/go-sql-spanner/releases)
    - [Changelog](https://github.com/googleapis/go-sql-spanner/blob/main/CHANGES.md)
    - [Commits](googleapis/go-sql-spanner@v1.26.0...v1.27.0)
    
    Updates `google.golang.org/api` from 0.301.0 to 0.304.0
    - [Release notes](https://github.com/googleapis/google-api-go-client/releases)
    - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
    - [Commits](googleapis/google-api-go-client@v0.301.0...v0.304.0)
    
    Updates `google.golang.org/api` from 0.301.0 to 0.304.0
    - [Release notes](https://github.com/googleapis/google-api-go-client/releases)
    - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
    - [Commits](googleapis/google-api-go-client@v0.301.0...v0.304.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/googleapis/go-sql-spanner
      dependency-version: 1.27.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: production-dependencies
    - dependency-name: google.golang.org/api
      dependency-version: 0.304.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: production-dependencies
    - dependency-name: google.golang.org/api
      dependency-version: 0.304.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: production-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 21, 2026
    Configuration menu
    Copy the full SHA
    1911a76 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2026

  1. build(deps): bump github.com/shopspring/decimal (#4652)

    Bumps the production-dependencies group with 1 update in the /internal/endtoend/testdata directory: [github.com/shopspring/decimal](https://github.com/shopspring/decimal).
    
    
    Updates `github.com/shopspring/decimal` from 1.5.0 to 1.6.0
    - [Release notes](https://github.com/shopspring/decimal/releases)
    - [Changelog](https://github.com/shopspring/decimal/blob/master/CHANGELOG.md)
    - [Commits](shopspring/decimal@v1.5.0...v1.6.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/shopspring/decimal
      dependency-version: 1.6.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: production-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 23, 2026
    Configuration menu
    Copy the full SHA
    3ad8b20 View commit details
    Browse the repository at this point in the history
Loading