acoustic-carpenter-78188
10/23/2023, 7:15 PMgetDeclaredFields from Java is less reliable, and it doesn't get super classes' declared fields. We could do that ourselves, but it is impossible to get the correct order.
For case class like:
class B(val a: String, val b: String)
case class A(override val a: String, c: String, override val b: String) extends B(a, b)
productElementNames can correctly get [a, c, b] for instance of A, but getDeclaredFields can only get c for instance of A. It won't work if we try to recursively go up to get all declared fields, because we would not be able to put up a correct order where c appears between a and b.
Tracking Issue
NA
Follow-up issue
NA
flyteorg/flytekit-java
✅ All checks have passed
3/3 successful checksacoustic-carpenter-78188
10/24/2023, 7:23 AM