Class ColumnSchema

java.lang.Object
org.apache.nifi.sql.ColumnSchema

public class ColumnSchema extends Object
A schema that describes a single column in a NiFiTable
  • Field Details

    • name

      private final String name
    • columnType

      private final ColumnType columnType
    • nullable

      private final boolean nullable
  • Constructor Details

    • ColumnSchema

      public ColumnSchema(String name, Class<?> type, boolean nullable)

      Convenience method to create a schema for a column with a scalar value.

      This is equivalent to calling new ColumnSchema(name, new ScalarType(type), nullable);

      Parameters:
      name - the name of the column
      type - the type of the column
      nullable - whether or not the column supports null values
    • ColumnSchema

      public ColumnSchema(String name, ColumnType type, boolean nullable)
      Creates a column schema with the given name and type that is optionally nullable
      Parameters:
      name - the name of the column
      type - the type of the column
      nullable - whether or not the column supports null values
  • Method Details

    • getName

      public String getName()
    • isNullable

      public boolean isNullable()
    • toRelationalDataType

      org.apache.calcite.rel.type.RelDataType toRelationalDataType(org.apache.calcite.adapter.java.JavaTypeFactory typeFactory)
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object