Fixed false positive error messages for queries with IN and ARRAY JOIN. [#CLICKHOUSE-2]

This commit is contained in:
Vitaliy Lyudvichenko 2018-03-16 17:01:00 +03:00
parent 86e4099cc2
commit 1f28410490
3 changed files with 13 additions and 2 deletions

View File

@ -1489,7 +1489,7 @@ void ExpressionAnalyzer::makeSetsForIndexImpl(const ASTPtr & node, const Block &
{
for (auto & child : node->children)
{
/// Process expression only in current subquery
/// Don't descent into subqueries.
if (typeid_cast<ASTSubquery *>(child.get()))
continue;

View File

@ -1,3 +1,7 @@
2018-01-29 100 key
2018-01-29 100 key
2
0 1
1 0
2 0
99 1

View File

@ -22,4 +22,11 @@ ALL INNER JOIN
FROM test.join_with_index
WHERE toUInt64(data) IN (0, 529335254087962442)
) USING (key);
DROP TABLE IF EXISTS test.join_with_index;
SELECT _uniq, _uniq IN (0, 99)
FROM test.join_with_index
ARRAY JOIN
[key, data] AS _uniq
ORDER BY _uniq;
DROP TABLE IF EXISTS test.join_with_index;