opendistro/opensearch:相当于 DATEDIFF() 函数?

发布于 2025-01-17 14:58:40 字数 739 浏览 1 评论 0原文

我正在使用doc https:/https:/ /pendistro.github.io/for-elasticsearch-docs/docs/sql/functions/#date-and-pime and https://opensearch.org/docs/latest/search-plugins/sql/sql/functions/#date-and time-pime 但是尚未找到任何功能“ nofollow noreferrer”> datediff() 在Elasticsearch中。

我还尝试了使用日期键入列的算术运算符,并且似乎也无法使用(此查询无法解释):

SELECT timestamp(end_date) - timestamp(start_date) FROM <table>

I'm using the doc https://opendistro.github.io/for-elasticsearch-docs/docs/sql/functions/#date-and-time and https://opensearch.org/docs/latest/search-plugins/sql/functions/#date-and-time but haven't found any function like DATEDIFF()
in elasticsearch.

I also tried the arithmetic operator with date typed column and it doesn't seem to work either (This query is not explainable):

SELECT timestamp(end_date) - timestamp(start_date) FROM <table>

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

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

发布评论

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