hive 里, date_sub 的使用问题

select
    id,day,row1,date_sub(cast(day as string),cast(row1 as int))
from
( select 
    id,day,row_number() over(partition by id order by day) as row1
from login ) as t;

建表的时候,day 是 string 类型的,类似这样
'2020-04-20'
然后先子查询得到了每一行的行数
最后用列和 day 做差,为什么得到的结果一直是 null 的
转换格式了也没用

啊,我知道了,我知道了
传入数据的时候,string 不用加引号的