"LAG could not take such arguments" IntelliJ IDEA 警告函数的正确使用

"LAG could not take such arguments" warning in IntelliJ IDEA for correct usage of function

给定 MariaDB 查询 SELECT LAG(value, 1) OVER (ORDER BY added_on) FROM transactions。我在 IntelliJ IDEA 中工作(也可能是 PHPStorm 任何与 JetBrains 相关的东西),我的 IDE 给我一个 LAG 函数的错误,即:

LAG could not take such arguments

去掉LAG函数中的, 1就去掉了这个警告,但是为什么我一开始就给出这个警告呢?根据 documentation,这是调用 LAG(<expression>[,offset]) OVER (ORDER BY <expression>)

的完美方式

编辑:消息截图

看来我们需要更新 MySQL 的代码帮助提示。 Here is issue在我们的跟踪器上,请关注并投票。