feat(exclude_columns): Add excluded columns to codegen output#5
Merged
kazegusuri merged 3 commits intomainfrom Dec 10, 2025
Merged
feat(exclude_columns): Add excluded columns to codegen output#5kazegusuri merged 3 commits intomainfrom
kazegusuri merged 3 commits intomainfrom
Conversation
Add `excluded_columns` field to both Table and Query protobuf messages, allowing codegen plugins to access information about which columns were excluded from star expansion. Changes: - Add `IsExcluded` field to `catalog.Column` to track excluded state - Add `MarkExcludedColumns()` method to Compiler to mark columns after catalog parsing based on exclude_columns config - Add `ExcludedColumns` field to `compiler.Query` struct - Update `expand()` and `outputColumnsWithExcluded()` to return excluded columns separately from included columns - Update `pluginCatalog()` and `pluginQueries()` in shim.go to populate the new `excluded_columns` fields - Add proto definitions for `Table.excluded_columns` and `Query.excluded_columns` - Add E2E test for exclude_columns feature - Normalize JSON file paths in E2E tests for environment independence 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix proto lint errors: - Rename SORT_BY_DIR_UNDEFINED to SORT_BY_DIR_UNSPECIFIED - Rename SORT_BY_NULLS_UNDEFINED to SORT_BY_NULLS_UNSPECIFIED - Rename SourceLocation fields to snake_case (leading_detached_comments, etc.) - Add Deparse variable to parse_wasi.go for windows/non-cgo builds - Update E2E test data with new field names 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update path normalization to use /sqlc/sqlc/ prefix to match CI environment where the repo is cloned into /home/runner/work/sqlc/sqlc/. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
ShinyaIshitobi
approved these changes
Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
excluded_columnsfield to codegen plugin output so that excluded columns are accessibleChanges
IsExcludedfield tocatalog.Columnto track excluded stateMarkExcludedColumns()method to Compiler (marks columns after catalog parsing based on exclude_columns config)ExcludedColumnsfield tocompiler.Queryexpand()andoutputColumnsWithExcluded()to return excluded columns separatelypluginCatalog()andpluginQueries()in shim.go to populate the newexcluded_columnsfieldsTable.excluded_columnsandQuery.excluded_columns🤖 Generated with Claude Code