-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Value interface & serialization clean-up #14710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This got me thinking that we probably do this for |
Vectors only serialize their data - the type is serialized in the DataChunk: serializer.WriteProperty(100, "has_validity_mask", ...)
serializer.WriteProperty(101, "validity", ...)
serializer.WriteProperty(102, "data", ...)
serializer.WriteList(103, "children", ...) |
Value interface & serialization clean-up (duckdb/duckdb#14710)
Value interface & serialization clean-up (duckdb/duckdb#14710)
Value interface & serialization clean-up (duckdb/duckdb#14710) Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
This PR does some clean-up in the Value interface and serialization:
Value::EMPTYLIST
andValue::EMPTYARRAY
are removed, instead the interfaceValue::LIST(type, values)
can be used to generate an empty list/arrayValue::MAP
andValue::STRUCT
now correctly insert casts to enforce that the values are internally consistent with the defined typesLogicalType::ANY
is explicitly supported in nested value types - in which case these types are ignored, i.e. we can doValue::LIST(LogicalType::ANY, values)
with a list of values of any typeLogicalType::ANY
). Instead, the type from the upper-layer is used (i.e. if we haveLogicalType::LIST(LogicalType::INT)
, the child elements are deserialized asLogicalType::INT
).Value
also in nested values, unless the serialization version is set to>= 1.2.0
.