-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Describe the bug
select * from table date in (20201030), date is type of DATE or DATETIME. date and 20201030 will be casted to DOUBLE type. When date is partition key, it will cause exeption. It is better to cast 20201030 to date type.
To Reproduce
Steps to reproduce the behavior:
- create a table
CREATE TABLEinvalid_date(datedatetime NULL COMMENT "",daydate NULL COMMENT "",site_idint(11) NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(date,day,site_id) COMMENT "OLAP" PARTITION BY RANGE(day) (PARTITION p20201030 VALUES [('2020-10-30'), ('2020-10-31'))) DISTRIBUTED BY HASH(site_id) BUCKETS 10 PROPERTIES ( "replication_num" = "1", "in_memory" = "false", "storage_format" = "V2" ); - execute a query:
select date from invalid_date where day in (20201030); - See error


Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.