Skip to content

feat: Implement vertical aggregation with consistency validation#395

Open
Kybxd wants to merge 4 commits intomasterfrom
vertical-aggregation
Open

feat: Implement vertical aggregation with consistency validation#395
Kybxd wants to merge 4 commits intomasterfrom
vertical-aggregation

Conversation

@Kybxd
Copy link
Copy Markdown
Collaborator

@Kybxd Kybxd commented Apr 15, 2026

This PR implements a vertical aggregation feature with the following key changes:

Core Changes

  1. Added aggregate field property (bool aggregate = 21 in FieldProp) to enable vertical aggregation for incell list/map fields
  2. Added data consistency validation that throws E2023 error when conflicting values are found in different rows

Behavior Changes

  • Default behavior: Data consistency validation (non-aggregating) - validates that values for the same key are identical across rows
  • Aggregate mode: Enabled via aggregate:true - allows vertical aggregation of values for the same key

Vertical Aggregation Scope Limitations

  • Only supports incell list/map fields - horizontal and vertical layout fields do not support aggregation
  • Incell struct/union/scalar fields use consistency validation only

Implementation Details

  • Uses msg.NewField() to create new values instead of directly modifying existing ones
  • Compares values using Equal() method for consistency checking
  • Supports incremental aggregation for maps/lists when aggregate=true

This feature enhances data parsing flexibility for scenarios requiring vertical data aggregation while maintaining data integrity through consistency validation.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 70.05650% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.98%. Comparing base (5a4e7fc) to head (b3ed9b7).

Files with missing lines Patch % Lines
internal/confgen/table_parser.go 68.60% 20 Missing and 7 partials ⚠️
internal/confgen/document_parser.go 50.00% 9 Missing and 3 partials ⚠️
internal/confgen/util.go 41.66% 7 Missing ⚠️
internal/confgen/parser.go 82.85% 4 Missing and 2 partials ⚠️
internal/localizer/i18n/i18n.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #395      +/-   ##
==========================================
- Coverage   74.05%   73.98%   -0.08%     
==========================================
  Files          87       87              
  Lines        8819     8879      +60     
==========================================
+ Hits         6531     6569      +38     
- Misses       1718     1742      +24     
+ Partials      570      568       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

1 participant