// Create the canonical plan for the definition ...
PlanHints hints = new PlanHints();
hints.validateColumnExistance = false;
// Create a query context that queries all workspaces (we won't actually query using it) ...
Set<String> allWorkspaces = Collections.emptySet();
RepositoryIndexes indexDefns = RepositoryIndexes.NO_INDEXES;
QueryContext queryContext = new QueryContext(context, null, allWorkspaces, schemata, indexDefns, nodeTypes,
bufferManager, hints, null);
CanonicalPlanner planner = new CanonicalPlanner();
PlanNode plan = planner.createPlan(queryContext, command);
if (queryContext.getProblems().hasErrors()) {