#pragma once #include #include #include #include namespace DB { struct StorageInMemoryMetadata; using NameToTypeMap = std::map; struct TableOverrideAnalyzer { struct Result { NameToTypeMap existing_types; NamesAndTypes order_by_columns; NamesAndTypes primary_key_columns; NamesAndTypes partition_by_columns; NamesAndTypes sample_by_columns; NamesAndTypes ttl_columns; NamesAndTypes added_columns; NamesAndTypes modified_columns; void appendTo(WriteBuffer &); }; ASTTableOverride * override; explicit TableOverrideAnalyzer(ASTPtr ast) : override(assert_cast(ast.get())) { } void analyze(const StorageInMemoryMetadata & metadata, Result & result) const; }; }