Apache Ignite SQL Documentation

The Apache Ignite SQL Developer Hub

Welcome to the Apache Ignite SQL developer hub. You'll find comprehensive guides and documentation to help you start working with Apache Ignite SQL as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Data Types

The page contains a list of SQL data types available in Apache Ignite such as string, numeric, and date/time types.

Every SQL type is mapped to a programming language or driver specific types that are supported by Ignite natively:

BOOLEAN

Possible values: TRUE and FALSE.

Mapped to:

  • Java/JDBC: java.lang.Boolean
  • .NET/C#: bool
  • C/C++: bool
  • ODBC: SQL_BIT

INT

Possible values: [-2147483648, 2147483647].

Mapped to:

  • Java/JDBC: java.lang.Integer
  • .NET/C#: int
  • C/C++: int32_t
  • ODBC: SQL_INTEGER

TINYINT

Possible values: [-128, 127].

Mapped to:

  • Java/JDBC: java.lang.Byte
  • .NET/C#: sbyte
  • C/C++: int8_t
  • ODBC: SQL_TINYINT

SMALLINT

Possible values: [-32768, 32767].

Mapped to:

  • Java/JDBC: java.lang.Short
  • .NET/C#: short
  • C/C++: int16_t
  • ODBC: SQL_SMALLINT

BIGINT

Possible values: [-9223372036854775808, 9223372036854775807].

Mapped to:

  • Java/JDBC: java.lang.Long
  • .NET/C#: long
  • C/C++: int64_t
  • ODBC: SQL_BIGINT

DECIMAL

Possible values: Data type with fixed precision and scale.

Mapped to:

  • Java/JDBC: java.math.BigDecimal
  • .NET/C#: decimal
  • C/C++: ignite::Decimal
  • ODBC: SQL_DECIMAL

DOUBLE

Possible values: A floating point number.

Mapped to:

  • Java/JDBC: java.lang.Double
  • .NET/C#: double
  • C/C++: double
  • ODBC: SQL_DOUBLE

REAL

Possible values: A single precision floating point number.

Mapped to:

  • Java/JDBC: java.lang.Float
  • .NET/C#: float
  • C/C++: float
  • ODBC: SQL_FLOAT

TIME

Possible values: The time data type. The format is hh:mm:ss.

Mapped to:

  • Java/JDBC: java.sql.Time
  • .NET/C#: N/A
  • C/C++: ignite::Time
  • ODBC: SQL_TYPE_TIME

DATE

Possible values: The date data type. The format is yyyy-MM-dd.

Mapped to:

  • Java/JDBC: java.sql.Date
  • .NET/C#: N/A
  • C/C++: ignite::Date
  • ODBC: SQL_TYPE_DATE

❗️

Use the TIMESTAMP type instead of DATE whenever possible. The DATE type is serialized/deserialized very inefficiently resulting in performance degradation.

TIMESTAMP

Possible values: The timestamp data type. The format is yyyy-MM-dd hh:mm:ss[.nnnnnnnnn].

Mapped to:

  • Java/JDBC: java.sql.Timestamp
  • .NET/C#: System.DateTime
  • C/C++: ignite::Timestamp
  • ODBC: SQL_TYPE_TIMESTAMP

VARCHAR

Possible values: A Unicode String.

Mapped to:

  • Java/JDBC: java.lang.String
  • .NET/C#: string
  • C/C++: std::string
  • ODBC: SQL_VARCHAR

CHAR

Possible values: A unicode String. This type is supported for compatibility with other databases and older applications.

Mapped to:

  • Java/JDBC: java.lang.String
  • .NET/C#: string
  • C/C++: std::string
  • ODBC: SQL_CHAR

UUID

Possible values: Universally unique identifier. This is a 128 bit value.

Mapped to:

  • Java/JDBC: java.util.UUID
  • .NET/C#: System.Guid
  • C/C++: ignite::Guid
  • ODBC: SQL_GUID

BINARY

Possible values: Represents a byte array.

Mapped to:

  • Java/JDBC: byte[]
  • .NET/C#: byte[]
  • C/C++: int8_t[]
  • ODBC: SQL_BINARY

GEOMETRY

Possible values: A spatial geometry type, based on the com.vividsolutions.jts library. Normally represented in a textual format using the WKT (well-known text) format.

Mapped to:

  • Java/JDBC: Types from com.vividsolutions.jts package.
  • .NET/C#: N/A
  • C/C++: N/A
  • ODBC: N/A

Updated less than a minute ago

Data Types


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.