Skip to content

Commit

Permalink
Delete unused (#159)
Browse files Browse the repository at this point in the history
* Remove unused files from project

* Entirely remove rmutil dependency, relocate Vector
  • Loading branch information
jeffreylovitz authored and swilly22 committed Oct 20, 2018
1 parent 6ccc1b9 commit 87fde52
Show file tree
Hide file tree
Showing 56 changed files with 32 additions and 2,685 deletions.
8 changes: 1 addition & 7 deletions src/Makefile
Expand Up @@ -60,12 +60,11 @@ export CC_OBJECTS
CC_DEPS = $(patsubst %.c, %.d, $(CC_SOURCES) )

# Library dependencies
LIBRMUTIL=rmutil/librmutil.a
LIBTRIEMAP=util/triemap/libtriemap.a
GRAPHBLAS=../deps/GraphBLAS/build/libgraphblas.a

# Compilation deps for the module
LIBS=$(LIBTRIEMAP) $(LIBRMUTIL) $(GRAPHBLAS)
LIBS=$(LIBTRIEMAP) $(GRAPHBLAS)
MODULE=$(CC_OBJECTS) $(LIBS)

%.c: %.y
Expand All @@ -80,11 +79,6 @@ all: redisgraph.so
# Include all dependency files for C files
-include $(CC_DEPS)

# Library compile rules
$(LIBRMUTIL):
$(MAKE) -C rmutil
.PHONY: $(LIBRMUTIL)

$(LIBTRIEMAP):
$(MAKE) -C util/triemap
.PHONY: $(LIBTRIEMAP)
Expand Down
2 changes: 1 addition & 1 deletion src/arithmetic/repository.c
Expand Up @@ -6,7 +6,7 @@
*/

#include "repository.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"

typedef struct {
const char *name;
Expand Down
6 changes: 2 additions & 4 deletions src/commands/cmd_explain.c
Expand Up @@ -6,7 +6,6 @@
*/

#include "cmd_explain.h"
#include "../rmutil/util.h"
#include "../index/index.h"
#include "../query_executor.h"
#include "../execution_plan/execution_plan.h"
Expand All @@ -19,9 +18,8 @@
int MGraph_Explain(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (argc < 3) return RedisModule_WrongArity(ctx);

const char *graph_name;
const char *query;
RMUtil_ParseArgs(argv, argc, 1, "cc", &graph_name, &query);
const char *graph_name = RedisModule_StringPtrLen(argv[1], NULL);
const char *query = RedisModule_StringPtrLen(argv[2], NULL);

/* Parse query, get AST. */
char *errMsg = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/execution_plan/execution_plan.c
Expand Up @@ -10,7 +10,7 @@
#include "execution_plan.h"
#include "./ops/ops.h"
#include "../graph/edge.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"
#include "../query_executor.h"
#include "../arithmetic/algebraic_expression.h"
#include "./optimizations/optimizer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/execution_plan/ops/op.h
Expand Up @@ -14,7 +14,7 @@
#include "../../graph/node.h"
#include "../../graph/edge.h"
#include "../../stores/store.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"

#define OP_REQUIRE_NEW_DATA(opRes) (opRes & (OP_DEPLETED | OP_REFRESH)) > 0

Expand Down
1 change: 0 additions & 1 deletion src/execution_plan/ops/op_aggregate.c
Expand Up @@ -7,7 +7,6 @@

#include "op_aggregate.h"
#include "../../arithmetic/aggregate.h"
#include "../../rmutil/strings.h"
#include "../../grouping/group.h"
#include "../../grouping/group_cache.h"
#include "../../query_executor.h"
Expand Down
3 changes: 1 addition & 2 deletions src/execution_plan/ops/op_conditional_traverse.h
Expand Up @@ -9,11 +9,10 @@
#define __OP_COND_TRAVERSE_H

#include "op.h"
#include "../../rmutil/sds.h"
#include "../../parser/ast.h"
#include "../../arithmetic/algebraic_expression.h"
#include "../../GraphBLASExt/tuples_iter.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"

/* OP Traverse */
typedef struct {
Expand Down
3 changes: 1 addition & 2 deletions src/execution_plan/ops/op_traverse.h
Expand Up @@ -9,10 +9,9 @@
#define __OP_TRAVERSE_H

#include "op.h"
#include "../../rmutil/sds.h"
#include "../../parser/ast.h"
#include "../../arithmetic/algebraic_expression.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"
#include "../../GraphBLASExt/tuples_iter.h"

/* OP Traverse */
Expand Down
2 changes: 1 addition & 1 deletion src/execution_plan/optimizations/traverse_order.c
Expand Up @@ -6,7 +6,7 @@
*/

#include "./traverse_order.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"

/* Given a set of algebraic expressions and the entire filter tree,
* suggest traversal entry point to be either the first expression or the
Expand Down
2 changes: 1 addition & 1 deletion src/filter_tree/filter_tree.c
Expand Up @@ -10,7 +10,7 @@
#include "filter_tree.h"
#include "../parser/grammar.h"
#include "../query_executor.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"

FT_FilterNode* LeftChild(const FT_FilterNode *node) { return node->cond.left; }
FT_FilterNode* RightChild(const FT_FilterNode *node) { return node->cond.right; }
Expand Down
1 change: 0 additions & 1 deletion src/filter_tree/filter_tree.h
Expand Up @@ -8,7 +8,6 @@
#ifndef _FILTER_TREE_H
#define _FILTER_TREE_H

#include "../value_cmp.h"
#include "../parser/ast.h"
#include "../graph/query_graph.h"
#include "../redismodule.h"
Expand Down
2 changes: 1 addition & 1 deletion src/graph/node.h
Expand Up @@ -10,7 +10,7 @@

#include "../value.h"
#include "graph_entity.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"
#include "../../deps/GraphBLAS/Include/GraphBLAS.h"

/* Forward declaration of edge */
Expand Down
2 changes: 1 addition & 1 deletion src/graph/query_graph.h
Expand Up @@ -11,7 +11,7 @@
#include "node.h"
#include "edge.h"
#include "graph.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"
#include "../resultset/resultset_statistics.h"

#define DEFAULT_GRAPH_CAP 32 /* Number of edges/nodes within the graph. */
Expand Down
2 changes: 1 addition & 1 deletion src/grouping/group.h
Expand Up @@ -8,7 +8,7 @@
#ifndef GROUP_H_
#define GROUP_H_

#include "../rmutil/vector.h"
#include "../util/vector.h"
#include "../arithmetic/agg_ctx.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion src/grouping/group_cache.c
Expand Up @@ -6,7 +6,7 @@
*/

#include "group_cache.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"

void CacheGroupAdd(TrieMap *groups, char *key, Group *group) {
TrieMap_Add(groups, key, strlen(key), group, NULL);
Expand Down
2 changes: 1 addition & 1 deletion src/grouping/group_cache.h
Expand Up @@ -10,7 +10,7 @@

#include "group.h"
#include "../util/triemap/triemap.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"

typedef TrieMapIterator CacheGroupIterator;
void InitGroupCache();
Expand Down
2 changes: 1 addition & 1 deletion src/parser/ast.h
Expand Up @@ -12,7 +12,7 @@
#include "../value.h"
#include "./ast_common.h"
#include "../redismodule.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"
#include "./clauses/clauses.h"

typedef enum {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/ast_arithmetic_expression.h
Expand Up @@ -8,7 +8,7 @@
#ifndef _AST_ARITHMETIC_EXPRESSION_H
#define _AST_ARITHMETIC_EXPRESSION_H

#include "../rmutil/vector.h"
#include "../util/vector.h"
#include "../util/triemap/triemap.h"
#include "../value.h"

Expand Down
2 changes: 1 addition & 1 deletion src/parser/ast_common.h
Expand Up @@ -9,7 +9,7 @@
#define _AST_COMMON_H

#include <stdbool.h>
#include "../rmutil/vector.h"
#include "../util/vector.h"

typedef enum {
N_ENTITY,
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/create.h
Expand Up @@ -8,7 +8,7 @@
#ifndef _CLAUSE_CREATE_H
#define _CLAUSE_CREATE_H

#include "../../rmutil/vector.h"
#include "../../util/vector.h"
#include "../../util/triemap/triemap.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/delete.h
Expand Up @@ -8,7 +8,7 @@
#ifndef _CLAUSE_DELETE_H
#define _CLAUSE_DELETE_H

#include "../../rmutil/vector.h"
#include "../../util/vector.h"
#include "../../util/triemap/triemap.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/limit.h
Expand Up @@ -8,7 +8,7 @@
#ifndef _CLAUSE_LIMIT_H
#define _CLAUSE_LIMIT_H

#include "../../rmutil/vector.h"
#include "../../util/vector.h"

typedef struct {
int limit;
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/match.h
Expand Up @@ -9,7 +9,7 @@
#define _CLAUSE_MATCH_H

#include "../ast_common.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"
#include "../../util/triemap/triemap.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/merge.h
Expand Up @@ -8,7 +8,7 @@
#ifndef _CLAUSE_MERGE_H
#define _CLAUSE_MERGE_H

#include "../../rmutil/vector.h"
#include "../../util/vector.h"

typedef struct {
Vector *graphEntities; /* Vector of AST_NodeEntity pointers. */
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/order.h
Expand Up @@ -8,7 +8,7 @@
#ifndef _CLAUSE_ORDER_H
#define _CLAUSE_ORDER_H

#include "../../rmutil/vector.h"
#include "../../util/vector.h"
#include "../ast_common.h"

typedef enum {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/return.h
Expand Up @@ -9,7 +9,7 @@
#define _CLAUSE_RETURN_H

#include "../ast_arithmetic_expression.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"

typedef struct {
char *alias; // Alias given to this return element (using the AS keyword)
Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/set.h
Expand Up @@ -9,7 +9,7 @@
#define _CLAUSE_SET_H

#include "../ast_common.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"
#include "../../util/triemap/triemap.h"
#include "../ast_arithmetic_expression.h"

Expand Down
2 changes: 1 addition & 1 deletion src/parser/clauses/where.h
Expand Up @@ -9,7 +9,7 @@
#define _CLAUSE_WHERE_H

#include "../../value.h"
#include "../../rmutil/vector.h"
#include "../../util/vector.h"
#include "../../util/triemap/triemap.h"
#include "../ast_arithmetic_expression.h"

Expand Down
3 changes: 1 addition & 2 deletions src/query_executor.c
Expand Up @@ -11,8 +11,7 @@
#include "graph/node.h"
#include "graph/graph_type.h"
#include "stores/store.h"
#include "rmutil/vector.h"
#include "rmutil/util.h"
#include "util/vector.h"
#include "parser/grammar.h"
#include "arithmetic/agg_ctx.h"
#include "arithmetic/repository.h"
Expand Down
2 changes: 1 addition & 1 deletion src/resultset/resultset.h
Expand Up @@ -13,7 +13,7 @@
#include "resultset_statistics.h"
#include "../parser/ast.h"
#include "../redismodule.h"
#include "../rmutil/vector.h"
#include "../util/vector.h"
#include "../util/heap.h"
#include "../util/triemap/triemap.h"

Expand Down
1 change: 0 additions & 1 deletion src/resultset/resultset_record.c
Expand Up @@ -6,7 +6,6 @@
*/

#include "resultset_record.h"
#include "../rmutil/strings.h"
#include "../query_executor.h"

ResultSetRecord* NewResultSetRecord(size_t len) {
Expand Down
28 changes: 0 additions & 28 deletions src/rmutil/Makefile

This file was deleted.

0 comments on commit 87fde52

Please sign in to comment.