On Thu, 5 Nov 2026 at 09:18, Tatsuo Ishii <[email protected]> wrote: > > Hi Jian, > > > I confirmed the problem. It seems it's a corner case bug: only happens > > when offset = -2147483648. Anyway, bug is a bug. > > > > Attached is a patch which should be ready for commit IMO. I haven't > > changed the C code part from yours. I have changed the regression test > > part to use low case SQL statements which fits in better with > > surroundings. > > Attached is the v2 patch. I just added a test case for lag() to > clarify that it is affected by the bug too. If there's no objection, > I will push it to master and 19 branches. > > Regards, > -- > Tatsuo Ishii > SRA OSS K.K. > English: http://www.sraoss.co.jp/index_en/ > Japanese:http://www.sraoss.co.jp
Hi! Discussion link in your v2 is wrong - for `IGNORE/RESPECT NULLS can be specified for (prokind == 'f'). ` thread Also, is there one more issue with leadlag_common: result = WinGetFuncArgInPartition(winobj, 0, (forward ? offset : -offset), WINDOW_SEEK_CURRENT, const_offset, &isnull, &isout); forward ? offset : -offset - same overflow? looks like lag(v, -2147483648) would be wrong -- Best regards, Kirill Reshke
