diff --git a/docs/reference/sql/language/data-types.asciidoc b/docs/reference/sql/language/data-types.asciidoc index a4a407f175e17..60bdf0c5f66d3 100644 --- a/docs/reference/sql/language/data-types.asciidoc +++ b/docs/reference/sql/language/data-types.asciidoc @@ -5,41 +5,44 @@ beta[] -Most of {es} <> are available in {es-sql}, as indicated below: +Most of {es} <> are available in {es-sql}, as indicated below. +As one can see, all of {es} <> are mapped to the data type with the same +name in {es-sql}, with the exception of **date** data type which is mapped to **datetime** in {es-sql}: -[cols="^,^m,^"] +[cols="^,^m,^,^"] |=== s|{es} type +s|{es-sql} type s|SQL type s|SQL precision -3+h| Core types - -| <> | null | 0 -| <> | boolean | 1 -| <> | tinyint | 3 -| <> | smallint | 5 -| <> | integer | 10 -| <> | bigint | 19 -| <> | double | 15 -| <> | real | 7 -| <> | float | 16 -| <> | float | 19 -| <> | varchar | based on <> -| <> | varchar | 2,147,483,647 -| <> | varbinary | 2,147,483,647 -| <> | timestamp | 24 -| <> | varchar | 39 - -3+h| Complex types - -| <> | struct | 0 -| <> | struct | 0 - -3+h| Unsupported types - -| _types not mentioned above_ | unsupported | 0 +4+h| Core types + +| <> | null | NULL | 0 +| <> | boolean | BOOLEAN | 1 +| <> | byte | TINYINT | 3 +| <> | short | SMALLINT | 5 +| <> | integer | INTEGER | 10 +| <> | long | BIGINT | 19 +| <> | double | DOUBLE | 15 +| <> | float | REAL | 7 +| <> | half_float | FLOAT | 16 +| <> | scaled_float | FLOAT | 19 +| <> | keyword | VARCHAR | based on <> +| <> | text | VARCHAR | 2,147,483,647 +| <> | binary | VARBINARY | 2,147,483,647 +| <> | datetime | TIMESTAMP | 24 +| <> | ip | VARCHAR | 39 + +4+h| Complex types + +| <> | object | STRUCT | 0 +| <> | nested | STRUCT | 0 + +4+h| Unsupported types + +| _types not mentioned above_ | unsupported | OTHER | 0 |===