Doris Data Types (Basic Types, Complex Data Types)

Basic Data Types

Integer Types

  • INT: Integer type, used to store integer values, typically ranging from -2^31 to 2^31-1.
  • BIGINT: Big integer type, used to store very large integer values, typically ranging from -2^63 to 2^63-1.

Decimal Types

  • FLOAT: Floating-point type, used to store decimal values with a precision of approximately 6-9 digits.
  • DOUBLE: Double-precision floating-point type, used to store longer decimal values with a precision of approximately 15-16 digits.
  • DECIMAL: Fixed-point decimal type, used to store decimal values with a fixed resolution.

Character Types

  • VARCHAR: Variable-length character type, used to store string values with dynamically adjustable length.
  • CHAR: Fixed-length character type, used to store string values of a fixed length.

Complex Data Types

Numeric Data Types

  • Numeric: Used to store numeric types, such as INT, BIGINT, etc.
  • Interval: Represents a time interval, used to store the difference between calendar dates.
  • Timestamp: Represents a specific point in time or a time range, used to store record creation or modification times.

Character Data Types

  • Binary: Binary numeric, used to store binary data, such as images, files, etc.
  • Varbinary: Variable-length binary numeric, used to store variable-length binary data.
  • Text: Text value, used to store string data.

Date Types

  • DATE: Represents a specific date.
  • TIME: Represents a specific time.
  • DATETIME: Represents a specific date and time.
  • TIMESTAMP: Represents a specific point in time or a time range.

Other

  • JSON: Used to store data in JSON format.
  • XML: Used to store data in XML format.