Exemple #1
0
        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();
        }
Exemple #2
0
 public Partitioning(PartitioningHandle handle, IEnumerable <ArgumentBinding> arguments)
 {
     this.Handle    = handle ?? throw new ArgumentNullException("handle");
     this.Arguments = arguments ?? throw new ArgumentNullException("arguments");
 }