Changeset 3d4ceaf7c88f65a8fd4418f23abce265c0232516

Show
Ignore:
Timestamp:
10/21/09 19:24:10 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1256153050 +0000
git-parent:

[f805e6ba6d1f0c796ea6e011688c18a4e56fe9dd]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1256153050 +0000
Message:

I think this is right, some utc issues and forget to reset v_init to false (for multi-row rollups)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/scaffolding.sql

    re5e4b41 r3d4ceaf  
    4848\i sprocs/noit.update_mns_via_self.sql 
    4949\i sprocs/stratcon.choose_window.sql 
     50\i sprocs/stratcon.unroll_metric_numeric_5m.sql 
    5051\i sprocs/stratcon.fetch_dataset.sql 
    5152\i sprocs/stratcon.fetch_varset.sql 
  • sql/sprocs/stratcon.rollup_metric_numeric_5m.sql

    r32ddc52 r3d4ceaf  
    5555    END IF; 
    5656 
    57     FOR v_info IN SELECT * FROM window_robust_derive(v_min_whence) LOOP 
     57    FOR v_info IN SELECT * FROM stratcon.window_robust_derive(v_min_whence) LOOP 
    5858 
    59         v_offset := ( 12*(extract('hour' from v_min_whence))+floor(extract('minute' from v_min_whence)/5) );    
     59        v_offset := ( 12*(extract('hour' from v_min_whence at time zone 'UTC'))+floor(extract('minute' from v_min_whence at time zone 'UTC')/5) );    
     60        v_info.rollup_time := date_trunc('day', v_info.rollup_time AT TIME ZONE 'UTC') AT TIME ZONE 'UTC'; 
    6061 
     62        v_init := false; 
    6163        SELECT * FROM metric_numeric_rollup_5m WHERE rollup_time = v_info.rollup_time AND sid=v_info.sid AND name=v_info.name INTO v_rec; 
    6264        IF NOT FOUND THEN  
  • sql/sprocs/stratcon.unroll_metric_numeric_5m.sql

    rf805e6b r3d4ceaf  
    11 
    2 CREATE OR REPLACE FUNCTION stratcon.unroll_numeric_metric_rollup_5m 
     2CREATE OR REPLACE FUNCTION stratcon.unroll_metric_numeric_5m 
    33(in_sid integer, in_name text, in_start timestamp with time zone, in_end timestamp with time zone)  
    44RETURNS SETOF stratcon.metric_numeric_rollup_segment