Skip to content

Comments

misc: Minor index related code improvement#15878

Open
xiaoxmeng wants to merge 1 commit intofacebookincubator:mainfrom
xiaoxmeng:export-D89942683
Open

misc: Minor index related code improvement#15878
xiaoxmeng wants to merge 1 commit intofacebookincubator:mainfrom
xiaoxmeng:export-D89942683

Conversation

@xiaoxmeng
Copy link
Contributor

Summary:
This diff adds support for cluster index bounds filtering to ScanSpec and refactors some index-related code for better organization.

  • ScanSpec IndexBounds Support (velox/dwio/common/ScanSpec.h):
    Added setIndexBounds() and indexBounds() methods to enable cluster index filtering on top-level columns
    The index bounds specify a range of values for index columns that can be used to skip stripes/rows during scanning
  • Index Constants Refactoring (dwio/nimble/index/IndexConstants.h):
    Introduced new header file defining kKeyStreamId constant (UINT32_MAX) as a placeholder stream ID for cluster index key streams. This reserved ID ensures no conflicts with regular data streams
  • StripeIndexGroup Enhancement (dwio/nimble/index/StripeIndexGroup.h):
    Added streamId() accessor method to StreamIndex class for retrieving the stream ID
  • IndexWriter Cleanup (dwio/nimble/velox/IndexWriter.cpp):
    Refactored to use the new kKeyStreamId constant instead of inline std::numeric_limits<offset_size>::max()

Differential Revision: D89942683

@netlify
Copy link

netlify bot commented Dec 31, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit c0bfa20
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/6955c58e78302f0008b3a5b7

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 31, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 31, 2025

@xiaoxmeng has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89942683.

xiaoxmeng added a commit to xiaoxmeng/velox that referenced this pull request Dec 31, 2025
…or (facebookincubator#15878)

Summary:

X-link: facebookincubator/nimble#396

This diff adds support for cluster index bounds filtering to ScanSpec and refactors some index-related code for better organization.

* ScanSpec IndexBounds Support (velox/dwio/common/ScanSpec.h):
  Added setIndexBounds() and indexBounds() methods to enable cluster index filtering on top-level columns
  The index bounds specify a range of values for index columns that can be used to skip stripes/rows during scanning
* Index Constants Refactoring (dwio/nimble/index/IndexConstants.h):
  Introduced new header file defining kKeyStreamId constant (UINT32_MAX) as a placeholder stream ID for cluster index key streams. This reserved ID ensures no conflicts with regular data streams
* StripeIndexGroup Enhancement (dwio/nimble/index/StripeIndexGroup.h):
 Added streamId() accessor method to StreamIndex class for retrieving the stream ID
* IndexWriter Cleanup (dwio/nimble/velox/IndexWriter.cpp):
  Refactored to use the new kKeyStreamId constant instead of inline std::numeric_limits<offset_size>::max()

Reviewed By: Yuhta

Differential Revision: D89942683
xiaoxmeng added a commit to xiaoxmeng/nimble that referenced this pull request Dec 31, 2025
…or (facebookincubator#396)

Summary:
X-link: facebookincubator/velox#15878


This diff adds support for cluster index bounds filtering to ScanSpec and refactors some index-related code for better organization.

* ScanSpec IndexBounds Support (velox/dwio/common/ScanSpec.h):
  Added setIndexBounds() and indexBounds() methods to enable cluster index filtering on top-level columns
  The index bounds specify a range of values for index columns that can be used to skip stripes/rows during scanning
* Index Constants Refactoring (dwio/nimble/index/IndexConstants.h):
  Introduced new header file defining kKeyStreamId constant (UINT32_MAX) as a placeholder stream ID for cluster index key streams. This reserved ID ensures no conflicts with regular data streams
* StripeIndexGroup Enhancement (dwio/nimble/index/StripeIndexGroup.h):
 Added streamId() accessor method to StreamIndex class for retrieving the stream ID
* IndexWriter Cleanup (dwio/nimble/velox/IndexWriter.cpp):
  Refactored to use the new kKeyStreamId constant instead of inline std::numeric_limits<offset_size>::max()

Reviewed By: Yuhta

Differential Revision: D89942683
@xiaoxmeng xiaoxmeng changed the title feat: Add index bounds setting in ScanSpec and some index code refactor misc: Minor index related code improvement Dec 31, 2025
Summary:

X-link: facebookincubator/nimble#396

This diff adds support for cluster index bounds filtering to ScanSpec and refactors some index-related code for better organization.

* Index Constants Refactoring (dwio/nimble/index/IndexConstants.h):
  Introduced new header file defining kKeyStreamId constant (UINT32_MAX) as a placeholder stream ID for cluster index key streams. This reserved ID ensures no conflicts with regular data streams
* StripeIndexGroup Enhancement (dwio/nimble/index/StripeIndexGroup.h):
 Added streamId() accessor method to StreamIndex class for retrieving the stream ID
* IndexWriter Cleanup (dwio/nimble/velox/IndexWriter.cpp):
  Refactored to use the new kKeyStreamId constant instead of inline std::numeric_limits<offset_size>::max()

Reviewed By: duxiao1212, Yuhta

Differential Revision: D89942683
xiaoxmeng added a commit to xiaoxmeng/nimble that referenced this pull request Jan 1, 2026
Summary:
X-link: facebookincubator/velox#15878


This diff adds support for cluster index bounds filtering to ScanSpec and refactors some index-related code for better organization.

* Index Constants Refactoring (dwio/nimble/index/IndexConstants.h):
  Introduced new header file defining kKeyStreamId constant (UINT32_MAX) as a placeholder stream ID for cluster index key streams. This reserved ID ensures no conflicts with regular data streams
* StripeIndexGroup Enhancement (dwio/nimble/index/StripeIndexGroup.h):
 Added streamId() accessor method to StreamIndex class for retrieving the stream ID
* IndexWriter Cleanup (dwio/nimble/velox/IndexWriter.cpp):
  Refactored to use the new kKeyStreamId constant instead of inline std::numeric_limits<offset_size>::max()

Reviewed By: duxiao1212, Yuhta

Differential Revision: D89942683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants