Skip to content

Commit 38f2640

Browse files
dataroaringclaude
andcommitted
Update all JSON type mappings to VARIANT
Change JSON type mappings to VARIANT across all migration docs: - PostgreSQL: json/jsonb → VARIANT - MySQL: JSON → VARIANT - Elasticsearch: object, flattened → VARIANT VARIANT type provides better flexible schema support for semi-structured data migration. Added links to VARIANT documentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8d6ba88 commit 38f2640

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/migration/elasticsearch-to-doris.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ This guide covers migrating data from Elasticsearch to Apache Doris. Doris can s
4949
| date | DATE or DATETIME | See [Date Handling](#handling-date-types) |
5050
| ip | STRING | |
5151
| nested | VARIANT | See [VARIANT type](../data-operate/import/complex-types/variant.md) for flexible schema |
52-
| object | JSON | |
53-
| flattened | JSON | Supported since Doris 3.1.4, 4.0.3 |
52+
| object | VARIANT | See [VARIANT type](../data-operate/import/complex-types/variant.md) |
53+
| flattened | VARIANT | Supported since Doris 3.1.4, 4.0.3 |
5454
| geo_point | STRING | Store as "lat,lon" string |
5555
| geo_shape | STRING | Store as GeoJSON string |
5656

docs/migration/mysql-to-doris.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This guide covers migrating data from MySQL to Apache Doris. MySQL is one of the
3939
| TEXT / MEDIUMTEXT / LONGTEXT | STRING | |
4040
| BINARY / VARBINARY | STRING | |
4141
| BLOB / MEDIUMBLOB / LONGBLOB | STRING | |
42-
| JSON | JSON | |
42+
| JSON | VARIANT | See [VARIANT type](../data-operate/import/complex-types/variant.md) |
4343
| ENUM | STRING | |
4444
| SET | STRING | |
4545
| BIT | BOOLEAN / BIGINT | BIT(1) maps to BOOLEAN |

docs/migration/postgresql-to-doris.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This guide covers migrating data from PostgreSQL to Apache Doris. You can choose
3737
| date | DATE | |
3838
| time | STRING | Doris does not support TIME type |
3939
| interval | STRING | |
40-
| json / jsonb | JSON or STRING | Use STRING for better query performance |
40+
| json / jsonb | VARIANT | See [VARIANT type](../data-operate/import/complex-types/variant.md) for flexible schema |
4141
| uuid | STRING | |
4242
| bytea | STRING | |
4343
| array | ARRAY | See [Handling Arrays](#handling-arrays) |
@@ -379,7 +379,7 @@ FROM pg_catalog.schema.pg_table;
379379

380380
### Handling JSON/JSONB
381381

382-
For complex JSON queries, map to Doris STRING and use JSON functions:
382+
PostgreSQL JSON/JSONB maps to Doris VARIANT type, which supports flexible schema and efficient JSON operations:
383383

384384
```sql
385385
-- Query JSON fields

i18n/zh-CN/docusaurus-plugin-content-docs/current/migration/elasticsearch-to-doris.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
| date | DATE 或 DATETIME | 参见[日期处理](#处理日期类型) |
5050
| ip | STRING | |
5151
| nested | VARIANT | 参见 [VARIANT 类型](../data-operate/import/complex-types/variant.md),支持灵活 Schema |
52-
| object | JSON | |
53-
| flattened | JSON | Doris 3.1.4、4.0.3 起支持 |
52+
| object | VARIANT | 参见 [VARIANT 类型](../data-operate/import/complex-types/variant.md) |
53+
| flattened | VARIANT | Doris 3.1.4、4.0.3 起支持 |
5454
| geo_point | STRING | 存储为 "lat,lon" 字符串 |
5555
| geo_shape | STRING | 存储为 GeoJSON 字符串 |
5656

i18n/zh-CN/docusaurus-plugin-content-docs/current/migration/mysql-to-doris.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
| TEXT / MEDIUMTEXT / LONGTEXT | STRING | |
4040
| BINARY / VARBINARY | STRING | |
4141
| BLOB / MEDIUMBLOB / LONGBLOB | STRING | |
42-
| JSON | JSON | |
42+
| JSON | VARIANT | 参见 [VARIANT 类型](../data-operate/import/complex-types/variant.md) |
4343
| ENUM | STRING | |
4444
| SET | STRING | |
4545
| BIT | BOOLEAN / BIGINT | BIT(1) 映射为 BOOLEAN |

i18n/zh-CN/docusaurus-plugin-content-docs/current/migration/postgresql-to-doris.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
| date | DATE | |
3838
| time | STRING | Doris 不支持 TIME 类型 |
3939
| interval | STRING | |
40-
| json / jsonb | JSON 或 STRING | 使用 STRING 可获得更好的查询性能 |
40+
| json / jsonb | VARIANT | 参见 [VARIANT 类型](../data-operate/import/complex-types/variant.md),支持灵活 Schema |
4141
| uuid | STRING | |
4242
| bytea | STRING | |
4343
| array | ARRAY | 参见[处理数组](#处理数组) |
@@ -367,7 +367,7 @@ FROM pg_catalog.schema.pg_table;
367367

368368
### 处理 JSON/JSONB
369369

370-
对于复杂的 JSON 查询,映射到 Doris STRING 并使用 JSON 函数
370+
PostgreSQL JSON/JSONB 映射到 Doris VARIANT 类型,支持灵活 Schema 和高效的 JSON 操作
371371

372372
```sql
373373
-- 查询 JSON 字段

0 commit comments

Comments
 (0)