Changes between Version 3 and Version 6 of Ticket #617


Ignore:
Timestamp:
Feb 12, 2014, 5:48:04 PM (11 years ago)
Author:
Dimitar Misev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #617 – Description

    v3 v6  
    1 In the way partial updates are supported we should support insert into an existing MDD object. This would allow to insert time slices in a time-series for example, after some data has already been ingested.
    2 
    3 Example
     1Inserting a slice in the middle of a 3D cube is possible via a partial update, e.g.
    42{{{
    5 insert into 3Dcube[5,*:*,*:*]
    6 values VALUES
     3UPDATE 3Dcube AS c
     4SET c[ 5:*, *:*, *:* ] -- assuming shift position 5 in dimension 0
     5ASSIGN shift( c[ 5:*, *:*, *:* ], [1,0,0] )
    76}}}
    8 This would insert the `VALUES` (a 2D object) into the existing 3D objects in `3Dcube` at slice t=5. The existing slices at t>=5 will be moved to t+1, i.e. slice 5 becomes 6, etc.
    9 
    10 A more general and conceptually more appealing approach would be to implement a 'shift' operator in the `update` statement, that allows to move slices around.
    11 
    12 Example (should be refined)
    13 {{{
    14 update 3Dcube as c
    15 set c
    16 assign shift(5, 1, 1)
    17 }}}
    18 `shift(5, 1, 1)` means move slice 5 (arg 1) of dimension 1 (arg 2) for 1 (i.e. to slice 6). The 3rd argument could be -1 for example to shift to slice 4.
    19 
    20 Implementation: this could be implemented efficiently without moving any data but just shifting some OIDs in the index.
     7The problem is that this is inefficient, as it requires updating a lot of data. This could be implemented efficiently without moving any data but just shifting some tile OIDs in the index.