This can be useful in the following scenarious:
- you want to duplicate the data to another table and you don't care
about the errors
- you want to duplicate system.*_log to another server, you are adding
materialized view that will push to Distributed table, but you don't
want to miss original blocks in the local system.*_log
- you want to push some data to a 3d party service, using i.e. URL
engine.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
An issue was opened as the select query was not updated after the alert of the view was executed, this is because the select gets ignored, the only way to change it is DROP/CREATE the view again.
So I want to add this information into our doc.
Implementation
* Fix for clang-today build fails - updated to use const in Context.cpp & const function in ActionsVisitior.cpp
* Updated to use QueryParameterVisitor to check if query has query parameters
* Updated executeTableFunction to check if table/table exists instead of try-catch approach
* Fixed small review comments and style comments.
Documentation:
* Addressed review comments and added the LIVE view part which was removed by mistake in the previous commits.
Implementation:
* Updated parsers by adding a bool allow_query_parameters while creating ordinary view, which is used in interpreters to allow query parameters in SELECT.
* Added a check in ActionsVisitor if multiple parameters have same names while creating parameterised view.
* Added bool in StorageView to represent parameterized view.
* Updated processing of SELECT with parameter values to check for views and added substitution of values in the query parameters.
Testing:
* Added a test tests/queries/0_stateless/02428_parameterized_view.sql
Documentation:
* Updated the english documentation for VIEW.
* Alter mv and lv (en)
* Translated to Russian. Fixes.
* Fixes
* Update docs/en/sql-reference/statements/alter/view.md
Co-authored-by: Ivan Blinkov <github@blinkov.ru>
Co-authored-by: Ivan Blinkov <github@blinkov.ru>