mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
ISSUES-195 fix complex in expression with single element
This commit is contained in:
parent
94f38d744e
commit
c74970c098
@ -1570,7 +1570,9 @@ void ExpressionAnalyzer::makeSetsForIndexImpl(const ASTPtr & node, const Block &
|
||||
{
|
||||
try
|
||||
{
|
||||
makeExplicitSet(func, sample_block, true);
|
||||
ExpressionActionsPtr temp_actions = std::make_shared<ExpressionActions>(columns, settings);
|
||||
getRootActions(func->arguments->children.at(0), true, false, temp_actions);
|
||||
makeExplicitSet(func, temp_actions->getSampleBlock(), true);
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
|
@ -0,0 +1,2 @@
|
||||
2018-01-29 100 key
|
||||
2018-01-29 100 key
|
@ -0,0 +1,9 @@
|
||||
DROP TABLE IF EXISTS test.test;
|
||||
|
||||
|
||||
CREATE TABLE test.test ( dt Date, site_id Int32, site_key String ) ENGINE = MergeTree(dt, (site_id, site_key, dt), 8192);
|
||||
INSERT INTO test.test (dt,site_id, site_key) VALUES ('2018-1-29', 100, 'key');
|
||||
SELECT * FROM test.test WHERE toInt32(site_id) IN (100);
|
||||
SELECT * FROM test.test WHERE toInt32(site_id) IN (100,101);
|
||||
|
||||
DROP TABLE IF EXISTS test.test;
|
Loading…
Reference in New Issue
Block a user