Skip to content

feat: add SQLCEXPERIMENT environment variable for experimental features#4228

Merged
kyleconroy merged 1 commit intomainfrom
claude/add-sqlcexperiment-env-var-01MUoyAKp4mkNiTkMUXnzS1d
Dec 10, 2025
Merged

feat: add SQLCEXPERIMENT environment variable for experimental features#4228
kyleconroy merged 1 commit intomainfrom
claude/add-sqlcexperiment-env-var-01MUoyAKp4mkNiTkMUXnzS1d

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

Add a SQLCEXPERIMENT environment variable modeled after Go's GOEXPERIMENT
that allows enabling/disabling experimental features via a comma-separated
list of experiment names. Experiments can be prefixed with "no" to
explicitly disable them.

This provides infrastructure for gating experimental features before they
are ready for general availability.

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

Add a SQLCEXPERIMENT environment variable modeled after Go's GOEXPERIMENT
that allows enabling/disabling experimental features via a comma-separated
list of experiment names. Experiments can be prefixed with "no" to
explicitly disable them.

This provides infrastructure for gating experimental features before they
are ready for general availability.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. 🔧 golang labels Dec 10, 2025
@kyleconroy kyleconroy merged commit 74ecda5 into main Dec 10, 2025
13 checks passed
@kyleconroy kyleconroy deleted the claude/add-sqlcexperiment-env-var-01MUoyAKp4mkNiTkMUXnzS1d branch December 10, 2025 21:57
msaher added a commit to msaher/sqlc that referenced this pull request May 8, 2026
Closes sqlc-dev#4228.

The resolver fails to infer the type of a CTE column because it only
searches normal tables. My solution is to have two passes, one where
we search the CTE columns first (making them shadow regular tables) then
if not found, we search through regular tables.

We cannot simply add the CTE column in the existing `typeMap` because a
CTE and a regular table will have the same column name which will
trigger the `found > 1` check and the column will be considered
ambiguous. So we use a different typeMap for CTEs so we can separate the
search
msaher added a commit to msaher/sqlc that referenced this pull request May 8, 2026
Closes sqlc-dev#4228.

The resolver fails to infer the type of a CTE column because it only
searches normal tables. My solution is to have two passes, one where
we search the CTE columns first (making them shadow regular tables) then
if not found, we search through regular tables.

We cannot simply add the CTE column in the existing `typeMap` because a
CTE and a regular table will have the same column name which will
trigger the `found > 1` check and the column will be considered
ambiguous. So we use a different typeMap for CTEs so we can separate the
search
msaher added a commit to msaher/sqlc that referenced this pull request May 8, 2026
Closes sqlc-dev#4228.

The resolver fails to infer the type of a CTE column because it only
searches normal tables. My solution is to have two passes, one where
we search the CTE columns first (making them shadow regular tables) then
if not found, we search through regular tables.

We cannot simply add the CTE column in the existing `typeMap` because a
CTE and a regular table will have the same column name which will
trigger the `found > 1` check and the column will be considered
ambiguous. So we use a different typeMap for CTEs so we can separate the
search
msaher added a commit to msaher/sqlc that referenced this pull request May 8, 2026
Closes sqlc-dev#4228.

The resolver fails to infer the type of a CTE column because it only
searches normal tables. My solution is to have two passes, one where
we search the CTE columns first (making them shadow regular tables) then
if not found, we search through regular tables.

We cannot simply add the CTE column in the existing `typeMap` because a
CTE and a regular table will have the same column name which will
trigger the `found > 1` check and the column will be considered
ambiguous. So we use a different typeMap for CTEs so we can separate the
search
msaher added a commit to msaher/sqlc that referenced this pull request May 8, 2026
Closes sqlc-dev#4228.

The resolver fails to infer the type of a CTE column because it only
searches normal tables. My solution is to have two passes, one where
we search the CTE columns first (making them shadow regular tables) then
if not found, we search through regular tables.

We cannot simply add the CTE column in the existing `typeMap` because a
CTE and a regular table will have the same column name which will
trigger the `found > 1` check and the column will be considered
ambiguous. So we use a different typeMap for CTEs so we can separate the
search
msaher added a commit to msaher/sqlc that referenced this pull request May 8, 2026
Closes sqlc-dev#4228.

The resolver fails to infer the type of a CTE column because it only
searches normal tables. My solution is to have two passes, one where
we search the CTE columns first (making them shadow regular tables) then
if not found, we search through regular tables.

We cannot simply add the CTE column in the existing `typeMap` because a
CTE and a regular table will have the same column name which will
trigger the `found > 1` check and the column will be considered
ambiguous. So we use a different typeMap for CTEs so we can separate the
search
msaher added a commit to msaher/sqlc that referenced this pull request May 8, 2026
Closes sqlc-dev#4228.

The resolver fails to infer the type of a CTE column because it only
searches normal tables. My solution is to have two passes, one where
we search the CTE columns first (making them shadow regular tables) then
if not found, we search through regular tables.

We cannot simply add the CTE column in the existing `typeMap` because a
CTE and a regular table will have the same column name which will
trigger the `found > 1` check and the column will be considered
ambiguous. So we use a different typeMap for CTEs so we can separate the
search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. 🔧 golang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants