Replies: 3 comments 4 replies
-
Some thoughts -
|
Beta Was this translation helpful? Give feedback.
-
Table structure
The definition JSON field represents the cohorts enums. For example, a cohort defined as:
Will be written as a map to the DB
Why write it like this? It makes matching enums a lookup in a map and lets us append the jsonlogic to an existing context or amend it after evaluation in contexts without jsonlogic. API Design
|
Beta Was this translation helpful? Give feedback.
-
Our discussion so far: Cohorts can be a type of dimension, and stored as a dimension with a column to differentiate between a cohort dimension and regular dimension. The cohort dimensions will have the following:
The evaluation happens as follows, taking an example:
Assume the application is querying with the context -> user_id == 'a'
Some questions still left
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem statement
Superposition has moved towards strict equality in contexts to support completely unambiguous resolution while performing operations. This removes the operator flexibility that was earlier available in constructing context expressions. This flexibility allowed users to construct context expressions like
dimension1 in ['val1' , 'va2']
. As mentioned earlier, this flexibility causes ambiguous resolution behaviour as Superposition does not yet assign priority to operators (it does only for dimensions).So the problem statement at hand is how to bring back this feature while retaining the unambiguous resolution semantics.
Proposed Solution
To solve this problem, we introduce a concept called Cohort Dimensions. Cohort Dimensions are dimensions which are derived out of existing dimensions (we will refer to the existing dimensions as Primary Dimensions going forward.). Cohort dimensions have the following characteristics:
Technical implementation
Beta Was this translation helpful? Give feedback.
All reactions