Chris Miller
12/04/2019, 10:28 AMsealed class TimedEvent(val eventTime: Long)
data class FxRateEvent(val currency: String, val rate: Double, eventTime: Long) : TimedEvent(eventTime)
adimit
12/04/2019, 10:30 AMsealed class A(open val f: String)
data class B(val foo: String, override val f: String): A(f)
Chris Miller
12/04/2019, 10:34 AMorg.apache.avro.AvroRuntimeException: avro.shaded.com.google.common.util.concurrent.UncheckedExecutionException: org.apache.avro.AvroTypeException:
class pojo.TimedEvent contains two fields named: private long pojo.TimedEvent.eventTime
adimit
12/04/2019, 6:43 PMChris Miller
12/05/2019, 10:06 AMadimit
12/05/2019, 10:56 AM.equals
and .hashCode
though 😕 I'm surprised the byte code is this simple.Chris Miller
12/05/2019, 12:46 PM.equals
and .hashCode
on data classes anyway (or just not use them) because I tend to only want to test for equality based on a single ID field rather than all of them (which in some cases can end up quite expensive)