mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Merge pull request #53439 from canhld94/timeout_overflow_break_subquery
Fix timeout_overflow_mode when having subquery in the rhs of IN
This commit is contained in:
commit
00e2e3184b
@ -198,7 +198,11 @@ SetPtr FutureSetFromSubquery::buildOrderedSetInplace(const ContextPtr & context)
|
||||
CompletedPipelineExecutor executor(pipeline);
|
||||
executor.execute();
|
||||
|
||||
set_and_key->set->checkIsCreated();
|
||||
/// SET may not be created successfully at this step because of the sub-query timeout, but if we have
|
||||
/// timeout_overflow_mode set to `break`, no exception is thrown, and the executor just stops executing
|
||||
/// the pipeline without setting `set_and_key->set->is_created` to true.
|
||||
if (!set_and_key->set->isCreated())
|
||||
return nullptr;
|
||||
|
||||
return set_and_key->set;
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
DROP TABLE IF EXISTS t;
|
||||
CREATE TABLE t (key UInt64, value UInt64, INDEX value_idx value TYPE bloom_filter GRANULARITY 1) ENGINE=MergeTree() ORDER BY key;
|
||||
|
||||
INSERT INTO t SELECT number, rand()%1000 FROM numbers(10000);
|
||||
|
||||
SET timeout_overflow_mode='break';
|
||||
SET max_execution_time=0.1;
|
||||
SELECT * FROM t WHERE value IN (SELECT number FROM numbers(1000000000));
|
||||
|
||||
DROP TABLE t;
|
Loading…
Reference in New Issue
Block a user