You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
【BUG】where date in (int) will be cast to double type #4805
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.
Yes, this is the problem of type-casting. In current system, sql like select * from table where date in (20201030); date is type of DATE; date and 20201030 will be casted to DOUBLE type. That is not corret. I think the invalid type should be found in Analyze Phase, not be found in phase of 'Pruning Partitions'. This problem will not cause to scan all partitions.
in my idea, i think this the type cast problem, so the problem is what is the type should the cast the int to,
so just cast the int to the type of the partition key type,
and i also doubt that why scan the all partion.
myabe this is the right flow ,
1, we should know that the condition key has the partion key, and get the info from the catalog
Yes, this is the problem of type-casting. In current system, sql like select * from table where date in (20201030); date is type of DATE; date and 20201030 will be casted to DOUBLE type. That is not corret. I think the invalid type should be found in Analyze Phase, not be found in phase of 'Pruning Partitions'. This problem will not cause to scan all partitions.
Activity
Yao-MR-zz commentedon Oct 28, 2020
why must cast the int to date type?
in my idea, i think this the type cast problem, so the problem is what is the type should the cast the int to,
so just cast the int to the type of the partition key type,
and i also doubt that why scan the all partion.
myabe this is the right flow ,
1, we should know that the condition key has the partion key, and get the info from the catalog
xinghuayu007 commentedon Oct 28, 2020
Yes, this is the problem of type-casting. In current system, sql like
select * from table where date in (20201030);date is type of DATE; date and 20201030 will be casted toDOUBLEtype. That is not corret. I think the invalid type should be found inAnalyze Phase, not be found in phase of 'Pruning Partitions'. This problem will not cause to scan all partitions.xinghuayu007 commentedon Oct 28, 2020
Yes, this is the problem of type-casting. In current system, sql like select * from table where date in (20201030); date is type of DATE; date and 20201030 will be casted to DOUBLE type. That is not corret. I think the invalid type should be found in Analyze Phase, not be found in phase of 'Pruning Partitions'. This problem will not cause to scan all partitions.