Interface BuiltInMetadata.ColumnUniqueness

All Superinterfaces:
Enclosing class:

public static interface BuiltInMetadata.ColumnUniqueness extends Metadata
Metadata about whether a set of columns uniquely identifies a row.
  • Field Details

  • Method Details

    • areColumnsUnique

      Boolean areColumnsUnique(ImmutableBitSet columns, boolean ignoreNulls)
      Determines whether a specified set of columns from a specified relational expression are unique.

      For example, if the relational expression is a TableScan to T(A, B, C, D) whose key is (A, B), then:

      • areColumnsUnique([0, 1]) yields true,
      • areColumnsUnique([0]) yields false,
      • areColumnsUnique([0, 2]) yields false.

      Nulls can be ignored if the relational expression has filtered out null values.

      columns - column mask representing the subset of columns for which uniqueness will be determined
      ignoreNulls - if true, ignore null values when determining column uniqueness
      whether the columns are unique, or null if not enough information is available to make that determination