Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select combine_table() error for official example #2045

Open
namo-ratna-trayaya opened this issue Mar 26, 2019 · 1 comment
Open

select combine_table() error for official example #2045

namo-ratna-trayaya opened this issue Mar 26, 2019 · 1 comment

Comments

@namo-ratna-trayaya
Copy link

namo-ratna-trayaya commented Mar 26, 2019

CREATE FOREIGN TABLE wiki_stream (
hour timestamp,
project text,
title text,
view_count bigint,
size bigint)
SERVER pipelinedb;

CREATE VIEW wiki_stats WITH (action=materialize) AS
SELECT hour, project,
count(*) AS total_pages,
sum(view_count) AS total_views,
min(view_count) AS min_views,
max(view_count) AS max_views,
avg(view_count) AS avg_views,
percentile_cont(0.99) WITHIN GROUP (ORDER BY view_count) AS p99_views,
sum(size) AS total_bytes_served
FROM wiki_stream
GROUP BY hour, project;

insert into wiki_stream values('now()','a','a',1,1);

select * into wiki_stats_tmp from wiki_stats_mrel ;

select pipelinedb.combine_table('wiki_stats', 'wiki_stats_tmp');

got error like this:

postgres=# select pipelinedb.combine_table('wiki_stats', 'wiki_stats_tmp');
ERROR: invalid string enlargement request size: -4

@JiaxingSong
Copy link

JiaxingSong commented May 30, 2019

In analyzer.c , rewrite_nodes(), make then following change:

FROM:
if (IsContQueryProcess())
return;

TO:
if (IsContQueryProcess() || PipelineContextIsCombineTable())
return;

add the combine table case to the scenarios like combiner or worker processes, can avoid this bug,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants