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: protegrity/sql-glot-rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.10.4
Choose a base ref
...
head repository: protegrity/sql-glot-rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.10.5
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Jun 29, 2026

  1. fix(generator): map PG EXTRACT field names to valid T-SQL dateparts (…

    …CR-016)
    
    EXTRACT(DOW/DOY/WEEK FROM x) was emitting the Postgres field spelling
    verbatim inside DATEPART(...), which SQL Server rejects (code 155) for
    DOW/DOY and computes non-ISO weeks for WEEK.
    
    - DOW  -> (DATEPART(WEEKDAY, x) + @@DATEFIRST - 1) % 7  (preserves PG
      0=Sun..6=Sat, @@DATEFIRST-independent)
    - DOY  -> DATEPART(DAYOFYEAR, x)
    - WEEK -> DATEPART(ISO_WEEK, x)  (PG WEEK is ISO-8601)
    - TIMEZONE/TIMEZONE_HOUR/TIMEZONE_MINUTE left unmapped (fail-safe hard
      error instead of wrong units)
    
    Shared gen_datetime_field is untouched; fix is scoped to the T-SQL
    DATEPART branch only. Adds PG->Tsql regression tests.
    yigalrozenberg committed Jun 29, 2026
    Configuration menu
    Copy the full SHA
    c318b51 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5b262f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5be0e95 View commit details
    Browse the repository at this point in the history
Loading