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 appears that somewhere the wires 
are getting crossed as it appears to call my aggregate step function is getting 
called, however, when it tries to call the xValue function, SQLite3 crashes.  
(the call is apparently to "my" override xValue function, which is, of course, 
null -- not to the original builtin avg xValue pointer which would not work 
either but which would not result in a crash).

If I register "all" the methods (even though they do not work correctly with a 
running calculation) the internal function is fully overridden.

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 ...

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.





_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to