Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Story Points:2
-
Epic Link:
-
Sprint:TSSW Sprint - Apr 11 - Apr 25
-
Team:Telescope and Site
-
Urgent?:No
Description
It turns out we can easily support schema evolution in Kafka/Avro by specifying a default value for each field in the schema created by the SAL/Kafka producers.
This is a simple change. The main question is whether the default float value should be 0 (like DDS) or NaN. I doubt it makes much difference, because by the time the SAL/Kafka producer sees the SAL data, all fields that are in the current schema have been filled in. Thus this default only affects fields that we remove from the XML. I am inclined to use 0 because it appears NaN support in Avro is somewhat iffy and it matches OpenSplice.
For the default values, I would recommend using NaN for float and arrays of float for the reasons discussed in https://sqr-053.lsst.io/#recommendations. 0 is not a good representation for a missing value, NaN works better with InfluxDB and Parquet and correctly represents missing values when you return a Pandas data frame.