sage.query_engine package¶
Subpackages¶
- sage.query_engine.iterators package
- Submodules
- sage.query_engine.iterators.filter module
- sage.query_engine.iterators.loader module
- sage.query_engine.iterators.nlj module
- sage.query_engine.iterators.preemptable_iterator module
- sage.query_engine.iterators.projection module
- sage.query_engine.iterators.scan module
- sage.query_engine.iterators.union module
- sage.query_engine.iterators.utils module
- Module contents
- sage.query_engine.optimizer package
- sage.query_engine.protobuf package
- sage.query_engine.update package
Submodules¶
sage.query_engine.exceptions module¶
-
exception
sage.query_engine.exceptions.
DeleteInsertConflict
¶ Bases:
Exception
Raised when a conflict happended during the serialization of a transaction
-
exception
sage.query_engine.exceptions.
QuantumExhausted
¶ Bases:
Exception
Raised when the time quantum for a query execution has been exceeded
-
exception
sage.query_engine.exceptions.
TooManyResults
¶ Bases:
Exception
Raised when the maximum number of results for a query execution has been exceeded
-
exception
sage.query_engine.exceptions.
UnsupportedSPARQL
¶ Bases:
Exception
Raised when a SPARQL feature is not supported by the Sage query engine
sage.query_engine.sage_engine module¶
-
class
sage.query_engine.sage_engine.
SageEngine
¶ Bases:
object
SaGe query engine, used to evaluated a preemptable physical query execution plan
-
async
execute
(plan: sage.query_engine.iterators.preemptable_iterator.PreemptableIterator, context: dict) → Tuple[List[Dict[str, str]], Optional[iterators_pb2.RootTree], bool, Optional[str]]¶ Execute a preemptable physical query execution plan under a time quantum.
- Args:
plan: Root of the pipeline of iterator.
context: Information about the query execution.
- Returns: A tuple (
results
,saved_plan
,is_done
,abort_reason
) where: results
is a list of solution mappings found during query executionsaved_plan
is the state of the plan saved using protocol-buffersis_done
is True when the plan has completed query evalution, False otherwiseabort_reason
is True if the query was aborted due a to concurrency control issue
Throws: Any exception raised during query execution.
-
async
-
async
sage.query_engine.sage_engine.
executor
(pipeline: sage.query_engine.iterators.preemptable_iterator.PreemptableIterator, results: list, context: dict) → None¶ Execute a pipeline of iterator under a time quantum.
- Args:
pipeline: Root of the pipeline of iterator.
results: List used to store query results.
context: Information about the query execution.
Throws: Any exception raised during query execution.