【发布时间】:2017-11-28 00:28:24
【问题描述】:
我希望能够编写查询,其中仅返回具有由列表中的一个或多个日期组成的特定字段值的记录。
例如(我认为这会起作用,但事实并非如此):
select * from someDatabase.someTable where dateField in ('2017-11-10','2017-11-14','2017-11-28');
所以我希望这只会返回 dateField 包含 ('2017-11-10','2017-11-14','2017-11-28') 中的任何一个或所有日期的记录
当我运行这样的查询时,我得到了错误:
FAILED: SemanticException [Error 10014]: Line 1:105 Wrong arguments ''2017-11-20'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
非常感谢任何帮助。谢谢。
【问题讨论】: