You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2022. It is now read-only.
In Java, TupleArray<T, N> currently translates to a Java array T[] (omitting annotations). Sadly, Java arrays don't have the expected "value" semantics when it comes to equals() and hashCode(). This is an issue for users who rely on equals() for every type T1 that contains a TupleArray<T, N>. This also prevent Java instances of Map<T1, T2> from working correctly for such type T1. Note that the same issue was the reason for Bytes to use a wrapper class around byte[] in Java.
In general, for each language, we need to make sure every Serde type is either fully supported or disallowed. Disallowed types (if any) should fail codegen.
The text was updated successfully, but these errors were encountered:
ma2bd
changed the title
[Bug] Review/fix/document complex Map types that may not be supported in each language
[Bug] Review/fix generated traits for complex types
Nov 17, 2020
#73 takes a first stab at this issue by fixing equality for (supported) Serde values.
Some "complex" Serde types such as Map<Foo, T> are still not supported in every language (e.g. Rust and C++, for different reasons).
Maps as keys (Map<Map<T1, T2>, T>) is not supported yet. It may not be feasible in all languages. We will see.
Using Floats (or types containing floats) as keys will always be problematic because NaN != NaN (in fact Rust does not let us derive Eq or Ord for floats in the first place).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐛 Bug
In Java,
TupleArray<T, N>
currently translates to a Java arrayT[]
(omitting annotations). Sadly, Java arrays don't have the expected "value" semantics when it comes toequals()
andhashCode()
. This is an issue for users who rely onequals()
for every typeT1
that contains aTupleArray<T, N>
. This also prevent Java instances ofMap<T1, T2>
from working correctly for such typeT1
. Note that the same issue was the reason forBytes
to use a wrapper class aroundbyte[]
in Java.In general, for each language, we need to make sure every Serde type is either fully supported or disallowed. Disallowed types (if any) should fail codegen.
The text was updated successfully, but these errors were encountered: