This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fury.git


The following commit(s) were added to refs/heads/main by this push:
     new a907a9a3 fix(java): chunk map serialize an error (#2030)
a907a9a3 is described below

commit a907a9a3c70123de5ced40bc2e841c8ba346df8e
Author: hn <[email protected]>
AuthorDate: Mon Jan 27 18:16:06 2025 +0800

    fix(java): chunk map serialize an error (#2030)
    
    <!--
    **Thanks for contributing to Fury.**
    
    **If this is your first time opening a PR on fury, you can refer to
    
[CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).**
    
    Contribution Checklist
    
    - The **Apache Fury (incubating)** community has restrictions on the
    naming of pr titles. You can also find instructions in
    [CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).
    
    - Fury has a strong focus on performance. If the PR you submit will have
    an impact on performance, please benchmark it first and provide the
    benchmark result here.
    -->
    
    ## What does this PR do?
    
    <!-- Describe the purpose of this PR. -->
    
    fix some error
    
    new implement of map chunk can not pass all of the unit test in the
    org.apache.fury.serializer.collection.MapSerializersTest
    
    
    
![image](https://github.com/user-attachments/assets/2af5978d-2ebc-4ad9-9ac2-f90511ed5c59)
    
    
![image](https://github.com/user-attachments/assets/edc08cc4-495f-4cbe-9f48-0b8e5bcef10e)
    I found an error in line 298 of the AbstractMapSequencer file
    ## Related issues
    
    <!--
    Is there any related issue? Please attach here.
    none
    - #xxxx0
    - #xxxx1
    - #xxxx2
    -->
    
    ## Does this PR introduce any user-facing change?
    none
    <!--
    If any user-facing interface changes, please [open an
    issue](https://github.com/apache/fury/issues/new/choose) describing the
    need to do so and update the document if necessary.
    -->
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
    none
    <!--
    When the PR has an impact on performance (if you don't know whether the
    PR will have an impact on performance, you can submit the PR first, and
    if it will have impact on performance, the code reviewer will explain
    it), be sure to attach a benchmark data here.
    -->
    
    Co-authored-by: hening <[email protected]>
---
 .../org/apache/fury/serializer/collection/AbstractMapSerializer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java
 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java
index ebad0f9f..e2288766 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java
@@ -295,7 +295,7 @@ public abstract class AbstractMapSerializer<T> extends 
Serializer<T> {
     int chunkSizeOffset = buffer.writerIndex() - 1;
     int chunkHeader = 0;
     if (keySerializer != null) {
-      chunkHeader |= VALUE_DECL_TYPE;
+      chunkHeader |= KEY_DECL_TYPE;
     } else {
       keySerializer = writeKeyClassInfo(classResolver, keyType, buffer);
     }


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

Reply via email to