malwaregarry opened a new issue, #36079:
URL: https://github.com/apache/doris/issues/36079

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.1.3
   
   ### What's Wrong?
   
   With this table:
   ```
   CREATE TABLE t0(c0 BIGINT NOT NULL) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   CREATE TABLE t1(c0 INT) UNIQUE KEY(c0) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   INSERT INTO t1 (c0) VALUES (1), (2), (3);
   ```
   
   running this query results in an error:
   `SELECT t0.c0, t1.c0 FROM  t0 RIGHT JOIN t1 ON (true) GROUP BY t0.c0, t1.c0 
HAVING ((t0.c0) IS NULL) ORDER BY 1;`
   
   ```
   ERROR 1105 (HY000) at line 7: errCode = 2, detailMessage = 
(192.168.50.118)[CANCELLED][E6] num_columns!=merged_columns.size(), 
num_columns=3, merged_columns.size()=2
   
           0#  doris::Exception::Exception(int, std::basic_string_view<char, 
std::char_traits<char> > const&) at 
/var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/unique_ptr.h:173
           1#  doris::Exception::Exception<unsigned long&, unsigned long>(int, 
std::basic_string_view<char, std::char_traits<char> > const&, unsigned long&, 
unsigned long&&
   ```
   
   ### What You Expected?
   
   No errors and result:
   ```
   +------+------+
   | c0   | c0   |
   +------+------+
   | NULL |    2 |
   | NULL |    3 |
   | NULL |    1 |
   +------+------+
   ```
   
   ### How to Reproduce?
   
   ```
   DROP DATABASE IF EXISTS doris3;
   CREATE DATABASE doris3;
   USE doris3;
   CREATE TABLE t0(c0 BIGINT NOT NULL) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   CREATE TABLE t1(c0 INT) UNIQUE KEY(c0) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   INSERT INTO t1 (c0) VALUES (1), (2), (3);
   SELECT t0.c0, t1.c0 FROM  t0 RIGHT JOIN t1 ON (true) GROUP BY t0.c0, t1.c0 
HAVING ((t0.c0) IS NULL) ORDER BY 1;
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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-unsubscr...@doris.apache.org.apache.org

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


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

Reply via email to