Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/github/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func getAllTables() []schemas.Table {
{Name: "additions", Type: schemas.ColumnTypeInt64},
{Name: "deletions", Type: schemas.ColumnTypeInt64},
{Name: "repository", Type: schemas.ColumnTypeString},
{Name: "state", Type: schemas.ColumnTypeEnum, Values: []string{"OPEN", "CLOSED", "MERGED"}, Operators: equalityOperators},
{Name: "state", Type: schemas.ColumnTypeEnum, Values: []string{"OPEN", "CLOSED", "MERGED"}},
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

Removing Operators: equalityOperators here likely disables filter pushdown for PR state (so filtering happens in the SQL engine instead). That can significantly increase GitHub search result sizes/API usage (and rate-limit risk) for common queries; consider instead mapping the enum values to the correct GitHub search qualifiers (e.g., is:open, is:closed, is:merged) so state filtering can still be pushed down efficiently. If pushdown is intentionally disabled, add a short inline comment explaining why this column intentionally omits Operators to prevent someone from reintroducing the broken behavior later.

Suggested change
{Name: "state", Type: schemas.ColumnTypeEnum, Values: []string{"OPEN", "CLOSED", "MERGED"}},
{Name: "state", Type: schemas.ColumnTypeEnum, Values: []string{"OPEN", "CLOSED", "MERGED"}, Operators: equalityOperators},

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would do this but passing is:closed to GitHub also returns merged PRs 😞

{Name: "author_name", Type: schemas.ColumnTypeString},
{Name: "author_login", Type: schemas.ColumnTypeString, Operators: equalityOperators},
{Name: "author_email", Type: schemas.ColumnTypeString},
Expand Down
Loading