public PlanFragment( PlanFragmentId id, PlanNode root, IDictionary <string, string> symbols, PartitioningHandle partitioning, IEnumerable <PlanNodeId> partitionedSources, PartitioningScheme partitioningScheme, PipelineExecutionStrategy pipelineExecutionStrategy ) { this.Id = id ?? throw new ArgumentNullException("id"); this.Root = root ?? throw new ArgumentNullException("root"); this.Symbols = symbols ?? throw new ArgumentNullException("symbols"); this.Partitioning = partitioning ?? throw new ArgumentNullException("partitioning"); this.PartitionedSources = partitionedSources ?? throw new ArgumentNullException("partitionedSources"); this.PipelineExecutionStrategy = pipelineExecutionStrategy; this.PartitioningScheme = partitioningScheme ?? throw new ArgumentNullException("partitioningScheme"); ParameterCheck.Check(this.PartitionedSources.Distinct().Count() == this.PartitionedSources.Count(), "PartitionedSources contains duplicates."); this.Types = this.PartitioningScheme.OutputLayout.Select(x => x.ToString()); // Materialize this during construction this.PartionedSourceNodes = new HashSet <PlanNode>(FindSources(this.Root, this.PartitionedSources)); this.RemoteSourceNodes = FindRemoteSourceNodes(this.Root).ToList(); }
public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null || this.GetType() != obj.GetType()) { return(false); } PartitioningScheme That = (PartitioningScheme)obj; return(Object.Equals(this.Partitioning, That.Partitioning) && Object.Equals(this.OutputLayout, That.OutputLayout) && this.ReplicateNullsAndAny == That.ReplicateNullsAndAny && Object.Equals(this.BucketToPartition, That.BucketToPartition)); }