Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls

Поиск
Список
Период
Сортировка
От Nicholas White
Тема Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls
Дата
Msg-id CA+=vxNYj9uXnfhUrDwWhPSjdDFzVa0Xm-W2WqVjNux7JpbxP-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls  (Nicholas White <n.j.white@gmail.com>)
Список pgsql-hackers
> this should throw a FEATURE_NOT_SUPPORTED error if it is used for window functions that don't support it
> arbitrary aggregate functions over a window ... should also throw a FEATURE_NOT_SUPPORTED error.

Fixed (with test cases) in the attached patch.

> because the same window may be shared by multiple window function calls.

Ah, your example gives the stack trace below. As the respect / ignore nulls frame option is part of the window definition your example should cause two windows to be created (both based on w, but one with the respect-nulls flag set), but instead it fails an assert as one window definition can't have two sets of frame options. It might take me a day or two to solve this - let me know if this approach (making the parser create two window objects) seems wrong.

#2  0x0000000100cdb68b in ExceptionalCondition (conditionName=Could not find the frame base for "ExceptionalCondition".
) at /Users/xxx/postgresql/src/backend/utils/error/assert.c:54
#3  0x00000001009a3c03 in transformWindowFuncCall (pstate=0x7f88228362c8, wfunc=0x7f8822948ec0, windef=0x7f88228353a8) at /Users/xxx/postgresql/src/backend/parser/parse_agg.c:573

Thanks -

Nick
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Следующее
От: Greg Smith
Дата:
Сообщение: Re: fallocate / posix_fallocate for new WAL file creation (etc...)