Class PartitionAwareSourceTable

All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, NotificationQueue.Dependency, Deflatable<Table>, Table, LivenessManager, LivenessNode, LivenessReferent, LongSizedDataStructure, DynamicNode, DynamicTable, NotificationStepReceiver, NotificationStepSource, SystemicObject, Serializable
Direct Known Subclasses:
NestedPartitionedDiskBackedTable

public class PartitionAwareSourceTable extends SourceTable
A source table that can filter partitions before coalescing.
See Also:
  • Field Details

    • ALL_INTERNAL_PARTITIONS

      public static final Set<String> ALL_INTERNAL_PARTITIONS
  • Method Details

    • newInstance

      protected PartitionAwareSourceTable newInstance(TableDefinition tableDefinition, String description, SourceTableComponentFactory componentFactory, TableLocationProvider locationProvider, LiveTableRegistrar liveTableRegistrar, Set<String> internalPartitions, com.illumon.dataobjects.ColumnDefinition<String> partitioningColumnDefinition, SelectFilter... partitioningColumnFilters)
    • redefine

      protected final BaseTable redefine(TableDefinition newDefinition)
      Description copied from class: RedefinableTable
      Redefine this table with a subset of its current columns.
      Specified by:
      redefine in class RedefinableTable
      Parameters:
      newDefinition - A TableDefinition with a subset of this RedefinableTable's ColumnDefinitions.
      Returns:
    • redefine

      protected final Table redefine(TableDefinition newDefinitionExternal, TableDefinition newDefinitionInternal, SelectColumn[] viewColumns, Map<String,Set<String>> columnDependency)
      Description copied from class: RedefinableTable
      Redefine this table with a subset of its current columns, with a potentially-differing definition to present to external interfaces and one or more select columns to apply.
      Specified by:
      redefine in class RedefinableTable
      Parameters:
      newDefinitionExternal - A TableDefinition that represents the results of redefine(newDefinitionInternal).view(viewColumns).
      newDefinitionInternal - A TableDefinition with a subset of this RedefinableTable's ColumnDefinitions.
      viewColumns - A set of SelectColumns to apply in order to transform a table with newDefinitionInternal to a table with newDefinitionExternal.
      Returns:
    • filterLocations

      protected final Collection<TableLocation> filterLocations(@NotNull Collection<TableLocation> foundLocations)
      Description copied from class: SourceTable
      Hook to allow found locations to be filtered (e.g. according to a where-clause on the partitioning column of a PartitionAwareSourceTable). The default implementation returns its input unmolested.
      Overrides:
      filterLocations in class SourceTable
      Parameters:
      foundLocations - A Collection of TableLocations fetched from the table location provider, but not yet incorporated into the table
      Returns:
      A sub-Collection of the input
    • where

      public final Table where(SelectFilter... filters)
      Specified by:
      where in interface Table
      Overrides:
      where in class UncoalescedTable
    • selectDistinct

      public final Table selectDistinct(SelectColumn... columns)
      Specified by:
      selectDistinct in interface Table
      Overrides:
      selectDistinct in class UncoalescedTable
    • addInternalPartitionColumn

      public PartitionAwareSourceTable addInternalPartitionColumn(@NotNull String name)
      Add a column for the internal partition of the table. The column will be a String column with the name specified.
      Parameters:
      name - the name for the new internal partition column
      Returns:
      a new PartitionAwareSourceTable with the internal partition column added.