Class DataType

java.lang.Object
com.snowflake.snowpark_java.types.DataType
Direct Known Subclasses:
ArrayType, BinaryType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, GeographyType, GeometryType, IntegerType, LongType, MapType, ShortType, StringType, StructType, TimestampType, TimeType, VariantType

public abstract class DataType extends Object
Base of the Snowpark type hierarchy, as inline Java handlers see it.

Snowpark gives every SQL type its own class so a handler can write field.dataType() instanceof StringType. The stub keeps that shape rather than collapsing the types into one value class, because collapsing them is exactly what stops such a handler compiling.

  • Constructor Details

    • DataType

      public DataType()
  • Method Details

    • typeName

      public String typeName()
      The name Snowpark prints for a type: its CLASS name — LongType, StringType, DecimalType. Live-verified, including for DECIMAL, whose precision and scale appear only in toString() and never here.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object