0

我有两个连续的观点:tikets2second_view

CREATE CONTINUOUS VIEW tickets2 AS 
   SELECT ticketid,
     TO_TIMESTAMP(min(event_time)::double precision /1000000) as t0,
     keyed_min(event_time, status) as t0_status,
     TO_TIMESTAMP(max(event_time)::double precision /1000000) as tc,
     keyed_max(event_time, status) as tc_status
   FROM tickets_stream2 
   group by ticketid;

CREATE CONTINUOUS VIEW second_view AS
SELECT (new).tc FROM output_of('tickets2’);

当我将数据插入tickets_stream2时,我得到一个断言错误。

TRAP:FailedAssertion(“!(ActiveSnapshotSet())”,文件:“postgres.c”,行:824,PID:5275,查询:ticket2)

删除second_view,数据插入tickets_stream2执行没有问题。

我无法弄清楚我错过了什么。

观察。我正在使用 PipelineDB 0.9.7

编辑:

同时我尝试不使用 TO_TIMESTAMP() 函数并且没有发生异常。

CREATE CONTINUOUS VIEW tickets2 AS 
            SELECT 
                ticketid, 
                min(event_time) as t0, 
                keyed_min(event_time, status) as t0_status,
                max(event_time) as tc, 
                keyed_max(event_time, status) as tc_status   
            FROM tickets_stream_test_output 
            GROUP BY ticketid;

编辑 2,带有 0.9.7u3(可能对其他人有用

我用更新的版本进行了测试。我不再遇到断言失败,但是当我将数据插入 test_version_stream 时仍然发生错误。

CREATE STREAM test_version_stream(event_time bigint, ticketid uuid, status text);

CREATE CONTINUOUS VIEW test_version_view AS 
   SELECT ticketid,
     TO_TIMESTAMP(min(event_time)::double precision /1000000) as t
   FROM test_version_stream
   GROUP BY ticketid;

CREATE CONTINUOUS VIEW e_test_version_view AS
SELECT (new).t FROM output_of('test_version_view');

我改变了函数的顺序,min一切to_timestamp都很好:)

4

1 回答 1

0

此问题已通过 0.9.7 版本的最新更新修复:

https://github.com/pipelinedb/pipelinedb/releases

于 2017-03-27T22:44:09.043 回答