cubes
cubes copied to clipboard
Add record, dimension value measure value data types
Add datatypes representing database record Record, value of dimension key and numeric value of measures/aggregates. Suggestion:
MeasureValueType = Union[int, float]
DimensionValueType = Union[int, str]
# Or if we decide to support Nulls (discouraged, but people have all sorts of data out there):
DimensionValueType = Optional[Union[int, str]]
RecordValueType = Union[MeasureValueType, DimensionValueType]
# Alternative with nulls:
RecordValueType = Optional[Union[MeasureValueType, DimensionValueType]]
RecordType = Mapping[str, RecordValueType]
Questions
- Do we allow NULLs?
- If yes, when and how?
- Is there a need to have two versions of Record type with Optional and not-Optional values?
Affected
-
AggregationResult.cellsand.summary -
Browser.aggregate() -
HierarchyPath - SQL backend: browser and execution
See also
- #409 – Investigate use and effects of None path values
Updated description: changed names to *Type and added questions/comments about optionals/NULL values.