Skip to content

Refactor: separate SplittableTruncateSizedRestrictions #35021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,6 @@ public static <RestrictionT> TruncateResult of(RestrictionT restriction) {
return new AutoValue_RestrictionTracker_TruncateResult(restriction);
}

public abstract @Nullable RestrictionT getTruncatedRestriction();
public abstract RestrictionT getTruncatedRestriction();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.MoreObjects;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.dataflow.qual.Pure;
import org.joda.time.Instant;

/**
Expand Down Expand Up @@ -143,21 +144,27 @@ public static <T> WindowedValue<T> timestampedValueInGlobalWindow(
* Returns a new {@code WindowedValue} that is a copy of this one, but with a different value,
* which may have a new type {@code NewT}.
*/
@Pure
public abstract <NewT> WindowedValue<NewT> withValue(NewT value);

/** Returns the value of this {@code WindowedValue}. */
@Pure
public abstract T getValue();

/** Returns the timestamp of this {@code WindowedValue}. */
@Pure
public abstract Instant getTimestamp();

/** Returns the windows of this {@code WindowedValue}. */
@Pure
public abstract Collection<? extends BoundedWindow> getWindows();

/** Returns the pane of this {@code WindowedValue} in its window. */
@Pure
public abstract PaneInfo getPane();

/** Returns {@code true} if this WindowedValue has exactly one window. */
@Pure
public boolean isSingleWindowedValue() {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*/
public class KV<K, V> implements Serializable {
/** Returns a {@link KV} with the given key and value. */
@Pure
public static <K, V> KV<K, V> of(K key, V value) {
return new KV<>(key, value);
}
Expand Down
Loading
Loading