-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[feature]enables views, materialized views, generated columns, and alias functions to persist session variables #58031
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
base: master
Are you sure you want to change the base?
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 33958 ms |
TPC-DS: Total hot run time: 180135 ms |
|
run buildall |
1 similar comment
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
TPC-H: Total hot run time: 33798 ms |
TPC-DS: Total hot run time: 181914 ms |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
TPC-H: Total hot run time: 33656 ms |
TPC-DS: Total hot run time: 188127 ms |
ClickBench: Total hot run time: 27.61 s |
|
run buildall |
TPC-H: Total hot run time: 34165 ms |
TPC-DS: Total hot run time: 188856 ms |
ClickBench: Total hot run time: 27.65 s |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
1 similar comment
|
run buildall |
TPC-H: Total hot run time: 34060 ms |
TPC-DS: Total hot run time: 187928 ms |
ClickBench: Total hot run time: 27.66 s |
|
run cloud_p0 |
FE Regression Coverage ReportIncrement line coverage |
60b520a to
2bb7386
Compare
|
run buildall |
FE Regression Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
|
run buildall |
|
run buildall |
|
run buildall |
|
run buildall |
TPC-H: Total hot run time: 34246 ms |
TPC-DS: Total hot run time: 187256 ms |
ClickBench: Total hot run time: 27.82 s |
FE Regression Coverage ReportIncrement line coverage |
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
When creating views, generated columns, materialized views, or alias functions, session variables that affect query results (e.g.,
enable_decimal256) are not persisted. This causes inconsistent query results when session variables differ between creation and query time.This PR persists session variables marked with
affectQueryResult()annotation for:When querying these objects, the system automatically uses the persisted session variables from creation time, ensuring consistent results.
Key Changes
sessionVariablesfield toView,Column,MTMV, andAliasFunctionclassesAutoCloseSessionVariableutility to temporarily apply persisted variables during query processingSessionVarGuardExprto protect expressions that depend on session variablesRelease note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)