Class Column

    • Field Detail

      • name

        protected final String name
      • dataType

        protected final DataType dataType
      • comment

        @Nullable
        protected final String comment
    • Method Detail

      • metadata

        public static Column.MetadataColumn metadata​(String name,
                                                     DataType dataType,
                                                     @Nullable
                                                     String metadataKey,
                                                     boolean isVirtual)
        Creates a metadata column from metadata of the given column name or from metadata of the given key (if not null).

        Allows to specify whether the column is virtual or not.

      • withComment

        public abstract Column withComment​(@Nullable
                                           String comment)
        Add the comment to the column and return the new object.
      • isPhysical

        public abstract boolean isPhysical()
        Returns whether the given column is a physical column of a table; neither computed nor metadata.
      • isPersisted

        public abstract boolean isPersisted()
        Returns whether the given column is persisted in a sink operation.
      • getDataType

        public DataType getDataType()
        Returns the data type of this column.
      • getName

        public String getName()
        Returns the name of this column.
      • getComment

        public Optional<String> getComment()
        Returns the comment of this column.
      • asSummaryString

        public String asSummaryString()
        Returns a string that summarizes this column for printing to a console.
      • explainExtras

        public abstract Optional<String> explainExtras()
        Returns an explanation of specific column extras next to name and type.
      • copy

        public abstract Column copy​(DataType newType)
        Returns a copy of the column with a replaced DataType.
      • rename

        public abstract Column rename​(String newName)
        Returns a copy of the column with a replaced name.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object