1Attean::QueryPlanner(3)User Contributed Perl DocumentatioAnttean::QueryPlanner(3)
2
3
4

NAME

6       Attean::QueryPlanner - Query planner
7

VERSION

9       This document describes Attean::QueryPlanner version 0.030
10

SYNOPSIS

12         use v5.14;
13         use Attean;
14         my $planner = Attean::QueryPlanner->new();
15         my $default_graphs = [ Attean::IRI->new('http://example.org/') ];
16         my $plan = $planner->plan_for_algebra( $algebra, $model, $default_graphs );
17         my $iter = $plan->evaluate($model);
18         while (my $result = $iter->next()) {
19           say $result->as_string;
20         }
21

DESCRIPTION

23       The Attean::QueryPlanner class is a base class implementing common
24       behavior for query planners. Subclasses will need to consume or compose
25       the Attean::API::JoinPlanner role.
26
27       Trivial sub-classes may consume Attean::API::NaiveJoinPlanner, while
28       more complex planners may choose to implement complex join planning
29       (e.g.  Attean::IDPQueryPlanner).
30

ATTRIBUTES

METHODS

33       "new_temporary( $type )"
34           Returns a new unique (in the context of the query planner) ID
35           string that may be used for things like fresh (temporary)
36           variables. The $type string is used in the generated name to aid in
37           identifying different uses for the names.
38
39       "plan_for_algebra( $algebra, $model, \@active_graphs, \@default_graphs
40       )"
41           Returns the first plan returned from "plans_for_algebra".
42
43       "plans_for_algebra( $algebra, $model, \@active_graphs, \@default_graphs
44       )"
45           Returns Attean::API::Plan objects representing alternate query
46           plans for evaluating the query $algebra against the $model, using
47           the supplied $active_graph.
48
49       "simplify_path( $subject, $path, $object )"
50           Return a simplified Attean::API::Algebra object corresponding to
51           the given property path.
52
53       "new_projection( $plan, $distinct, @variable_names )"
54           Return a new Attean::Plan::Project plan over $plan, projecting the
55           named variables. $disctinct should be true if the caller can
56           guarantee that the resulting plan will produce distinct results,
57           false otherwise.
58
59           This method takes care of computing plan metadata such as the
60           resulting ordering.
61
62       "bgp_join_plans( $bgp, $model, \@active_graphs, \@default_graphs,
63       \@interesting_order, \@plansA, \@plansB, ... )"
64           Returns a list of alternative plans for the join of a set of
65           triples.  The arguments @plansA, @plansB, etc. represent
66           alternative plans for each triple participating in the join.
67
68       "group_join_plans( $model, \@active_graphs, \@default_graphs,
69       \@interesting_order, \@plansA, \@plansB, ... )"
70           Returns a list of alternative plans for the join of a set of sub-
71           plans.  The arguments @plansA, @plansB, etc. represent alternative
72           plans for each sub-plan participating in the join.
73
74       "joins_for_plan_alternatives( $model, \@active_graphs,
75       \@default_graphs, $interesting, \@plan_A, \@plan_B, ... )"
76           Returns a list of alternative plans that may all be used to produce
77           results matching the join of "plan_A", " plan_B ">, etc. Each plan
78           array here (e.g. @plan_A) should contain equivalent plans.
79
80       "access_plans( $model, $active_graphs, $pattern )"
81           Returns a list of alternative Attean::API::Plan objects that may be
82           used to produce results matching the
83           Attean::API::TripleOrQuadPattern $pattern in the context of
84           $active_graphs.
85
86       "join_plans( $model, \@active_graphs, \@default_graphs, \@plan_left,
87       \@plan_right, $type [, $expr] )"
88           Returns a list of alternative plans for the join of one plan from
89           @plan_left and one plan from @plan_right. The join $type must be
90           one of 'inner', 'left', or 'minus', indicating the join algorithm
91           to be used. If $type is 'left', then the optional $expr may be used
92           to supply a filter expression that should be used by the SPARQL
93           left-join algorithm.
94

BUGS

96       Please report any bugs or feature requests to through the GitHub web
97       interface at <https://github.com/kasei/attean/issues>.
98

SEE ALSO

AUTHOR

101       Gregory Todd Williams  "<gwilliams@cpan.org>"
102
104       Copyright (c) 2014--2020 Gregory Todd Williams.  This program is free
105       software; you can redistribute it and/or modify it under the same terms
106       as Perl itself.
107
108
109
110perl v5.34.0                      2022-01-20           Attean::QueryPlanner(3)
Impressum