首页 > 解决方案 > AWS Athena Cast Works in Select Statement but Fails with Where Clause

问题描述

I have a very simple query:

select cast(Field1 as bigint) as lit
from vw_GH

That works like a charm. However, when I add a where clause like so:

select cast(Field1 as bigint) as lit
from vw_GH
where Field2 > SomeNumber

It gives me an INVALID_CAST_ARGUMENT error. Since this is a big data task it's not quick to identify potential errors in a set of millions of records. Any ideas why this is happening?

标签: sqlamazon-web-servicesamazon-athenapresto

解决方案


推荐阅读