1
1
#include " binder/binder.h"
2
2
#include " function/table/bind_data.h"
3
+ #include " function/table/bind_input.h"
3
4
#include " function/table/standalone_call_function.h"
4
5
#include " function/table/table_function.h"
5
6
#include " graph/graph_entry_set.h"
6
- #include " main/client_context.h"
7
7
#include " parser/parser.h"
8
8
#include " processor/execution_context.h"
9
9
@@ -27,15 +27,15 @@ struct ProjectGraphCypherBindData final : TableFuncBindData {
27
27
28
28
static offset_t tableFunc (const TableFuncInput& input, TableFuncOutput&) {
29
29
const auto bindData = ku_dynamic_cast<ProjectGraphCypherBindData*>(input.bindData );
30
- auto & graphEntrySet = input.context ->clientContext -> getGraphEntrySetUnsafe ( );
31
- graphEntrySet. validateGraphNotExist (bindData->graphName );
30
+ auto graphEntrySet = GraphEntrySet::Get (* input.context ->clientContext );
31
+ graphEntrySet-> validateGraphNotExist (bindData->graphName );
32
32
// bind graph entry to check if input is valid or not. Ignore bind result.
33
33
auto parsedStatements = parser::Parser::parseQuery (bindData->cypherQuery );
34
34
KU_ASSERT (parsedStatements.size () == 1 );
35
35
auto binder = binder::Binder (input.context ->clientContext );
36
36
binder.bind (*parsedStatements[0 ]);
37
37
auto entry = std::make_unique<ParsedCypherGraphEntry>(bindData->cypherQuery );
38
- graphEntrySet. addGraph (bindData->graphName , std::move (entry));
38
+ graphEntrySet-> addGraph (bindData->graphName , std::move (entry));
39
39
return 0 ;
40
40
}
41
41
0 commit comments