Re: [sqlite] Window Function Crash -- overriding builtin aggregate

2018-07-02 Thread Keith Medcalf
om: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Dan Kennedy >Sent: Monday, 2 July, 2018 10:21 >To: sqlite-users@mailinglists.sqlite.org >Subject: Re: [sqlite] Window Function Crash -- overriding builtin >aggregate > >On 07/02/2018 01:

Re: [sqlite] Window Function Crash -- overriding builtin aggregate

2018-07-02 Thread Dan Kennedy
On 07/02/2018 01:40 PM, Keith Medcalf wrote: I have overridden the builtin AVG function with a function of my own that computes the average by using the "running average" method rather than the simple sum/count method. This function is registered as an old fashioned aggregate function. After

Re: [sqlite] Window Function Crash -- overriding builtin aggregate

2018-07-02 Thread Simon Slavin
On 2 Jul 2018, at 11:48am, Keith Medcalf wrote: > If I rename the function then both the builtin avg and my new function work > correctly. Thanks. Worth testing just in case something weird happened. But it didn't. I leave it up to the experts. Simon.

Re: [sqlite] Window Function Crash -- overriding builtin aggregate

2018-07-02 Thread Keith Medcalf
>boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin >Sent: Monday, 2 July, 2018 04:27 >To: SQLite mailing list >Subject: Re: [sqlite] Window Function Crash -- overriding builtin >aggregate > >On 2 Jul 2018, at 7:40am, Keith Medcalf wrote: > >> Even if I register

Re: [sqlite] Window Function Crash -- overriding builtin aggregate

2018-07-02 Thread Simon Slavin
On 2 Jul 2018, at 7:40am, Keith Medcalf wrote: > Even if I register the override function using the new > sqlite_create_window_function and explicitly set the xValue and xInverse to 0 > (null), the program still crashes when attempting to run the non-existent > xValue function ... As a test,

[sqlite] Window Function Crash -- overriding builtin aggregate

2018-07-02 Thread Keith Medcalf
I have overridden the builtin AVG function with a function of my own that computes the average by using the "running average" method rather than the simple sum/count method. This function is registered as an old fashioned aggregate function. After the window extension is put in place, it