Class LocalProperties
java.lang.Object
io.trino.sql.planner.optimizations.LocalProperties
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Set<T> extractLeadingConstants(List<? extends LocalProperty<T>> properties) static <T> List<LocalProperty<T>> grouped(Collection<T> columns) static <T> List<Optional<LocalProperty<T>>> match(List<LocalProperty<T>> actuals, List<LocalProperty<T>> desired) Attempt to match the desired properties to a sequence of known properties.static <T> List<LocalProperty<T>> none()static <T> List<Optional<LocalProperty<T>>> normalize(List<? extends LocalProperty<T>> localProperties) Normalizes the local properties by removing redundant symbols, but retains the original local property positionsstatic <T> List<LocalProperty<T>> normalizeAndPrune(List<? extends LocalProperty<T>> localProperties) Normalizes the local properties and potentially consolidates it to the smallest possible list NOTE: When normalized, each symbol will only appear oncestatic <T> List<LocalProperty<T>> stripLeadingConstants(List<? extends LocalProperty<T>> properties) static <X,Y> List <LocalProperty<Y>> translate(List<? extends LocalProperty<X>> properties, Function<X, Optional<Y>> translator) Translates the properties as much as possible, and truncates at the first non-translatable property
-
Method Details
-
none
-
grouped
-
stripLeadingConstants
public static <T> List<LocalProperty<T>> stripLeadingConstants(List<? extends LocalProperty<T>> properties) -
extractLeadingConstants
-
translate
public static <X,Y> List<LocalProperty<Y>> translate(List<? extends LocalProperty<X>> properties, Function<X, Optional<Y>> translator) Translates the properties as much as possible, and truncates at the first non-translatable property -
match
public static <T> List<Optional<LocalProperty<T>>> match(List<LocalProperty<T>> actuals, List<LocalProperty<T>> desired) Attempt to match the desired properties to a sequence of known properties.Returns a list of the same length as the original. Entries are: - Optional.empty(): the property was satisfied completely - non-empty: the (simplified) property that was not satisfied
-
normalizeAndPrune
public static <T> List<LocalProperty<T>> normalizeAndPrune(List<? extends LocalProperty<T>> localProperties) Normalizes the local properties and potentially consolidates it to the smallest possible list NOTE: When normalized, each symbol will only appear once -
normalize
public static <T> List<Optional<LocalProperty<T>>> normalize(List<? extends LocalProperty<T>> localProperties) Normalizes the local properties by removing redundant symbols, but retains the original local property positions
-