Packages

t

org.apache.spark.sql.connector.catalog

SupportsMetadataColumns

trait SupportsMetadataColumns extends Table

An interface for exposing data columns for a table that are not in the table schema. For example, a file source could expose a "file" column that contains the path of the file that contained each row.

The columns returned by #metadataColumns() may be passed as StructField in requested projections. Sources that implement this interface and column projection using SupportsPushDownRequiredColumns must accept metadata fields passed to SupportsPushDownRequiredColumns#pruneColumns(StructType).

If a table column and a metadata column have the same name, the conflict is resolved by either renaming or suppressing the metadata column. See canRenameConflictingMetadataColumns.

Annotations
@Evolving()
Source
SupportsMetadataColumns.java
Since

3.1.0

Linear Supertypes
Table, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SupportsMetadataColumns
  2. Table
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def capabilities(): Set[TableCapability]

    Returns the set of capabilities for this table.

    Returns the set of capabilities for this table.

    Definition Classes
    Table
  2. abstract def metadataColumns(): Array[MetadataColumn]

    Metadata columns that are supported by this Table.

    Metadata columns that are supported by this Table.

    The columns returned by this method may be passed as StructField in requested projections using SupportsPushDownRequiredColumns#pruneColumns(StructType).

    If a table column and a metadata column have the same name, the conflict is resolved by either renaming or suppressing the metadata column. See canRenameConflictingMetadataColumns.

    returns

    an array of MetadataColumn

  3. abstract def name(): String

    A name to identify this table.

    A name to identify this table. Implementations should provide a meaningful name, like the database and table name from catalog, or the location of files for this table.

    Definition Classes
    Table
  4. abstract def schema(): StructType

    Returns the schema of this table.

    Returns the schema of this table. If the table is not readable and doesn't have a schema, an empty schema can be returned here.

    Definition Classes
    Table
    Annotations
    @Deprecated
    Deprecated

    (Since version 3.4.0)

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def canRenameConflictingMetadataColumns(): Boolean

    Determines how this data source handles name conflicts between metadata and data columns.

    Determines how this data source handles name conflicts between metadata and data columns.

    If true, spark will automatically rename the metadata column to resolve the conflict. End users can reliably select metadata columns (renamed or not) with Dataset.metadataColumn, and internal code can use MetadataAttributeWithLogicalName to extract the logical name from a metadata attribute.

    If false, the data column will hide the metadata column. It is recommended that Table implementations which do not support renaming should reject data column names that conflict with metadata column names.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def columns(): Array[Column]

    Returns the columns of this table.

    Returns the columns of this table. If the table is not readable and doesn't have a schema, an empty array can be returned here.

    Definition Classes
    Table
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. def partitioning(): Array[Transform]

    Returns the physical partitioning of this table.

    Returns the physical partitioning of this table.

    Definition Classes
    Table
  17. def properties(): Map[String, String]

    Returns the string map of table properties.

    Returns the string map of table properties.

    Definition Classes
    Table
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Table

Inherited from AnyRef

Inherited from Any

Ungrouped