sql: port 5 builtin functions to information_schema #158938
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of the stable SQL API effort, expose the following builtin functions in information_schema to complement the existing crdb_internal versions:
The implementations are shared between both schemas to ensure identical behavior. All existing test usages throughout the codebase have been updated to use the information_schema versions to demonstrate the new functions work correctly.
This follows the pattern established in PR #156963 which ported index_usage_statistics and datums_to_bytes to information_schema.
Epic: None
Release note (sql change): Added information_schema versions of 5 builtin functions: crdb_reset_index_usage_stats, crdb_reset_sql_stats, crdb_clear_query_plan_cache, crdb_clear_table_stats_cache, and
crdb_clear_statement_hints_cache. These complement the existing crdb_internal versions as part of the stable SQL API effort.