Skip to content

Advance the pin to DuckDB v2.0.1 - #7

Open
kyleconroy wants to merge 4 commits into
mainfrom
claude/project-thread-09pss8
Open

kyleconroy wants to merge 4 commits into
mainfrom
claude/project-thread-09pss8

Conversation

@kyleconroy

Copy link
Copy Markdown
Contributor

Requested by Kyle · project thread

Advances the pin from DuckDB v2.0.0 to v2.0.1 (8d78114e90, released 2026-11-19) through the regeneration workflow.

Grammar and engine

  • Re-vendored 13 .gram files verbatim from v2.0.1. The keyword lists did not change.
  • Lexer: . starts a number only when a digit follows it. Otherwise it lexes as an operator, so users..id is now a syntax error, as it is upstream.
  • Matcher: new DottedName override, a port of DottedNameMatcher, used by INSTALL ... FROM and external resource types. Also adds ReservedTableFunctionName and memoizes ParensTableRef.

Transformer and AST

  • Single-arrow lambdas and -> / ->> JSON chains are parsed through the new OtherOperator tails. ANY/ALL subquery tails are handled there too.
  • New statement syntax:
    • CREATE INDEX CONCURRENTLY, recorded as CreateIndexInfo.Concurrently.
    • SET LOCAL|SESSION TIME ZONE and RESET [scope] TIME ZONE.
    • Joins wrapped in parentheses as the whole table ref.
    • CREATE EXTENSION REPOSITORY ... FROM <host>.
    • SHOW [ALL] EXTERNAL RESOURCES [TYPE t] and SHOW EXTERNAL RESOURCE TYPES, both desugared to table functions as upstream does.
  • Nested qualified names follow QualifiedName::FromPath. This adds QualifiedName.Qualification and UseStatement.Path. USE a.b.c, SHOW TABLES FROM a.b.c and deep COMMENT ON names now parse instead of raising "Too many qualifications".
  • New upstream Parser Errors:
    • ESCAPE with SIMILAR TO or regex match operators.
    • REPEATABLE seed out of range.
    • Empty extension repository prefix.
  • Other upstream behavior changes:
    • -2147483648 is BIGINT.
    • The EXCLUDE/REPLACE message lost its extra quotes.
    • Set-op flattening only applies to chain-built nodes.
  • ast.ExternalResourceShow is removed, because upstream now desugars SHOW EXTERNAL RESOURCES.

Corpus and goldens

  • Corpus regenerated against the v2.0.1 CLI: 62,552 statements in 5,412 files (60,401 must-accept, 2,143 must-reject).
  • 36 new bind-time setting/pragma Parser Errors are marked todo with the standard note, since they are raised outside the parse pipeline.
  • Serialize sweep over the corpus SELECT subset: 34,901 match, 0 mismatch, 118 skipped. Goldens rewritten (2,908 cases).
  • v2.0.1 serialization adds is_legacy_function_call. Only the outermost call of an AT TIME ZONE chain carries a location.

Testing

  • go build ./... && go vet ./... && gofmt -l . && go test -race ./... passes.
  • New parser/stmt_v201_test.go pins the new syntax and messages; each one was checked against the oracle.

Notes

  • The release CLI download was not reachable from the build environment. The oracle was built from the v2.0.1 tag with OVERRIDE_GIT_DESCRIBE=v2.0.1 (core_functions, icu, json, parquet, autocomplete). duckdbsrc.ReleaseURL points at the official v2.0.1 asset.
  • Not ported, because darkwing's output does not model them: the CTAS WITH NO DATA LIMIT rewrite, CTE visibility for PIVOT enum extraction, and the performance-only transformer changes.

Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4HRrRLBPqxCRMFCvAX
The v2.0.1 json_serialize_sql output adds is_legacy_function_call to
function and window expressions, and only the outermost call of an
AT TIME ZONE chain carries a location. The corpus SELECT sweep is now
34,901 match, 0 mismatch, 118 skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuRZ4HRrRLBPqxCRMFCvAX
@kyleconroy kyleconroy self-assigned this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants