public class DistinctNodeImpl extends QueryModifierNodeImpl implements DistinctNode
iqFactory| Modifier and Type | Method and Description |
|---|---|
DistinctNode |
acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer)
"Accept" method for the "Visitor" pattern.
|
IQTree |
acceptTransformer(IQTree tree,
IQTreeVisitingTransformer transformer,
IQTree child) |
<T> T |
acceptVisitor(IQVisitor<T> visitor,
IQTree child) |
void |
acceptVisitor(QueryNodeVisitor visitor)
"Accept" method for the "Visitor" pattern.
|
IQTree |
applyDescendingSubstitution(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution,
Optional<ImmutableExpression> constraint,
IQTree child) |
IQTree |
applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution,
IQTree child) |
IQTree |
applyFreshRenaming(InjectiveVar2VarSubstitution renamingSubstitution,
IQTree child,
IQTreeCache treeCache) |
DistinctNode |
clone()
See https://stackoverflow.com/questions/6837362/
|
com.google.common.collect.ImmutableSet<Variable> |
computeNotInternallyRequiredVariables(IQTree child)
TODO: implement it more seriously, by consider functional dependencies between variables
|
com.google.common.collect.ImmutableSet<Variable> |
getLocallyDefinedVariables()
Locally defined variables must not appear in the sub-tree
|
com.google.common.collect.ImmutableSet<Variable> |
getLocallyRequiredVariables()
Set of variables that this node, INDEPENDENTLY OF THE REQUIREMENTS OF ITS ANCESTORS,
requires to be defined in the sub-tree.
|
com.google.common.collect.ImmutableSet<Variable> |
getLocalVariables()
Set of variables MENTIONED in the node, INDEPENDENTLY of its sub-tree.
|
com.google.common.collect.ImmutableSet<Variable> |
getRequiredVariables(IntermediateQuery query)
Set of variables which, individually, must be provided by at least one child,
INDEPENDENTLY OF THE REQUIREMENTS OF THIS NODE'S ANCESTORS.
|
com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> |
inferUniqueConstraints(IQTree child) |
boolean |
isDistinct(IQTree tree,
IQTree child) |
boolean |
isEquivalentTo(QueryNode queryNode)
Is syntactically equivalent
|
boolean |
isSyntacticallyEquivalentTo(QueryNode node)
TODO: explain
|
IQTree |
liftIncompatibleDefinitions(Variable variable,
IQTree child,
VariableGenerator variableGenerator)
TODO: implement it seriously! (is currently blocking)
|
IQTree |
normalizeForOptimization(IQTree child,
VariableGenerator variableGenerator,
IQProperties currentIQProperties) |
IQTree |
removeDistincts(IQTree child,
IQProperties iqProperties) |
String |
toString() |
void |
validateNode(IQTree child)
Only validates the node, not its child
|
getPossibleVariableDefinitions, getVariableNullability, isConstructed, isVariableNullable, propagateDownConstraintequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPossibleVariableDefinitions, getVariableNullability, isConstructed, propagateDownConstraintisVariableNullablepublic IQTree normalizeForOptimization(IQTree child, VariableGenerator variableGenerator, IQProperties currentIQProperties)
normalizeForOptimization in interface UnaryOperatorNodepublic IQTree liftIncompatibleDefinitions(Variable variable, IQTree child, VariableGenerator variableGenerator)
liftIncompatibleDefinitions in interface UnaryOperatorNodepublic IQTree applyDescendingSubstitution(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, Optional<ImmutableExpression> constraint, IQTree child)
applyDescendingSubstitution in interface UnaryOperatorNodepublic IQTree applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, IQTree child)
applyDescendingSubstitutionWithoutOptimizing in interface UnaryOperatorNodepublic IQTree applyFreshRenaming(InjectiveVar2VarSubstitution renamingSubstitution, IQTree child, IQTreeCache treeCache)
applyFreshRenaming in interface UnaryOperatorNodepublic boolean isDistinct(IQTree tree, IQTree child)
isDistinct in interface UnaryOperatorNodepublic IQTree acceptTransformer(IQTree tree, IQTreeVisitingTransformer transformer, IQTree child)
acceptTransformer in interface UnaryOperatorNodepublic <T> T acceptVisitor(IQVisitor<T> visitor, IQTree child)
acceptVisitor in interface UnaryOperatorNodepublic void validateNode(IQTree child) throws InvalidIntermediateQueryException
UnaryOperatorNodevalidateNode in interface UnaryOperatorNodeInvalidIntermediateQueryExceptionpublic IQTree removeDistincts(IQTree child, IQProperties iqProperties)
removeDistincts in interface UnaryOperatorNodepublic com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> inferUniqueConstraints(IQTree child)
inferUniqueConstraints in interface UnaryOperatorNodepublic com.google.common.collect.ImmutableSet<Variable> computeNotInternallyRequiredVariables(IQTree child)
computeNotInternallyRequiredVariables in interface UnaryOperatorNodepublic void acceptVisitor(QueryNodeVisitor visitor)
QueryNodeacceptVisitor in interface QueryNodepublic DistinctNode acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer) throws QueryNodeTransformationException
QueryNodeacceptNodeTransformer in interface QueryNodeacceptNodeTransformer in interface UnaryOperatorNodeQueryNodeTransformationExceptionpublic com.google.common.collect.ImmutableSet<Variable> getLocalVariables()
QueryNodegetLocalVariables in interface QueryNodepublic boolean isSyntacticallyEquivalentTo(QueryNode node)
QueryNodeisSyntacticallyEquivalentTo in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getLocallyRequiredVariables()
QueryNodegetLocallyRequiredVariables in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getRequiredVariables(IntermediateQuery query)
QueryNodegetRequiredVariables in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getLocallyDefinedVariables()
QueryNodegetLocallyDefinedVariables in interface QueryNodepublic boolean isEquivalentTo(QueryNode queryNode)
QueryNodeisEquivalentTo in interface QueryNodepublic DistinctNode clone()
QueryNodeImplclone in interface DistinctNodeclone in interface QueryNodeclone in class QueryNodeImplCopyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.