Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  1. assign 'aggregation' to 'merge-engine' 
  2. designate aggregate function for each column of table.

For example,

...

-

...

-

...

DDL

...

CREATE

...

TABLE

...

T

...

(

...


 

...

 

...

pk

...

STRING

...

PRIMARY

...

KEY

...

NOT

...

ENFOCED,

...


 

...

 

...

sum_field1

...

BIGINT,

...


    max_field1

...

BIGINT

...


 

...

 

...

)

...


WITH

...

(

...


'merge-engine'

...

=

...

'aggregation',

...


'fields.sum_field1.function'='sum',

...

-

...

-

...

sum

...

up

...

all

...

sum_field1

...

with

...

same

...

pk;

...


'fields.max_field1.function'='max'

...

-

...

-

...

get

...

max

...

value

...

of

...

all

...

max_field1

...

with

...

same

...

pk

...


);

...

– DML
INSERT INTO T VALUES ('pk1',

...

1,

...

2);

...


INSERT

...

INTO

...

T

...

VALUES

...

('pk1',

...

1,

...

1);

...


– verify
SELECT * FROM T;
=> output 'pk1',

...

2,

...

2

Tips: each column should be designated aggregate functions.

...