运行 athena sql 查询
select date_diff('day' ,checkout_date::date, book_date::date) from users.
book_date 和 checkout_date 都是时间戳。出现错误:
运行查询时出错:函数 date_diff(unknown, date, date) 不存在 ^ 提示:没有函数与给定名称和参数类型匹配。您可能需要添加显式类型转换。
检查了 presto 文档: https://prestodb.io/docs/current/functions/datetime.html
date_diff(单位,时间戳1,时间戳2)→bigint
Returns timestamp2 - timestamp1 expressed in terms of unit.