-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Block structure mismatch in UnionStep #62486
Copy link
Copy link
Closed
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzerstestingSpecial issue with list of bugs found by CISpecial issue with list of bugs found by CI
Description
CREATE TABLE realtimedistributed (`amount` Int64, `transID` String, `userID` String, `appID` String, `appName` String, `transType` String, `orderSource` String, `nau` String, `fau` String, `transactionType` String, `supplier` String, `fMerchant` String, `bankConnCode` String, `reqDate` DateTime) ENGINE = Distributed(test_cluster_two_shards, currentDatabase(), realtimedrep, rand());
CREATE TABLE realtimebuff__fuzz_19 (`amount` Nullable(Int64), `transID` UInt256, `userID` String, `appID` String, `appName` Nullable(String), `transType` Decimal(38, 3), `orderSource` Nullable(String), `nau` Int8, `fau` LowCardinality(String), `transactionType` String, `supplier` String, `fMerchant` Nullable(String), `bankConnCode` String, `reqDate` DateTime) ENGINE = Buffer(currentDatabase(), 'realtimedistributed', 16, 3600, 36000, 10000, 1000000, 10000000, 100000000);
INSERT INTO realtimebuff__fuzz_19 (amount, transID, userID, appID, appName, transType, orderSource, nau, fau, transactionType, supplier, fMerchant, bankConnCode, reqDate) FORMAT Values
SELECT sum(amount) = 100 FROM realtimebuff__fuzz_19❯ rg -zaui '99f2117c-09e1-4c82-853b-d40fcba4adec' server.log-14.zst -A 10
855396:2024.04.09 21:25:01.993412 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Debug> executeQuery: (from [::ffff:127.0.0.1]:43580) (comment: /workspace/ch/tests/queries/0_stateless/01584_distributed_buffer_cannot_find_column.sql) SELECT sum(amount) = 100 FROM realtimebuff__fuzz_19 (stage: Complete)
855397:2024.04.09 21:25:01.993887 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> Planner: Query SELECT sum(__table1.amount) = 100 AS `equals(sum(amount), 100)` FROM default.realtimebuff__fuzz_19 AS __table1 to stage Complete
855398:2024.04.09 21:25:01.993928 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> ContextAccess (default): Access granted: SELECT(amount) ON default.realtimebuff__fuzz_19
855399:2024.04.09 21:25:01.993993 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Warning> StorageBuffer (default.realtimebuff__fuzz_19): Destination table default.realtimedistributed has different type of column amount (Int64 != Nullable(Int64)). Data from destination table are converted.
855400:2024.04.09 21:25:01.994211 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> Planner: Query SELECT sum(__table1.amount) = 100 AS `equals(sum(amount), 100)` FROM default.realtimedrep AS __table1 to stage WithMergeableState only analyze
855401:2024.04.09 21:25:01.994285 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> Planner: Query SELECT sum(__table1.amount) = 100 AS `equals(sum(amount), 100)` FROM default.realtimedrep AS __table1 from stage FetchColumns to stage WithMergeableState only analyze
855402:2024.04.09 21:25:01.994709 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> Planner: Query SELECT sum(__table1.amount) = 100 AS `equals(sum(amount), 100)` FROM default.realtimedrep AS __table1 to stage WithMergeableState
855403:2024.04.09 21:25:01.994784 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> ContextAccess (default): Access granted: SELECT(amount) ON default.realtimedrep
855404:2024.04.09 21:25:01.994845 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> Planner: Query SELECT sum(__table1.amount) = 100 AS `equals(sum(amount), 100)` FROM default.realtimedrep AS __table1 from stage FetchColumns to stage WithMergeableState
855405:2024.04.09 21:25:01.995093 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> Planner: Query SELECT sum(__table1.amount) = 100 AS `equals(sum(amount), 100)` FROM default.realtimedrep AS __table1 to stage WithMergeableState only analyze
855406:2024.04.09 21:25:01.995155 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Trace> Planner: Query SELECT sum(__table1.amount) = 100 AS `equals(sum(amount), 100)` FROM default.realtimedrep AS __table1 from stage FetchColumns to stage WithMergeableState only analyze
855407:2024.04.09 21:25:01.995330 [ 160 ] {99f2117c-09e1-4c82-853b-d40fcba4adec} <Fatal> : Logical error: 'Block structure mismatch in UnionStep stream: different types:
855408-sum(__table1.amount) AggregateFunction(sum, Int64) AggregateFunction(size = 0)
855409-sum(__table1.amount) AggregateFunction(sum, Int64) AggregateFunction(size = 0)'.
855410-2024.04.09 21:25:02.000100 [ 831 ] {} <Trace> AsynchronousMetrics: MemoryTracking: was 3.30 GiB, peak 4.48 GiB, free memory in arenas 0.00 B, will set to 3.29 GiB (RSS), difference: -11.08 MiB
column amount is Nullable in one case and not-nullable in the other.
maybe we should throw an exception during create table?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzerstestingSpecial issue with list of bugs found by CISpecial issue with list of bugs found by CI