Record Casting

Records are implicitly coerced depending on their context. Extra fields are dropped and missing fields are made null.

For instance, this assignment drops the Extra field before the assignment is made:
rec_t rec := [ Symbol='T'; | Shares=10; Price=22.88; Extra=1; ];
Conversely, this assigns the variable rec to a record whose Price field is null:
rec_t rec := [ Symbol='T'; | Shares=10; ];
SPLASH is also forgiving about the key fields. For instance, if you forget to make the Symbol field a key field in the following, it will make the Symbol field into a key field:
rec_t rec := [ | Symbol='T'; Shares=10; Price=22.88; Extra=1; ];
Key fields should not be null. It is legal to assign teh following but you cannot send this to downstream streams:
rec_t rec := [ | Shares=10; Price=22.88; Extra=1; ];
This will be described in more detail in later topics.