Skip to content

Field part reference for compound field types #8

@Stiivi

Description

@Stiivi

Allow use of parts of compound/indexable field types such as dates and arrays in operations. Example:

p.filter_by_value(FieldPart("event_date", "year"), 2013)

Advantages:

  • less steps, no need to explicit extraction
  • better readability

Disadvantages:

  • more requirements for implementing backend operations
  • operations might implement this selectively, depending on argument, which might cause inconsistencies

Requirements:

  • Field.is_composed() - True for date, array, record
  • DataObject.concrete_field(field_or_part)

Affected methods:

  • prepare_aggregation_measures()
  • prepare_key()
  • many operations

Recommendation: have this in OperationContext when argument annotations or when operation prototype metadata are implemented.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions