chenhao7253886 opened a new issue #721: Function CompareTo in PartitionKey 
throws cast error
URL: https://github.com/apache/incubator-doris/issues/721
 
 
   When we create a table, which partition key is tinyint, such as
   CREATE TABLE `test` (
     `k1` tinyint(4) COMMENT "",
     `k2` smallint(6) COMMENT "",
     `k3` int(11) COMMENT "",
     `k4` bigint(20) COMMENT "",
     `k5` decimal(9, 0) COMMENT "",
     `k6` char(5) COMMENT "",
     `k10` date COMMENT "",
     `k11` datetime COMMENT "",
     `k7` varchar(20) COMMENT "",
     `k8` double MAX COMMENT "",
     `k9` float SUM COMMENT ""
   ) ENGINE=OLAP
   AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`)
   PARTITION BY RANGE(`k1`)
   (PARTITION p1 VALUES LESS THAN ("-64"),
   PARTITION p2 VALUES LESS THAN ("0"),
   PARTITION p3 VALUES LESS THAN ("64"),
   PARTITION p4 VALUES LESS THAN MAXVALUE)
   DISTRIBUTED BY HASH(`k1`) BUCKETS 5
   PROPERTIES (
   "storage_type" = "COLUMN"
   );
   and we send the following query:
   select * from test where k1 in (-1, 1.0) order by k1, k2, k3, k4;
   we will get error:
   Unexpected exception: org.apache.doris.analysis.DecimalLiteral cannot be 
cast to org.apache.doris.analysis.IntLiteral
   the reason for this is that they are not casted to the same type when 
compare.

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


With regards,
Apache Git Services

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

Reply via email to