You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/01 15:27:13 UTC

[GitHub] [incubator-doris] morrySnow opened a new issue, #9925: [Bug] (planner) SlotDescriptor set as 'is not null' at right hand in left outer join

morrySnow opened a new issue, #9925:
URL: https://github.com/apache/incubator-doris/issues/9925

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   - master
   - dev-1.0.1
   
   ### What's Wrong?
   
   When plan `left outer join`, we need to set all SlotDescriptor at right hand to nullable. But under some case, it is not happen anymore.
   Because of this error of planner, BE produce wrong result or generate a core dump when execute this query plan.
   core dump as below:
   ```
   #0  0x00007f1477f26bb5 in ?? () from /usr/lib/x86_64-linux-gnu/libc-2.31.so
   #1  0x0000562e62f8c61d in google::LogMessage::Fail () at src/logging.cc:1650
   #2  0x0000562e62f8eb59 in google::LogMessage::SendToLog (this=0x7f1428072020) at src/logging.cc:1607
   #3  0x0000562e62f8c186 in google::LogMessage::Flush (this=0x7f1428072020) at src/logging.cc:1476
   #4  0x0000562e62f8f1c9 in google::LogMessageFatal::~LogMessageFatal (this=<optimized out>, __in_chrg=<optimized out>) at src/logging.cc:2226
   #5  0x0000562e5d2e27b9 in doris::MemPool::allocate<false> (alignment=8, size=-4702111234474983746, this=0x61400086c0f8) at /root/incubator-doris/be/src/runtime/mem_pool.h:248
   #6  doris::MemPool::allocate (this=0x61400086c0f8, size=-4702111234474983746) at /root/incubator-doris/be/src/runtime/mem_pool.h:111
   #7  0x0000562e5dd3b6d5 in doris::Tuple::deep_copy (this=0x6250001f20b0, dst=0x625004261010, desc=..., pool=0x61400086c0f8, convert_ptrs=false) at /root/incubator-doris/be/src/runtime/tuple.cpp:79
   #8  0x0000562e5dd3b2c0 in doris::Tuple::deep_copy (this=0x6250001f20b0, desc=..., pool=0x61400086c0f8, convert_ptrs=false) at /root/incubator-doris/be/src/runtime/tuple.cpp:65
   #9  0x0000562e5dcf6861 in doris::Tuple::deep_copy (this=0x6250001f20b0, desc=..., pool=0x61400086c0f8) at /root/incubator-doris/be/src/runtime/tuple.h:77
   #10 0x0000562e5dcf6ede in doris::TupleRow::deep_copy (this=0x62d00cd96400, dst=0x62d003eee400, descs=std::vector of length 1, capacity 1 = {...}, pool=0x61400086c0f8, reuse_tuple_mem=false) at /root/incubator-doris/be/src/runtime/tuple_row.h:61
   #11 0x0000562e5dcf1dd0 in doris::RowBatch::deep_copy_to (this=0x61400078f840, dst=0x61400086c040) at /root/incubator-doris/be/src/runtime/row_batch.cpp:561
   #12 0x0000562e5dd7a318 in doris::DataStreamRecvr::SenderQueue::add_batch (this=0x6140007a2240, batch=0x61400078f840, use_move=false) at /root/incubator-doris/be/src/runtime/data_stream_recvr.cc:278
   #13 0x0000562e5dd7efd0 in doris::DataStreamRecvr::add_batch (this=0x612000912340, batch=0x61400078f840, sender_id=3, use_move=false) at /root/incubator-doris/be/src/runtime/data_stream_recvr.cc:483
   #14 0x0000562e5f583902 in doris::DataStreamSender::Channel::send_local_batch (this=0x615000154300, batch=0x61400078f840, use_move=false) at /root/incubator-doris/be/src/runtime/data_stream_sender.cpp:225
   #15 0x0000562e5f58a16c in doris::DataStreamSender::send (this=0x616001931780, state=0x61d0003f7080, batch=0x61400078f840) at /root/incubator-doris/be/src/runtime/data_stream_sender.cpp:455
   #16 0x0000562e5dcd29aa in doris::PlanFragmentExecutor::open_internal (this=0x61a000439ef0) at /root/incubator-doris/be/src/runtime/plan_fragment_executor.cpp:404
   #17 0x0000562e5dccf4ec in doris::PlanFragmentExecutor::open (this=0x61a000439ef0) at /root/incubator-doris/be/src/runtime/plan_fragment_executor.cpp:257
   #18 0x0000562e5dacb2d0 in doris::FragmentExecState::execute (this=0x61a000439e80) at /root/incubator-doris/be/src/runtime/fragment_mgr.cpp:231
   #19 0x0000562e5dad2fbc in doris::FragmentMgr::_exec_actual(std::shared_ptr<doris::FragmentExecState>, std::function<void (doris::PlanFragmentExecutor*)>) (this=0x614000004640, exec_state=std::shared_ptr<doris::FragmentExecState> (use count 3, weak count 0) = {...}, cb=...) at /root/incubator-doris/be/src/runtime/fragment_mgr.cpp:464
   ```
   
   ### What You Expected?
   
   all SlotDescriptor at right hand to nullable. The query can be executed normally
   
   ### How to Reproduce?
   
   ```sql
   create table t1(
     k1 int not null,
     v1 int not null
   )
   distributed by hash(k1)
   properties(
     'replication_num' = '1'
   );
   
   create table t2(
     k1 int not null,
     c1 varchar(255) not null
   )
   distributed by hash(k1)
   properties('replication_num' = '1');
   
   insert into t1 values(1, 1), (2, 2), (3, 3), (4, 4);
   
   insert into t2 values(1, '1'), (2, '2');
   
   explain verbose
   select * from
     (select * from t1) a
   left outer join
     (select * from t2) b
   on a.k1 = b.k1
   order by a.v1; 
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman closed issue #9925: [Bug] (planner) SlotDescriptor set as 'is not null' at right hand in left outer join

Posted by GitBox <gi...@apache.org>.
morningman closed issue #9925: [Bug] (planner) SlotDescriptor set as 'is not null' at right hand in left outer join
URL: https://github.com/apache/incubator-doris/issues/9925


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org