Skip to content

feat(go): update float16 array/slice logic in createSerializer#3318

Merged
chaokunyang merged 2 commits intoapache:mainfrom
BrianLii:serializer-tests
Feb 10, 2026
Merged

feat(go): update float16 array/slice logic in createSerializer#3318
chaokunyang merged 2 commits intoapache:mainfrom
BrianLii:serializer-tests

Conversation

@BrianLii
Copy link
Contributor

@BrianLii BrianLii commented Feb 9, 2026

Why?

To handle float16 arrays and slices in a cleaner way during serialization and deserialization in the Go.

What does this PR do?

  • Modified the createSerializer function in go/fory/type_resolver.go to correctly return float16SliceSerializer for reflect.Slice of float16 and float16ArraySerializer for reflect.Array of float16.
  • Added tests in type_test.go to validate this behavior.

Related issues

#3235 implementation for float16 support
#3310 bfloat implementation that aligns with this PR

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@BrianLii BrianLii requested a review from chaokunyang as a code owner February 9, 2026 22:20
Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

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

Looks great!

@chaokunyang chaokunyang merged commit cf57fe5 into apache:main Feb 10, 2026
57 checks passed
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.

2 participants