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

io.substrait.relation.AbstractRel 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.relation;

import io.substrait.type.Type;
import io.substrait.util.Util;
import java.util.function.Supplier;

public abstract class AbstractRel implements Rel {

  private Supplier recordType =
      Util.memoize(
          () -> {
            Type.Struct s = deriveRecordType();
            return getRemap().map(r -> r.remap(s)).orElse(s);
          });

  protected abstract Type.Struct deriveRecordType();

  @Override
  public final Type.Struct getRecordType() {
    return recordType.get();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy