Skip to content

Conversation

@blathers-crl
Copy link

@blathers-crl blathers-crl bot commented Oct 24, 2025

Backport 4/4 commits from #155864 on behalf of @DrewKimball.


hints: separate out hint protobuf into separate package

This commit adds a new package hintpb for the protobuf structs used
to store hints in the system.statement_hints table. This will avoid
dependency cycles in future commits.

Epic: None

Release note: None

hints: add injection hint and refactor usage of hint union

This commit adds the protobuf struct for injecting "internal" hints
like (index or join hints) into a statement's AST. This can be serialized
and inserted into the system.statement_hints table. This commit also
refactors the way hints are represented in memory.

Informs #153633

Release note: None

sql/hints: extract hints system table interfacing logic

This commit extracts helper functions used by the hints package to
interface with the system.statement_hints table and adds tests for
the helpers.

Epic: None

Release note: None

sql,hints: add builtin function to add statement hint for hint "injection"

This commit adds a new builtin function for inserting "hint injection" hints
into the system.statement_hints table. Currently, the provided hinted SQL
is serialized as-is into the hint. A future PR will add validation to ensure
that the hinted SQL matches the fingerprint, and that the hints can be
transferred.

Informs #153633

Release note: None


Release justification: low-risk preview functionality

This commit adds a new package `hintpb` for the protobuf structs used
to store hints in the `system.statement_hints` table. This will avoid
dependency cycles in future commits.

Epic: None

Release note: None
This commit adds the protobuf struct for injecting "internal" hints
like (index or join hints) into a statement's AST. This can be serialized
and inserted into the `system.statement_hints` table. This commit also
refactors the way hints are represented in memory.

Informs #153633

Release note: None
This commit extracts helper functions used by the `hints` package to
interface with the `system.statement_hints` table and adds tests for
the helpers.

Epic: None

Release note: None
…tion"

This commit adds a new builtin function for inserting "hint injection" hints
into the `system.statement_hints` table. Currently, the provided hinted SQL
is serialized as-is into the hint. A future PR will add validation to ensure
that the hinted SQL matches the fingerprint, and that the hints can be
transferred.

Informs #153633

Release note: None
@blathers-crl blathers-crl bot requested review from a team as code owners October 24, 2025 21:11
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-25.4-155864 branch from b318b60 to d611e23 Compare October 24, 2025 21:11
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Oct 24, 2025
@blathers-crl blathers-crl bot requested review from ZhouXing19 and removed request for a team October 24, 2025 21:11
@blathers-crl blathers-crl bot requested review from DrewKimball and michae2 October 24, 2025 21:11
@blathers-crl
Copy link
Author

blathers-crl bot commented Oct 24, 2025

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

@blathers-crl blathers-crl bot added backport Label PR's that are backports to older release branches T-sql-queries SQL Queries Team labels Oct 24, 2025
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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

Labels

backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-sql-queries SQL Queries Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants