|
5 | 5 |
|
6 | 6 | beta[] |
7 | 7 |
|
8 | | -Most of {es} <<mapping-types, data types>> are available in {es-sql}, as indicated below: |
| 8 | +Most of {es} <<mapping-types, data types>> are available in {es-sql}, as indicated below. |
| 9 | +As one can see, all of {es} <<mapping-types, data types>> are mapped to the data type with the same |
| 10 | +name in {es-sql}, with the exception of **date** data type which is mapped to **datetime** in {es-sql}: |
9 | 11 |
|
10 | | -[cols="^,^m,^"] |
| 12 | +[cols="^,^m,^,^"] |
11 | 13 |
|
12 | 14 | |=== |
13 | 15 | s|{es} type |
| 16 | +s|{es-sql} type |
14 | 17 | s|SQL type |
15 | 18 | s|SQL precision |
16 | 19 |
|
17 | | -3+h| Core types |
18 | | - |
19 | | -| <<null-value, `null`>> | null | 0 |
20 | | -| <<boolean, `boolean`>> | boolean | 1 |
21 | | -| <<number, `byte`>> | tinyint | 3 |
22 | | -| <<number, `short`>> | smallint | 5 |
23 | | -| <<number, `integer`>> | integer | 10 |
24 | | -| <<number, `long`>> | bigint | 19 |
25 | | -| <<number, `double`>> | double | 15 |
26 | | -| <<number, `float`>> | real | 7 |
27 | | -| <<number, `half_float`>> | float | 16 |
28 | | -| <<number, `scaled_float`>> | float | 19 |
29 | | -| <<keyword, `keyword`>> | varchar | based on <<ignore-above>> |
30 | | -| <<text, `text`>> | varchar | 2,147,483,647 |
31 | | -| <<binary, `binary`>> | varbinary | 2,147,483,647 |
32 | | -| <<date, `date`>> | timestamp | 24 |
33 | | -| <<ip, `ip`>> | varchar | 39 |
34 | | - |
35 | | -3+h| Complex types |
36 | | - |
37 | | -| <<object, `object`>> | struct | 0 |
38 | | -| <<nested, `nested`>> | struct | 0 |
39 | | - |
40 | | -3+h| Unsupported types |
41 | | - |
42 | | -| _types not mentioned above_ | unsupported | 0 |
| 20 | +4+h| Core types |
| 21 | + |
| 22 | +| <<null-value, `null`>> | null | NULL | 0 |
| 23 | +| <<boolean, `boolean`>> | boolean | BOOLEAN | 1 |
| 24 | +| <<number, `byte`>> | byte | TINYINT | 3 |
| 25 | +| <<number, `short`>> | short | SMALLINT | 5 |
| 26 | +| <<number, `integer`>> | integer | INTEGER | 10 |
| 27 | +| <<number, `long`>> | long | BIGINT | 19 |
| 28 | +| <<number, `double`>> | double | DOUBLE | 15 |
| 29 | +| <<number, `float`>> | float | REAL | 7 |
| 30 | +| <<number, `half_float`>> | half_float | FLOAT | 16 |
| 31 | +| <<number, `scaled_float`>> | scaled_float | FLOAT | 19 |
| 32 | +| <<keyword, `keyword`>> | keyword | VARCHAR | based on <<ignore-above>> |
| 33 | +| <<text, `text`>> | text | VARCHAR | 2,147,483,647 |
| 34 | +| <<binary, `binary`>> | binary | VARBINARY | 2,147,483,647 |
| 35 | +| <<date, `date`>> | datetime | TIMESTAMP | 24 |
| 36 | +| <<ip, `ip`>> | ip | VARCHAR | 39 |
| 37 | + |
| 38 | +4+h| Complex types |
| 39 | + |
| 40 | +| <<object, `object`>> | object | STRUCT | 0 |
| 41 | +| <<nested, `nested`>> | nested | STRUCT | 0 |
| 42 | + |
| 43 | +4+h| Unsupported types |
| 44 | + |
| 45 | +| _types not mentioned above_ | unsupported | OTHER | 0 |
43 | 46 |
|
44 | 47 | |=== |
45 | 48 |
|
|
0 commit comments