vagetablechicken commented on issue #3504:
URL: 
https://github.com/apache/incubator-doris/issues/3504#issuecomment-670300596


   ### The crash plan fragment's log
   ```
   plan_root=
    conjuncts=[] id=4 type=ASSERT_NUM_ROWS_NODE tuple_ids=[5, ]
     ExchangeNode(#senders=4 conjuncts=[] id=28 type=EXCHANGE_NODE 
tuple_ids=[6, ])
   ```
   
   Then I print the log below.
   
https://github.com/apache/incubator-doris/blob/eefad13107ac74a406212e0f0f57181973ac9c1e/be/src/exec/exec_node.cpp#L340
   
   log in creating ASSERT_NUM_ROWS_NODE:
   ```
   TPlanNode {
     01: node_id (i32) = 4,
     02: node_type (i32) = 23,
     03: num_children (i32) = 1,
     04: limit (i64) = -1,
     05: row_tuples (list) = list<i32>[1] {
       [0] = 5,
     },
     06: nullable_tuples (list) = list<bool>[1] {
       [0] = false,
     },
     08: compact_data (bool) = false,
     32: assert_num_rows_node (struct) = TAssertNumRowsNode {
       01: desired_num_rows (i64) = 1,
       02: subquery_string (string) = "SELECT avg(`ss_net_profit`) AS 
`rank_col` FROM `default_cluster:tpcds`.`store_sales` WHERE (`ss_store_sk` = 4) 
AND (`ss_addr_sk` IS NULL) GROUP BY `ss_store_sk`",
     },
   }
   ```
   log in createing the child ExchangeNode:
   ```
   TPlanNode {
     01: node_id (i32) = 28,
     02: node_type (i32) = 9,
     03: num_children (i32) = 0,
     04: limit (i64) = -1,
     05: row_tuples (list) = list<i32>[1] {
       [0] = 6,
     },
     06: nullable_tuples (list) = list<bool>[1] {
       [0] = false,
     },
     08: compact_data (bool) = false,
     15: exchange_node (struct) = TExchangeNode {
       01: input_row_tuples (list) = list<i32>[1] {
         [0] = 6,
       },
     },
   }
   ```
   
   The AssertNumRowsNode get batch from its child,  but its row_tuples id is 6.
   Then it has a sink node, the sink node use the same row_tuples id as root 
plan node(AssertNumRowsNode), so it is 5.
   
   Thus, the sink node use `Tuple(id=5 size=24 slots=[Slot(id=12 type=INT 
col=-1 offset=4 null=(offset=0 mask=80)), Slot(id=13 type=VARCHAR col=-1 
offset=8 null=(offset=0 mask=40))] has_varlen_slots=1)` to parse data created 
in `Tuple(id=6 size=24 slots=[Slot(id=14 type=INT col=-1 offset=4 
null=(offset=0 mask=80)), Slot(id=15 type=DECIMALV2(9, 0) col=-1 offset=8 
null=(offset=0 mask=40))] has_varlen_slots=0)`
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to