Skip to content

Commit

Permalink
#29865 just more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jdotcms committed Sep 19, 2024
1 parent c9c6deb commit 7f89897
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,29 @@
import java.util.Set;

/**
* Encapsulates a simplificated query for the analytics backend
* Encapsulates a simple query for the analytics backend
* Example:
* <pre>
* {
* "query": {
* "dimensions": [
* "Events.experiment",
* "Events.variant",
* "Events.lookBackWindow"
* ],
* "measures": [
* "Events.count"
* ],
* "filters": "Events.variant = ['B']",
* "limit": 100,
* "offset": 1,
* "timeDimensions": "Events.day day",
* "orders": "Events.day ASC"
* }
* }
*
* @see AnalyticsQueryParser
* </pre>
* @author jsanca
*/
@JsonDeserialize(builder = AnalyticsQuery.Builder.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

/**
* Parser for a filter expression
* Example:
* <pre>
* FilterParser.parseFilterExpression("Events.variant = ['B'] or Events.experiments = ['C']");
* </pre>
* should return 2 tokens and 1 logical operator
* Tokens are member, operator and values (Events.variant, =, B) and the operator is 'and' or 'or'
* @author jsanca
*/
public class FilterParser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

/**
* Order parser
* Example:
* <pre>
* OrderParser.parseOrder("Events.day ASC");
* </pre>
*
* should return Events.day and ASC (term and order)
* if the order is not ASC or DESC or is missing will throw {@link IllegalArgumentException}
* @author jsanca
*/
public class OrderParser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

/**
* Time Dimension Parser
* Example:
* <pre>
* TimeDimensionParser.parseTimeDimension("Events.day day");
* </pre>
*
* This should return Events.day and day (term and field)
* Note: this is not support intervals for dates, but will introduce on the future
* @author jsanca
*/
public class TimeDimensionParser {
Expand Down

0 comments on commit 7f89897

Please sign in to comment.