Class: ConceptQL::Operators::Last
- Inherits:
-
Occurrence
- Object
- Operator
- Occurrence
- ConceptQL::Operators::Last
- Defined in:
- lib/conceptql/operators/last.rb
Overview
Represents a operator that will grab the last occurrence of something
The operator treats all streams as a single, large stream. It partitions that larget stream by person_id, then sorts within those groupings by start_date and then select at most one row per person, regardless of how many different types of streams enter the operator
If two rows have the same start_date, the order of their ranking is arbitrary
If we ask for the last occurrence of something and a person has no occurrences, this operator returns nothing for that person
Constant Summary
Constants inherited from Operator
Instance Attribute Summary
Attributes inherited from Operator
#arguments, #options, #upstreams, #values
Instance Method Summary collapse
Methods inherited from Occurrence
Methods inherited from Operator
#columns, #evaluate, #initialize, #label, #select_it, #set_values, #sql, #stream, #types
Methods included from Metadatable
#allows_many_upstreams, #allows_one_upstream, #argument, #category, #desc, #humanized_class_name, #inherited, #just_class_name, #option, #predominant_types, #preferred_name, #reset_categories, #to_metadata, #types
Constructor Details
This class inherits a constructor from ConceptQL::Operators::Operator
Instance Method Details
#occurrence ⇒ Object
20 21 22 |
# File 'lib/conceptql/operators/last.rb', line 20 def occurrence -1 end |