Skip to content

ao/co: handle constant-only index projections - #2431

Open
reshke wants to merge 1 commit into
apache:mainfrom
reshke:fix-aocs-constant-index-projection-20261126
Open

reshke wants to merge 1 commit into
apache:mainfrom
reshke:fix-aocs-constant-index-projection-20261126

Conversation

@reshke

@reshke reshke commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

A constant-only index expression leaves the AOCO projection empty. Keep the tuple scan valid by selecting an anchor column, and use all column sizes for the progress estimate until the anchor is initialized.

SQLancer trigger: create an AOCO table, build an index on a column, then build an expression index on ((num_nulls(- (+ (2008221825))))). The latter reached the empty-projection assertion in GetAOCSSSegFilesTotalsWithProj().

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


A constant-only index expression leaves the AOCO projection empty. Keep the tuple scan valid by selecting an anchor column, and use all column sizes for the progress estimate until the anchor is initialized.

SQLancer trigger: create an AOCO table, build an index on a column, then build an expression index on ((num_nulls(- (+ (2008221825))))). The latter reached the empty-projection assertion in GetAOCSSSegFilesTotalsWithProj().
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.

1 participant