All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.substrait.extension.AdvancedExtension Maven / Gradle / Ivy

Go to download

Create a well-defined, cross-language specification for data compute operations

There is a newer version: 0.46.1
Show newest version
package io.substrait.extension;

import io.substrait.relation.Extension;
import java.util.List;
import java.util.Optional;
import org.immutables.value.Value;

@Value.Immutable
public abstract class AdvancedExtension {

  public abstract List getOptimizations();

  public abstract Optional getEnhancement();

  public io.substrait.proto.AdvancedExtension toProto() {
    var builder = io.substrait.proto.AdvancedExtension.newBuilder();
    getEnhancement().ifPresent(e -> builder.setEnhancement(e.toProto()));
    getOptimizations().forEach(e -> builder.addOptimization(e.toProto()));
    return builder.build();
  }

  public static ImmutableAdvancedExtension.Builder builder() {
    return ImmutableAdvancedExtension.builder();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy