use of org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.FDsAndEquivClassesVisitor in project asterixdb by apache.
the class EnforceStructuralPropertiesRule method newPropertiesDiff.
private IPhysicalPropertiesVector newPropertiesDiff(AbstractLogicalOperator newChild, IPhysicalPropertiesVector required, boolean mayExpandPartitioningProperties, IOptimizationContext context) throws AlgebricksException {
IPhysicalPropertiesVector newDelivered = newChild.getDeliveredPhysicalProperties();
Map<LogicalVariable, EquivalenceClass> newChildEqClasses = context.getEquivalenceClassMap(newChild);
List<FunctionalDependency> newChildFDs = context.getFDList(newChild);
if (newChildEqClasses == null || newChildFDs == null) {
FDsAndEquivClassesVisitor fdsVisitor = new FDsAndEquivClassesVisitor();
newChild.accept(fdsVisitor, context);
newChildEqClasses = context.getEquivalenceClassMap(newChild);
newChildFDs = context.getFDList(newChild);
}
AlgebricksConfig.ALGEBRICKS_LOGGER.finest(">>>> Required properties for new op. " + newChild.getPhysicalOperator() + ": " + required + "\n");
return newDelivered.getUnsatisfiedPropertiesFrom(required, mayExpandPartitioningProperties, newChildEqClasses, newChildFDs);
}
use of org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.FDsAndEquivClassesVisitor in project asterixdb by apache.
the class PhysicalOptimizationsUtil method computeFDsAndEquivalenceClasses.
public static void computeFDsAndEquivalenceClasses(ILogicalOperator op, IOptimizationContext ctx) throws AlgebricksException {
FDsAndEquivClassesVisitor visitor = new FDsAndEquivClassesVisitor();
visitOperatorAndItsDescendants(op, visitor, ctx);
}
Aggregations