Skip to content

Conversation

@kazegusuri
Copy link
Contributor

Summary

  • Add excluded_columns field to codegen plugin output so that excluded columns are accessible
  • Both Table and Query now expose excluded column information

Changes

  • Add IsExcluded field to catalog.Column to track excluded state
  • Add MarkExcludedColumns() method to Compiler (marks columns after catalog parsing based on exclude_columns config)
  • Add ExcludedColumns field to compiler.Query
  • Update expand() and outputColumnsWithExcluded() to return excluded columns separately
  • 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

kazegusuri and others added 3 commits December 10, 2025 13:56
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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Copy link
Member

@sivchari sivchari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

@kazegusuri kazegusuri merged commit 22eeb0a into main Dec 10, 2025
12 checks passed
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.

4 participants