Beam Calcite SQL data types

Beam SQL supports standard SQL scalar data types as well as extensions including arrays, maps, and nested rows. This page documents supported Apache Calcite data types supported by Beam Calcite SQL.

In Java, these types are mapped to Java types large enough to hold the full range of values.

SQL TypeDescriptionJava class
TINYINT1 byte signed integer in range -128 to 127java.lang.Byte
SMALLINT2 byte signed integer in range -32768 to 32767java.lang.Short
INTEGER4 byte signed integer in range -2147483648 to 2147483647java.lang.Integer
BIGINT8 byte signed integer in range -9223372036854775808 to 9223372036854775807java.lang.Long
FLOAT4 byte floating pointjava.lang.Float
DOUBLE8 byte floating pointjava.lang.Double
DECIMALArbitrary precision decimal valuejava.math.BigDecimal
VARCHARArbitrary length stringjava.lang.String
TIMESTAMPMillisecond precision timestamporg.joda.ReadableInstant
ARRAYOrdered list of valuesjava.util.List
MAP<type, type>Finite unordered mapjava.util.Map
ROWNested roworg.apache.beam.sdk.values.Row