Skip to content
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

Field part reference for compound field types #8

Open
Stiivi opened this issue Jul 17, 2013 · 0 comments
Open

Field part reference for compound field types #8

Stiivi opened this issue Jul 17, 2013 · 0 comments

Comments

@Stiivi
Copy link
Owner

Stiivi commented Jul 17, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant