Created
March 29, 2018 13:21
-
-
Save dvirsky/d6a78b47ec00b550a1cbf9cc30e2e5ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
RSMultiKey *keys; | |
} AggregateLoadStep; | |
typedef struct { | |
const char *reducer; | |
CmdArg *args; // TODO: something better here... | |
const char *alias; | |
} AggregateGroupReduce; | |
typedef struct { | |
RSMultiKey *properties; | |
AggregateGroupReduce *reducers; | |
size_t numReducers; | |
const char *alias; | |
} AggregateGroupStep; | |
typedef struct { | |
const char *expr; | |
const char *alias; | |
} AggregateApplyStep; | |
typedef struct { | |
RSMultiKey *keys; | |
uint64_t ascendMap; | |
int max; | |
} AggregateSortStep; | |
typedef struct { | |
int offset; | |
int num; | |
} AggregateLimitStep; | |
typedef enum { | |
AggregateStep_Group, | |
AggregateStep_Sort, | |
AggregateStep_Apply, | |
AggregateStep_Limit, | |
AggregateStep_Load, | |
} AggregateStepType; | |
typedef struct AggregateStep { | |
union { | |
AggregateApplyStep apply; | |
AggregateGroupStep group; | |
AggregateLoadStep load; | |
AggregateLimitStep limit; | |
AggregateSortStep sort; | |
}; | |
AggregateStepType type; | |
struct AggregateStep *next; | |
} AggregateStep; | |
typedef struct { | |
size_t count; | |
int maxIdle; | |
} AggregateCursor; | |
typedef struct { | |
const char *index; | |
const char *query; | |
size_t queryLen; | |
AggregateStep *head; | |
AggregateStep *tail; | |
size_t size; | |
int hasCursor; | |
AggregateCursor cursor; | |
} AggregatePlan; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment