Add 02008_aliased_column_distributed_bug.sql

This commit is contained in:
vdimir 2021-08-13 18:27:19 +03:00
parent c4a14ffca2
commit 887d6b0867
No known key found for this signature in database
GPG Key ID: F57B3E10A21DBB31
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
DROP TABLE IF EXISTS click_storage;
DROP TABLE IF EXISTS click_storage_dst;
CREATE TABLE click_storage ( `PhraseID` UInt64, `PhraseProcessedID` UInt64 ALIAS if(PhraseID > 0, PhraseID, 0) ) ENGINE = MergeTree() ORDER BY tuple();
CREATE TABLE click_storage_dst ( `PhraseID` UInt64, `PhraseProcessedID` UInt64 ) ENGINE = Distributed(test_shard_localhost, currentDatabase(), 'click_storage');
SELECT materialize(PhraseProcessedID) FROM click_storage_dst;
DROP TABLE IF EXISTS click_storage;
DROP TABLE IF EXISTS click_storage_dst;