compatibility with remote

This commit is contained in:
Alexey Boykov 2021-07-20 16:10:55 +03:00
parent 83e581244c
commit e8e34ba786
4 changed files with 19 additions and 2 deletions

View File

@ -32,7 +32,7 @@ public:
ColumnPtr executeImpl(const ColumnsWithTypeAndName &, const DataTypePtr &, size_t input_rows_count) const override
{
return DataTypeString().createColumnConst(input_rows_count, query_id);
return DataTypeString().createColumnConst(input_rows_count, query_id)->convertToFullColumnIfConst();
}
};

View File

@ -1,2 +1,7 @@
CREATE TABLE tmp ENGINE = TinyLog AS SELECT queryID();
CREATE TABLE tmp ENGINE = TinyLog AS SELECT initialQueryID();
3
3
1
1
3

View File

@ -1,3 +1,5 @@
DROP TABLE IF EXISTS tmp;
CREATE TABLE tmp ENGINE = TinyLog AS SELECT queryID();
SYSTEM FLUSH LOGS;
SELECT query FROM system.query_log WHERE query_id = (SELECT * FROM tmp) AND current_database = currentDatabase() LIMIT 1;
@ -8,3 +10,12 @@ SYSTEM FLUSH LOGS;
SELECT query FROM system.query_log WHERE initial_query_id = (SELECT * FROM tmp) AND current_database = currentDatabase() LIMIT 1;
DROP TABLE tmp;
CREATE TABLE tmp (str String) ENGINE = Log;
INSERT INTO tmp (*) VALUES ('a')
SELECT count() FROM (SELECT initialQueryID() FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID());
SELECT count() FROM (SELECT queryID() FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID());
SELECT count() FROM (SELECT queryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID() HAVING t == initialQueryID());
SELECT count(DISTINCT t) FROM (SELECT initialQueryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID());
SELECT count(DISTINCT t) FROM (SELECT queryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID());
DROP TABLE tmp;

View File

@ -175,7 +175,8 @@
"00140_rename",
/// Requires investigation
"00953_zookeeper_suetin_deduplication_bug",
"01783_http_chunk_size"
"01783_http_chunk_size",
"01943_query_id_check"
],
"polymorphic-parts": [
"01508_partition_pruning_long", /// bug, shoud be fixed