-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feature](variable) 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
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 |
FE Regression Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
seawinde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…mns, and alias functions to persist session variables (apache#58031) 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: - Views - Generated Columns - Materialized Views - Alias Functions When querying these objects, the system automatically uses the persisted session variables from creation time, ensuring consistent results. - Added `sessionVariables` field to `View`, `Column`, `MTMV`, and `AliasFunction` classes - Created `AutoCloseSessionVariable` utility to temporarily apply persisted variables during query processing - Modified view/column/MV/function parsing logic to use persisted session variables - Added `SessionVarGuardExpr` to protect expressions that depend on session variables --------- Co-authored-by: jacktengg <tengjianping@selectdb.com>
…mns, and alias functions to persist session variables (apache#58031) 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: - Views - Generated Columns - Materialized Views - Alias Functions When querying these objects, the system automatically uses the persisted session variables from creation time, ensuring consistent results. - Added `sessionVariables` field to `View`, `Column`, `MTMV`, and `AliasFunction` classes - Created `AutoCloseSessionVariable` utility to temporarily apply persisted variables during query processing - Modified view/column/MV/function parsing logic to use persisted session variables - Added `SessionVarGuardExpr` to protect expressions that depend on session variables --------- Co-authored-by: jacktengg <tengjianping@selectdb.com>
…mns, and alias functions to persist session variables (apache#58031) 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: - Views - Generated Columns - Materialized Views - Alias Functions When querying these objects, the system automatically uses the persisted session variables from creation time, ensuring consistent results. - Added `sessionVariables` field to `View`, `Column`, `MTMV`, and `AliasFunction` classes - Created `AutoCloseSessionVariable` utility to temporarily apply persisted variables during query processing - Modified view/column/MV/function parsing logic to use persisted session variables - Added `SessionVarGuardExpr` to protect expressions that depend on session variables --------- Co-authored-by: jacktengg <tengjianping@selectdb.com>
…mns, and alias functions to persist session variables (apache#58031) ### What problem does this PR solve? 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: - Views - Generated Columns - Materialized Views - Alias Functions When querying these objects, the system automatically uses the persisted session variables from creation time, ensuring consistent results. #### Key Changes - Added `sessionVariables` field to `View`, `Column`, `MTMV`, and `AliasFunction` classes - Created `AutoCloseSessionVariable` utility to temporarily apply persisted variables during query processing - Modified view/column/MV/function parsing logic to use persisted session variables - Added `SessionVarGuardExpr` to protect expressions that depend on session variables --------- Co-authored-by: jacktengg <tengjianping@selectdb.com>
…mv cache (apache#58863) mtmvCache is globally reused, and each query shares the same instance of mtmvCache. When generating the cache, it should not include any attributes that are specific to an individual query. current code has no problem, just add some ut Related PR: apache#58031
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)