SQL Impala将NAN值转换为空值

发布于 2025-02-09 20:19:22 字数 538 浏览 4 评论 0原文

我的表格中有以下列:

col 1
1 1
3
null
nan
5

“ bad”聚合返回nan而不是null,并且该变量最终是双键。 我只想拥有一种类型的缺少值,因此我需要将null转换为NAN或另一种方式。 我的问题是,当我使用窗口函数分区时,它不识别Nans等于 nulls并创建单独的子组,这是我不想要的。 关于如何转换它们有什么建议吗?

I have the following column in my table:

col 1
1
3
NULL
NaN
5

"Bad" aggregations return NaN instead of NULL and the variable is type DOUBLE in the end.
I want to have one type of missing values only, hence I need to convert NULL to NaN or the other way around.
My problem is that when I partition with a window function it does not recognize NaNs as equal to
NULLS and creates separate subgroups, which is something I do not want.
Any suggestions on how to convert them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文