public RelationPlan(PlanNode root, Scope scope, List<Symbol> fieldMappings) { requireNonNull(root, "root is null"); requireNonNull(fieldMappings, "outputSymbols is null"); requireNonNull(scope, "scope is null"); int allFieldCount = getAllFieldCount(scope); checkArgument(allFieldCount == fieldMappings.size(), "Number of outputs (%s) doesn't match number of fields in scopes tree (%s)", fieldMappings.size(), allFieldCount); this.root = root; this.scope = scope; this.fieldMappings = ImmutableList.copyOf(fieldMappings); }