Skip to content

[HZ-5348] Sort fields in compact schema by name#1577

Merged
yuce merged 1 commit intohazelcast:masterfrom
yuce:fix/1576
Feb 9, 2026
Merged

[HZ-5348] Sort fields in compact schema by name#1577
yuce merged 1 commit intohazelcast:masterfrom
yuce:fix/1576

Conversation

@yuce
Copy link
Copy Markdown
Contributor

@yuce yuce commented Feb 5, 2026

Fixes #1576

@yuce yuce added this to the 5.6.0 milestone Feb 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.42%. Comparing base (90627dd) to head (98b7c3a).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1577      +/-   ##
==========================================
- Coverage   93.45%   93.42%   -0.03%     
==========================================
  Files         466      466              
  Lines       16644    16645       +1     
  Branches     1353     1353              
==========================================
- Hits        15554    15550       -4     
- Misses        797      800       +3     
- Partials      293      295       +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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yuce yuce requested review from emreyigit and ihsandemir February 5, 2026 13:14
@yuce yuce changed the title Sort fields in compact schema by name [HZ-5348] Sort fields in compact schema by name Feb 5, 2026
for (const field of fields) {
this.fieldDefinitionMap = new Map<string, FieldDescriptor>();
for (const field of this.fields) {
// map entries are sorted by insertion order
Copy link
Copy Markdown
Member

@emreyigit emreyigit Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't fields already sorted by field name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fields are sorted by name in the previous line.
This is just a comment to clarify that the order will be preserved in this.fieldDefinitionMap, since Javascript guarantees that for maps.
For example in Go, that wouldn't work, since the map entries are accessed randomly.

@yuce yuce merged commit 88f6333 into hazelcast:master Feb 9, 2026
14 checks passed
@yuce yuce deleted the fix/1576 branch February 9, 2026 08:45
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.

Node.js Client doesn't sort field names during compact schema creation [API-2376]

2 participants