chaokunyang commented on code in PR #3394:
URL: https://github.com/apache/fory/pull/3394#discussion_r3044299015


##########
javascript/packages/core/lib/meta/TypeMeta.ts:
##########
@@ -238,8 +238,8 @@ export class TypeMeta {
   }
 
   computeStructHash() {
-    const fields = TypeMeta.groupFieldsByType(this.fields);
-    const fingerprint = this.computeStructFingerprint(fields);
+    // const fields = TypeMeta.groupFieldsByType(this.fields);

Review Comment:
   You comment out groupFieldsByType and feeds raw this.fields directly into 
computeStructFingerprint. Java and other  runtimes group fields by type before 
hashing. This means the JS struct hash will differ from Java's for any struct 
whose field   ordering changes after grouping, causing schema-consistent mode 
to reject valid payloads with a hash mismatch error.



##########
javascript/packages/core/lib/meta/TypeMeta.ts:
##########
@@ -238,8 +238,8 @@ export class TypeMeta {
   }
 
   computeStructHash() {
-    const fields = TypeMeta.groupFieldsByType(this.fields);
-    const fingerprint = this.computeStructFingerprint(fields);
+    // const fields = TypeMeta.groupFieldsByType(this.fields);

Review Comment:
   You comment out groupFieldsByType and feeds raw this.fields directly into 
computeStructFingerprint. Java and other  runtimes group fields by type before 
hashing. This means the JS struct hash will differ from Java's for any struct 
whose field   ordering changes after grouping, causing schema-consistent mode 
to reject valid payloads with a hash mismatch error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to