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:
ExceptionRaised when a conflict happended during the serialization of a transaction
-
exception
sage.query_engine.exceptions.QuantumExhausted¶ Bases:
ExceptionRaised when the time quantum for a query execution has been exceeded
-
exception
sage.query_engine.exceptions.TooManyResults¶ Bases:
ExceptionRaised when the maximum number of results for a query execution has been exceeded
-
exception
sage.query_engine.exceptions.UnsupportedSPARQL¶ Bases:
ExceptionRaised 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:
objectSaGe 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: resultsis a list of solution mappings found during query executionsaved_planis the state of the plan saved using protocol-buffersis_doneis True when the plan has completed query evalution, False otherwiseabort_reasonis 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.