Aggregation Problem
- scalar field
Name, last overwrite wins, so the final value is "chapter11".
- list field
Group, by default, will aggregate multiple rows, so the final value is [1,2,3,1,2,3,1,2,3]
| ChapterID |
Name |
Group |
SectionID |
SectionName |
| map<uint32, Chapter> |
string |
[]int32 |
map<uint32, Section> |
string |
| Chapter's ID |
Chapter's name |
Group IDs |
Section's ID |
Section's name |
| 1 |
Chapter1 |
1,2,3 |
1 |
Section1 |
| 1 |
Chapter1 |
1,2,3 |
2 |
Section2 |
| 1 |
Chapter11 |
1,2,3 |
3 |
Section3 |
| 2 |
Chapter12 |
5,6 |
1 |
Section1 |
Solution
Populate the field with the key's first row by default on aggregation, and report errors if corresponding cell data in the following rows is not same as the first row.
- scalar field
Name, report an error due to the last name Chapter11 is not equal to Chapter1 at the first row, and if fixed, the final value is "chapter1".
- list field
Group, the final value is [1,2,3]
Aggregation Problem
Name, last overwrite wins, so the final value is"chapter11".Group, by default, will aggregate multiple rows, so the final value is[1,2,3,1,2,3,1,2,3]Solution
Populate the field with the key's first row by default on aggregation, and report errors if corresponding cell data in the following rows is not same as the first row.
Name, report an error due to the last nameChapter11is not equal toChapter1at the first row, and if fixed, the final value is"chapter1".Group, the final value is[1,2,3]