Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Mar 15, 2022
1 parent 4fc5a0c commit 3f74015
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 102 deletions.
14 changes: 3 additions & 11 deletions src/graph/executor/query/AggregateExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/AggregateExecutor.h"

#include "common/datatypes/List.h"
#include "common/expression/AggregateExpression.h"
#include "common/time/ScopedTimer.h"
#include "graph/context/QueryExpressionContext.h"
#include "graph/context/Result.h"
#include "graph/planner/plan/PlanNode.h"
#include "graph/planner/plan/Query.h"

namespace nebula {
Expand Down
10 changes: 5 additions & 5 deletions src/graph/executor/query/AggregateExecutor.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_AGGREGATEEXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_AGGREGATEEXECUTOR_H_

#include "graph/executor/Executor.h"

// calculate a set of data uniformly. use values ​​from multiple records as input
// and convert those values ​​into one value to aggregate all records
namespace nebula {
namespace graph {

Expand Down
7 changes: 3 additions & 4 deletions src/graph/executor/query/AppendVerticesExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Copyright (c) 2021 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2021 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/AppendVerticesExecutor.h"

Expand Down
9 changes: 5 additions & 4 deletions src/graph/executor/query/AppendVerticesExecutor.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* Copyright (c) 2021 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_APPENDVERTICESEXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_APPENDVERTICESEXECUTOR_H_

#include "graph/executor/query/GetPropExecutor.h"
#include "graph/planner/plan/Query.h"
// only used in match scenarios
// and convert those values ​​into one value to aggregate all records

namespace nebula {
namespace graph {
Expand Down
8 changes: 3 additions & 5 deletions src/graph/executor/query/AssignExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/AssignExecutor.h"

#include "graph/planner/plan/Query.h"

namespace nebula {
Expand Down
9 changes: 4 additions & 5 deletions src/graph/executor/query/AssignExecutor.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_ASSIGNEXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_ASSIGNEXECUTOR_H_

#include "graph/executor/Executor.h"

// assign value to variable
namespace nebula {
namespace graph {

Expand Down
2 changes: 0 additions & 2 deletions src/graph/executor/query/DataCollectExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*/

#include "graph/executor/query/DataCollectExecutor.h"

#include "common/time/ScopedTimer.h"
#include "graph/planner/plan/Query.h"

namespace nebula {
Expand Down
10 changes: 3 additions & 7 deletions src/graph/executor/query/DedupExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/DedupExecutor.h"

#include "common/time/ScopedTimer.h"
#include "graph/context/QueryExpressionContext.h"
#include "graph/planner/plan/Query.h"

namespace nebula {
namespace graph {
folly::Future<Status> DedupExecutor::execute() {
Expand Down
10 changes: 5 additions & 5 deletions src/graph/executor/query/DedupExecutor.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_DEDUPEXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_DEDUPEXECUTOR_H_

#include "graph/executor/Executor.h"

// When there are duplicate rows in the dataset, delete the corresponding iterator
// and then save the filtered iterator to the result
namespace nebula {
namespace graph {

Expand Down
10 changes: 3 additions & 7 deletions src/graph/executor/query/FilterExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/FilterExecutor.h"

#include "common/time/ScopedTimer.h"
#include "graph/context/QueryExpressionContext.h"
#include "graph/planner/plan/Query.h"

namespace nebula {
Expand Down
9 changes: 5 additions & 4 deletions src/graph/executor/query/FilterExecutor.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_FILTEREXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_FILTEREXECUTOR_H_

#include "graph/executor/Executor.h"

// delete the corresponding iterator when the row in the dataset does not meet the conditions
// and save the filtered iterator to the result
namespace nebula {
namespace graph {

Expand Down
11 changes: 3 additions & 8 deletions src/graph/executor/query/GetEdgesExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/GetEdgesExecutor.h"

#include "common/time/ScopedTimer.h"
#include "graph/context/QueryContext.h"
#include "graph/planner/plan/Query.h"
#include "graph/util/SchemaUtil.h"

using nebula::storage::StorageClient;
using nebula::storage::StorageRpcResponse;
Expand Down
8 changes: 4 additions & 4 deletions src/graph/executor/query/GetEdgesExecutor.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_GETEDGESEXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_GETEDGESEXECUTOR_H_

#include "graph/executor/query/GetPropExecutor.h"

// get user-specified edge attributes
namespace nebula {
namespace graph {
class GetEdges;
Expand Down
15 changes: 3 additions & 12 deletions src/graph/executor/query/GetNeighborsExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/GetNeighborsExecutor.h"

#include <sstream>

#include "clients/storage/StorageClient.h"
#include "common/datatypes/List.h"
#include "common/datatypes/Vertex.h"
#include "common/time/ScopedTimer.h"
#include "graph/context/QueryContext.h"
#include "graph/service/GraphFlags.h"

using nebula::storage::StorageClient;
Expand Down
11 changes: 5 additions & 6 deletions src/graph/executor/query/GetNeighborsExecutor.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_GETNEIGHBORSEXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_GETNEIGHBORSEXECUTOR_H_

#include "graph/executor/StorageAccessExecutor.h"
#include "graph/planner/plan/Query.h"
#include "interface/gen-cpp2/storage_types.h"

// get the attributes of the start vertex and edges specified by the user from the storage layer
// the returned result is a list<dataset>, the format of each dataset refers to the storage.thrift
namespace nebula {
namespace graph {

class GetNeighborsExecutor final : public StorageAccessExecutor {
public:
GetNeighborsExecutor(const PlanNode* node, QueryContext* qctx)
Expand Down
11 changes: 3 additions & 8 deletions src/graph/executor/query/GetVerticesExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#include "graph/executor/query/GetVerticesExecutor.h"

#include "common/time/ScopedTimer.h"
#include "graph/context/QueryContext.h"
#include "graph/util/SchemaUtil.h"

using nebula::storage::StorageClient;
using nebula::storage::StorageRpcResponse;
using nebula::storage::cpp2::GetPropResponse;
Expand Down
9 changes: 4 additions & 5 deletions src/graph/executor/query/GetVerticesExecutor.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
// Copyright (c) 2022 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

#ifndef GRAPH_EXECUTOR_QUERY_GETVERTICESEXECUTOR_H_
#define GRAPH_EXECUTOR_QUERY_GETVERTICESEXECUTOR_H_

#include "graph/executor/query/GetPropExecutor.h"
#include "graph/planner/plan/Query.h"

// get user-specified edge attributes
namespace nebula {
namespace graph {

Expand Down

0 comments on commit 3f74015

Please sign in to comment.