MCPcopy Create free account
hub / github.com/activeloopai/deeplake / deeplake_planner

Function deeplake_planner

cpp/deeplake_pg/extension_init.cpp:1245–1269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1243}
1244
1245static PlannedStmt*
1246deeplake_planner(Query* parse, const char* query_string, int32_t cursorOptions, ParamListInfo boundParams)
1247{
1248 pg::init_deeplake();
1249
1250 // Transform ->> to jsonb_field_eq
1251 if (pg::support_json_index && parse && parse->jointree && parse->jointree->quals) {
1252 transform_jsonb_arrow_quals((Node**)&parse->jointree->quals);
1253 }
1254
1255 PlannedStmt* planned_stmt = nullptr;
1256 if (pg::use_deeplake_executor && is_pure_select_statement(query_string)) {
1257 planned_stmt = deeplake_create_direct_execution_plan(parse, query_string, cursorOptions, boundParams);
1258 }
1259
1260 if (!planned_stmt) {
1261 if (prev_planner_hook) {
1262 planned_stmt = prev_planner_hook(parse, query_string, cursorOptions, boundParams);
1263 } else {
1264 planned_stmt = standard_planner(parse, query_string, cursorOptions, boundParams);
1265 }
1266 }
1267
1268 return planned_stmt;
1269}
1270
1271static void executor_start(QueryDesc* query_desc, int32_t eflags)
1272{

Callers

nothing calls this directly

Calls 4

init_deeplakeFunction · 0.85
is_pure_select_statementFunction · 0.85

Tested by

no test coverage detected