Class SubstraitRelModel


  • public final class SubstraitRelModel
    extends Object
    Model class that encapsulates the different types of Substrait relations extracted from a query plan. This class provides a convenient way to access various relational operations (read, filter, project, sort, fetch) that may be present in a Substrait relation tree.

    Each relation type corresponds to a SQL operation:

    • ReadRel - Table scan (FROM clause)
    • FilterRel - Row filtering (WHERE clause)
    • ProjectRel - Column selection (SELECT clause)
    • SortRel - Ordering (ORDER BY clause)
    • FetchRel - Row limiting (LIMIT clause)
    • Constructor Detail

      • SubstraitRelModel

        public SubstraitRelModel​(io.substrait.proto.ReadRel readRel,
                                 io.substrait.proto.FilterRel filterRel,
                                 io.substrait.proto.ProjectRel projectRel,
                                 io.substrait.proto.SortRel sortRel,
                                 io.substrait.proto.FetchRel fetchRel)
    • Method Detail

      • getReadRel

        public io.substrait.proto.ReadRel getReadRel()
      • getFilterRel

        public io.substrait.proto.FilterRel getFilterRel()
      • getProjectRel

        public io.substrait.proto.ProjectRel getProjectRel()
      • getSortRel

        public io.substrait.proto.SortRel getSortRel()
      • getFetchRel

        public io.substrait.proto.FetchRel getFetchRel()
      • buildSubstraitRelModel

        public static SubstraitRelModel buildSubstraitRelModel​(io.substrait.proto.Rel rel)
        Factory method to build a SubstraitRelModel by extracting all relation types from a Substrait relation tree. This method traverses the relation tree and extracts each type of relation that may be present.
        Parameters:
        rel - The root Substrait relation to extract from
        Returns:
        A new SubstraitRelModel containing all extracted relations
        Throws:
        IllegalArgumentException - if rel is null