Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC-0005 Phase 2, annotated string functions and added tests. #1

Open
wants to merge 2 commits into
base: RFC_5_UDF_STATS_PHASE_1
Choose a base branch
from

Conversation

ScrapCodes
Copy link
Owner

@ScrapCodes ScrapCodes commented Oct 9, 2024

Description

  1. Annotated the scalar functions in StringFunctions class, with ScalarFunctionConstantStats and ScalarPropagateSourceStats .
  2. Added appropriate tests to check if the stats propagation works as expected.
  3. Updated AbstractCostBasedPlanTests to generate plans with this feature on and off.

Motivation and Context

https://github.com/prestodb/rfcs/blob/main/RFC-0005-functions-stats.md

Impact

None unless the user chooses to enable the feature via setting the session/feature flag.
A new session flag, scalar_function_stats_propagation_enabled and a new feature config will be introduced i.e. optimizer.scalar-function-stats-propagation-enabled, by setting this session flag or feature flag, this feature can be turned on or off.

When the feature is enabled, since string functions are annotated the effect of stats propagation can be measured or seen in the form of plan changes.

Test Plan

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

@ScrapCodes ScrapCodes force-pushed the RFC_5_UDF_STATS_PHASE_2 branch 3 times, most recently from 7f5dc5c to 55e620a Compare October 9, 2024 10:34
@ScrapCodes ScrapCodes force-pushed the RFC_5_UDF_STATS_PHASE_1 branch 2 times, most recently from 99302d3 to 9d77026 Compare October 15, 2024 10:03
@ScrapCodes ScrapCodes force-pushed the RFC_5_UDF_STATS_PHASE_2 branch 2 times, most recently from 608d2ab to 8962804 Compare October 21, 2024 07:06
@ScrapCodes ScrapCodes force-pushed the RFC_5_UDF_STATS_PHASE_2 branch 3 times, most recently from 4eab57e to 4dc9602 Compare October 24, 2024 09:33
…ions` class, with `ScalarFunctionConstantStats` and `ScalarPropagateSourceStats` .

2. Added appropriate tests to check if the stats propagation works as expected.
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