-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Add query context for system logs and to Buffer #12120
Add query context for system logs and to Buffer #12120
Conversation
Needed to allow attaching materialized views with joins or with subqueries to system.logs.
src/Interpreters/SystemLog.h
Outdated
@@ -161,6 +161,7 @@ class SystemLog : public ISystemLog, private boost::noncopyable | |||
private: | |||
/* Saving thread data */ | |||
Context & context; |
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.
It would be great to rename it to global_context
and make the reference const
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.
Changing it to const - not possible for now (there are few uses of context in logs). Also kept the existing name, for now, to make backporting smoother.
…Buffer (#12243) Co-authored-by: Alexander Tokmakov <avtokmakov@sandbox-407922969>
Add missing query context for system logs Needed to allow attaching materialized views with joins or with subqueries to system.logs. Fix ClickHouse#10437, CR fixes Sync reference file with changes in sql file Same change for Kafka - just in case, and to make it conform.
Add missing query context for system logs Needed to allow attaching materialized views with joins or with subqueries to system.logs. Fix ClickHouse#10437, CR fixes Sync reference file with changes in sql file Same change for Kafka - just in case, and to make it conform.
Needed to allow attaching materialized views with joins or with subqueries to system.logs or to engine=Buffer underlying table.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Avoid "There is no query" exception for materialized views with joins or with subqueries attached to system logs (system.query_log, metric_log, etc) or to engine=Buffer underlying table.
Detailed description / Documentation draft:
Fixes #10437
Fixes #10285
Fixes #8670