Class DatasourceData

java.lang.Object
se.kuseman.payloadbuilder.api.catalog.DatasourceData

public class DatasourceData extends Object
Data used when a catalog is asked for creation of a data source
  • Constructor Details

  • Method Details

    • getNodeId

      public int getNodeId()
      Return the node id for this datasource. The operator ID that this data source belongs to. Can be used in IStatementContext.getNodeData(Integer) to store custom data.
    • getSchema

      public Optional<Schema> getSchema()
      Return the planned schema for this data source. If the table was planned with a non asterisk schema then this schema should be used in the returned TupleVector's. Otherwise this value is Optional.empty() and the actual runtime schema should be provided in tuples.
    • getPredicates

      public List<IPredicate> getPredicates()
      Return predicates if any to push down to data source if supported by catalog
    • getSortItems

      public List<? extends ISortItem> getSortItems()
      Return sort items if any to push down to data soource if supported by catalog. NOTE! All or no sort items must be consumed
    • getProjection

      public List<String> getProjection()
      Return the projected columns needed for this data source. This is a optimization hint that can be used for catalogs that supports fetching of specific columns only like RDMBS:es. If empty then all column should be returned
    • getOptions

      public List<Option> getOptions()
      Return defined options for this data source
    • extractEqualsPredicate

      public IExpression extractEqualsPredicate(QualifiedName column)
      Convenience method for extracting a equals predicate for specific column.
         Ie.
      
         select *
         from table t
         where 'val' = t.col
      
       Calling this method with value 'col' would return in
       the literal string expression 'val'
       
       NOTE! Mutates the predicates list if column was found.