@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ImmutableSegmentLoadInfo that = (ImmutableSegmentLoadInfo) o; if (!segment.equals(that.segment)) { return false; } return servers.equals(that.servers); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ImmutableWorkerInfo that = (ImmutableWorkerInfo) o; if (currCapacityUsed != that.currCapacityUsed) { return false; } if (!worker.equals(that.worker)) { return false; } if (!availabilityGroups.equals(that.availabilityGroups)) { return false; } if (!runningTasks.equals(that.runningTasks)) { return false; } if (!lastCompletedTaskTime.equals(that.lastCompletedTaskTime)) { return false; } return !(blacklistedUntil != null ? !blacklistedUntil.equals(that.blacklistedUntil) : that.blacklistedUntil != null); }
@Override public boolean equals(Object obj) { if (!(obj instanceof MultiJoinNode)) { return false; } MultiJoinNode other = (MultiJoinNode) obj; return this.sources.equals(other.sources) && ImmutableSet.copyOf(extractConjuncts(this.filter)).equals(ImmutableSet.copyOf(extractConjuncts(other.filter))) && this.outputSymbols.equals(other.outputSymbols); }
checkArgument(sortChannels.size() == sortOrder.size(), "Must have same number of sort channels as sort orders"); checkArgument(preSortedChannelPrefix <= sortChannels.size(), "Cannot have more pre-sorted channels than specified sorted channels"); checkArgument(preSortedChannelPrefix == 0 || ImmutableSet.copyOf(preGroupedChannels).equals(ImmutableSet.copyOf(partitionChannels)), "preSortedChannelPrefix can only be greater than zero if all partition channels are pre-grouped");
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof AnnotationInfo) { AnnotationInfo that = (AnnotationInfo) o; return (this.typeName.equals(that.typeName())) && (this.internalContainerOf.equals(that.internalContainerOf())); } return false; }
private static boolean outputsSameAsSource(ProjectNode node) { return ImmutableSet.copyOf(node.getOutputSymbols()).equals(ImmutableSet.copyOf(node.getSource().getOutputSymbols())); }
@JsonCreator public WindowNode( @JsonProperty("id") PlanNodeId id, @JsonProperty("source") PlanNode source, @JsonProperty("specification") Specification specification, @JsonProperty("windowFunctions") Map<Symbol, Function> windowFunctions, @JsonProperty("hashSymbol") Optional<Symbol> hashSymbol, @JsonProperty("prePartitionedInputs") Set<Symbol> prePartitionedInputs, @JsonProperty("preSortedOrderPrefix") int preSortedOrderPrefix) { super(id); requireNonNull(source, "source is null"); requireNonNull(specification, "specification is null"); requireNonNull(windowFunctions, "windowFunctions is null"); requireNonNull(hashSymbol, "hashSymbol is null"); checkArgument(specification.getPartitionBy().containsAll(prePartitionedInputs), "prePartitionedInputs must be contained in partitionBy"); Optional<OrderingScheme> orderingScheme = specification.getOrderingScheme(); checkArgument(preSortedOrderPrefix == 0 || (orderingScheme.isPresent() && preSortedOrderPrefix <= orderingScheme.get().getOrderBy().size()), "Cannot have sorted more symbols than those requested"); checkArgument(preSortedOrderPrefix == 0 || ImmutableSet.copyOf(prePartitionedInputs).equals(ImmutableSet.copyOf(specification.getPartitionBy())), "preSortedOrderPrefix can only be greater than zero if all partition symbols are pre-partitioned"); this.source = source; this.prePartitionedInputs = ImmutableSet.copyOf(prePartitionedInputs); this.specification = specification; this.windowFunctions = ImmutableMap.copyOf(windowFunctions); this.hashSymbol = hashSymbol; this.preSortedOrderPrefix = preSortedOrderPrefix; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof CanBeStaticAnalyzer.CanBeStaticResult) { CanBeStaticAnalyzer.CanBeStaticResult that = (CanBeStaticAnalyzer.CanBeStaticResult) o; return (this.canPossiblyBeStatic == that.canPossiblyBeStatic()) && (this.methodsReferenced.equals(that.methodsReferenced())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof ApiDiff) { ApiDiff that = (ApiDiff) o; return (this.unsupportedClasses.equals(that.unsupportedClasses())) && (this.unsupportedMembersByClass.equals(that.unsupportedMembersByClass())); } return false; }
checkArgument(sortChannels.size() == sortOrder.size(), "Must have same number of sort channels as sort orders"); checkArgument(preSortedChannelPrefix <= sortChannels.size(), "Cannot have more pre-sorted channels than specified sorted channels"); checkArgument(preSortedChannelPrefix == 0 || ImmutableSet.copyOf(preGroupedChannels).equals(ImmutableSet.copyOf(partitionChannels)), "preSortedChannelPrefix can only be greater than zero if all partition channels are pre-grouped");
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof StaticImports.StaticImportInfo) { StaticImports.StaticImportInfo that = (StaticImports.StaticImportInfo) o; return (this.importedName.equals(that.importedName())) && (this.canonicalName.equals(that.canonicalName())) && (this.simpleName.equals(that.simpleName())) && (this.members.equals(that.members())); } return false; }
private static boolean isIdentityProjection(ProjectNode project) { return ImmutableSet.copyOf(project.getOutputSymbols()).equals(ImmutableSet.copyOf(project.getSource().getOutputSymbols())); } }
if (ImmutableSet.copyOf(node.getPartitionBy()).equals(node.getPrePartitionedInputs()) && (!orderingScheme.isPresent() || node.getPreSortedOrderPrefix() == orderingScheme.get().getOrderBy().size())) { return properties;
if (jsonNode.isObject()) { final ImmutableSet<String> fieldNames = ImmutableSet.copyOf(jsonNode.fieldNames()); if (fieldNames.equals(EXPECTED_FIELD_NAMES)) {
if (!ImmutableSet.copyOf(msc.getUsedSegmentsForInterval(dataSource, rowInterval)).equals(usedSegmentsForRow)) { if (attempt < MAX_ATTEMPTS) { final long shortRandomSleep = 50 + (long) (ThreadLocalRandom.current().nextDouble() * 450);
@Override public MatchResult detailMatches(PlanNode node, StatsProvider stats, Session session, Metadata metadata, SymbolAliases symbolAliases) { checkState(shapeMatches(node), "Plan testing framework error: shapeMatches returned false in detailMatches in %s", this.getClass().getName()); MarkDistinctNode markDistinctNode = (MarkDistinctNode) node; if (!markDistinctNode.getHashSymbol().equals(hashSymbol.map(alias -> alias.toSymbol(symbolAliases)))) { return NO_MATCH; } if (!ImmutableSet.copyOf(markDistinctNode.getDistinctSymbols()) .equals(distinctSymbols.stream().map(alias -> alias.toSymbol(symbolAliases)).collect(toImmutableSet()))) { return NO_MATCH; } return match(markerSymbol.toString(), markDistinctNode.getMarkerSymbol().toSymbolReference()); }
BiPredicate<ImmutableSet<TypeWithDuplicates>, ImmutableSet<TypeWithDuplicates>> equivalence = (set1, set2) -> { if (!set1.equals(set2)) { return false;
.map(alias -> alias.toSymbol(symbolAliases)) .collect(toImmutableSet()) .equals(windowNode.getPrePartitionedInputs())) .orElse(true)) { return NO_MATCH;
if (!ImmutableSet.copyOf(plan.getOutputSymbols()).equals(ImmutableSet.copyOf(actual.getOutputSymbols()))) { fail(String.format( "%s: output schema of transformed and original plans are not equivalent\n" +
rightSource != node.getRight() || !filtersEquivalent || !ImmutableSet.copyOf(equiJoinClauses).equals(ImmutableSet.copyOf(node.getCriteria()))) { leftSource = new ProjectNode(idAllocator.getNextId(), leftSource, leftProjections.build()); rightSource = new ProjectNode(idAllocator.getNextId(), rightSource, rightProjections.build());