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 2019/10/29 03:26:29 UTC

[GitHub] [incubator-doris] EmmyMiao87 opened a new issue #2090: The date result in outer join is incorrect while the join tuple is view

EmmyMiao87 opened a new issue #2090: The date result in outer join is incorrect while the join tuple is view
URL: https://github.com/apache/incubator-doris/issues/2090
 
 
   **Describe the bug**
   Query1: `with t1 as (select * from baseall), t2 as (select * from test)             select j.*, d.* from t1 j full outer join t2 d on (j.k1=d.k1)             order by j.k1, j.k2, j.k3, j.k4, d.k2 limit 100;`
   Query2: `select j.*, d.* from baseall j full outer join test d on (j.k1=d.k1)             order by j.k1, j.k2, j.k3, j.k4, d.k2 limit 100;`
   
   The result of query 1 is different from the result of query 2. The k10 result is incorrect.
   
   ![image](https://user-images.githubusercontent.com/25147274/67735389-ee091600-fa3e-11e9-96af-8e155762a881.png)
   
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. create table 
   `CREATE TABLE `test` (
       ->   `k1` tinyint(4) NOT NULL COMMENT "",
       ->   `k2` smallint(6) NOT NULL COMMENT "",
       ->   `k3` int(11) NOT NULL COMMENT "",
       ->   `k4` bigint(20) NOT NULL COMMENT "",
       ->   `k5` decimal(9, 3) NOT NULL COMMENT "",
       ->   `k6` char(5) NOT NULL COMMENT "",
       ->   `k10` date NOT NULL COMMENT "",
       ->   `k11` datetime NOT NULL COMMENT "",
       ->   `k7` varchar(20) NOT NULL COMMENT "",
       ->   `k8` double MAX NOT NULL COMMENT "",
       ->   `k9` float SUM NOT NULL COMMENT ""
       -> ) ENGINE=OLAP
       -> AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`)
       -> COMMENT "OLAP"
       -> PARTITION BY RANGE(`k1`)
       -> (PARTITION p1 VALUES [("-128"), ("-64")),
       -> PARTITION p2 VALUES [("-64"), ("0")),
       -> PARTITION p3 VALUES [("0"), ("64")),
       -> PARTITION p4 VALUES [("64"), (MAXVALUE)))
       -> DISTRIBUTED BY HASH(`k1`) BUCKETS 5
       -> PROPERTIES (
       -> "storage_type" = "COLUMN"
       -> ,"replication_num" = "1");`
   
   `CREATE TABLE `baseall` (
       ->   `k1` tinyint(4) NOT NULL COMMENT "",
       ->   `k2` smallint(6) NOT NULL COMMENT "",
       ->   `k3` int(11) NOT NULL COMMENT "",
       ->   `k4` bigint(20) NOT NULL COMMENT "",
       ->   `k5` decimal(9, 3) NOT NULL COMMENT "",
       ->   `k6` char(5) NOT NULL COMMENT "",
       ->   `k10` date NOT NULL COMMENT "",
       ->   `k11` datetime NOT NULL COMMENT "",
       ->   `k7` varchar(20) NOT NULL COMMENT "",
       ->   `k8` double MAX NOT NULL COMMENT "",
       ->   `k9` float SUM NOT NULL COMMENT ""
       -> ) ENGINE=OLAP
       -> AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`)
       -> COMMENT "OLAP"
       -> DISTRIBUTED BY HASH(`k1`) BUCKETS 5
       -> PROPERTIES (
       -> "storage_type" = "COLUMN"
       -> ,"replication_num" = "1");`
   
   2. insert data
   ```
   insert into test values(0, 25489, -840486691, -2137585817296840479, 19.95, 'rMhmV', '1944-12-19', '2015-03-13 12:36:38', 'uIO^aNkh$@HXcpqzYtZw', 0.480157511917, 0.12796569);
   insert into test values(1, -32532, -20044105, -8835160795001014332, 38, 'rMhmV', '1957-07-27', '2015-03-13 12:36:38', 'K8=SxKxEm$r8VGAn$^Pi', 0.357978413009, 0.57754511);
   insert into baseall values(1, 1989, 1001, 11011902, 123.123, 'true', '1989-03-21', '1989-03-21 13:00:00', 'wangjing04', 0.1, 6.333);
   ```
   
   3. execute query
   `with t1 as (select * from baseall), t2 as (select * from test)             select j.*, d.* from t1 j full outer join t2 d on (j.k1=d.k1)             order by j.k1, j.k2, j.k3, j.k4, d.k2 limit 100;`
   
   4. the k10 is incorrect
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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