Re: [sqlite] Segfault in window function

2018-07-02 Thread Charles Leifer
Beautiful, working on my end now as well. Thanks so much. On Mon, Jul 2, 2018 at 12:49 PM, Dan Kennedy wrote: > On 07/02/2018 10:54 PM, Charles Leifer wrote: > >> I'm getting a segfault with the following query, which uses window >> functions: >> > > Thanks for reporting this. Should now be

Re: [sqlite] Segfault in window function

2018-07-02 Thread Dan Kennedy
On 07/02/2018 10:54 PM, Charles Leifer wrote: I'm getting a segfault with the following query, which uses window functions: Thanks for reporting this. Should now be fixed here: https://www.sqlite.org/src/info/693b4350d7413912 Thanks also for the sum() bug report in the follow-up. That one

Re: [sqlite] Segfault in window function

2018-07-02 Thread Charles Leifer
Furthermore, I've found another example of a window function returning incorrect results. Using the above "sample" table and sample data, the following query produces the wrong results. Query: SELECT "counter", "value", SUM("value") OVER (ORDER BY "id" ROWS 2 PRECEDING) FROM "sample" ORDER BY

Re: [sqlite] Segfault in window function

2018-07-02 Thread Charles Leifer
Oh, and gdb is reporting the segfault occurs in "dupedExprSize". Partial traceback: #0 0x74d4645b in dupedExprSize () from /usr/local/lib/libsqlite3.so.0 No symbol table info available. #1 0x74d5bf12 in exprDup () from /usr/local/lib/libsqlite3.so.0 No symbol table info

[sqlite] Segfault in window function

2018-07-02 Thread Charles Leifer
I'm getting a segfault with the following query, which uses window functions: SELECT "t1"."counter", "t1"."value", RANK() OVER w AS "rank" FROM "sample" AS "t1" WINDOW w AS (PARTITION BY "t1"."counter" ORDER BY "t1"."value" DESC) ORDER BY "t1"."counter", RANK() OVER w The sql used to create the