-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
Looking at the serialization methods for various document sources, it can be unclear to a new engineer in what contexts a source is serialized, and how attributes of SerializationOptions help to determine that context.
It seems like the basic rules are:
- We are serializing for explain If opts.verbosity is not none
- We are serializing for query stats if opts.literalPolicy != LiteralSerializationPolicy::kUnchanged || opts.transformIdentifiers
I think it would be helpful to the reader to have convenience methods on SerializationOptions that encapsulates this logic, e.g., opts.serializingForExplain(). Or perhaps some high level comments near the SerializationOptions would be sufficient.