This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 06ec55d2268 remove explode_variant_array since it's performance not
good at present (#2295)
06ec55d2268 is described below
commit 06ec55d2268b433eac5627ded1abf483ff82dd1b
Author: lihangyu <[email protected]>
AuthorDate: Thu Apr 17 14:16:28 2025 +0800
remove explode_variant_array since it's performance not good at present
(#2295)
I will optimize it when sparse feature and schema template ready
## Versions
- [x] dev
- [x] 3.0
- [x] 2.1
- [x] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
.../sql-data-types/semi-structured/VARIANT.md | 2 +-
.../table-functions/explode-variant-array.md | 110 --------------------
.../sql-data-types/semi-structured/VARIANT.md | 15 +--
.../table-functions/explode-variant-array.md | 111 ---------------------
.../admin-manual/data-admin/ccr/feature.md | 1 -
.../sql-data-types/semi-structured/VARIANT.md | 15 +--
.../table-functions/explode-variant-array.md | 111 ---------------------
.../sql-data-types/semi-structured/VARIANT.md | 2 +-
.../table-functions/explode-variant-array.md | 111 ---------------------
sidebars.json | 1 -
.../admin-manual/data-admin/ccr/feature.md | 1 -
.../sql-data-types/semi-structured/VARIANT.md | 15 +--
.../table-functions/explode-variant-array.md | 110 --------------------
.../sql-data-types/semi-structured/VARIANT.md | 15 +--
.../table-functions/explode-variant-array.md | 110 --------------------
versioned_sidebars/version-2.1-sidebars.json | 1 -
versioned_sidebars/version-3.0-sidebars.json | 1 -
17 files changed, 6 insertions(+), 726 deletions(-)
diff --git
a/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index edcaedb91ca..6292966c3d8 100644
--- a/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++ b/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -344,7 +344,7 @@ mysql> SELECT
"nested" : [{"field1" : 123, "field11" : "123"}, {"field2" : 456, "field22"
: "456"}]
}
```
-In the JSON example above, the array nested contains objects (or nested data
types). It’s important to note that only one level of array expansion is
currently supported. Here is an example:
+In the JSON example above, the array nested contains objects (or nested data
types). It’s important to note that **only one level of array expansion is
currently supported, and the array must be a subfield of an object**. Here is
an example:
``` sql
-- Note: Set variant_enable_flatten_nested to true
-- This setting enables nested array expansion, allowing array<object>
elements to be stored in columnar format.
diff --git
a/docs/sql-manual/sql-functions/table-functions/explode-variant-array.md
b/docs/sql-manual/sql-functions/table-functions/explode-variant-array.md
deleted file mode 100644
index 73d74dd8867..00000000000
--- a/docs/sql-manual/sql-functions/table-functions/explode-variant-array.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-{
-"title": "EXPLODE_VARIANT_ARRAY",
-"language": "en"
-}
----
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-## Description
-
-The `explode_variant_array` table function accepts a variant type, where each
element is a JSON object, and expands each JSON object in the array into
multiple rows, with each row containing one JSON object. It is used in
conjunction with LATERAL VIEW.
-
-## Syntax
-```sql
-EXPLODE_VARIANT_ARRAY(<variant>)
-```
-
-## Return Value
-
-| Parameter | Description |
-| -- | -- |
-| `<variant>` | variant type |
-
-## Parameters
-
-Expands the JSON array, creating a row for each element, returning a JSON
object column.
-
-## Examples
-
-```sql
-CREATE TABLE `simple_nested_test` (
- `k` bigint NULL,
- `v` variant NULL
-) ENGINE=OLAP
-DUPLICATE KEY(`k`)
-DISTRIBUTED BY HASH(`k`) BUCKETS 8
-PROPERTIES (
-"file_cache_ttl_seconds" = "0",
-"is_being_synced" = "false",
-"storage_medium" = "hdd",
-"storage_format" = "V2",
-"inverted_index_storage_format" = "V2",
-"light_schema_change" = "true",
-"disable_auto_compaction" = "false",
-"variant_enable_flatten_nested" = "true",
-"enable_single_replica_compaction" = "false",
-"group_commit_interval_ms" = "10000",
-"group_commit_data_bytes" = "134217728"
-);
-```
-
-```sql
-insert into simple_nested_test values(1, '{
- "eventId": 1,
- "firstName": "Name1",
- "lastName": "Eric",
- "body": {
- "phoneNumbers": [
- {
- "number": "1111111111",
- "type": "GSM",
- "callLimit": 5
- },
- {
- "number": "222222222",
- "type": "HOME",
- "callLimit": 3
- },
- {
- "number": "33333333",
- "callLimit": 2,
- "type": "WORK"
- }
- ]
- }
-}');
-```
-
-```sql
-select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-```
-
-```text
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index cb0ff571dac..d214f7bdceb 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -348,7 +348,7 @@ mysql> SELECT
"nested" : [{"field1" : 123, "field11" : "123"}, {"field2" : 456, "field22"
: "456"}]
}
```
-在上面的 JSON 中,数组 nested 包含的对象(object)被称为嵌套数组类型。需要注意的是,目前仅支持一层数组的展开。以下是一个示例:
+在上面的 JSON 中,数组 nested 包含的对象(object)被称为嵌套数组类型。需要注意的是,**目前仅支持一层数组的展开,且需要在是
object 的子 field** 。以下是一个示例:
``` sql
-- 注意:设置 variant_enable_flatten_nested 为 true
-- 这样可以展开嵌套数组,将数组中的元素以列式存储
@@ -418,19 +418,6 @@ mysql> desc simple_nested_test;
+-------------------------------+----------------+------+-------+---------+-------+
8 rows in set (0.00 sec)
--- 使用 lateral view (explode_variant_array) 来展开数组,并查询符合条件的电话号码及事件 ID
-mysql> select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-2 rows in set (0.02 sec)
-```
-
### 使用限制和最佳实践
**VARIANT 类型的使用有以下限制:**
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/table-functions/explode-variant-array.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/table-functions/explode-variant-array.md
deleted file mode 100644
index cf113ec3b6c..00000000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/table-functions/explode-variant-array.md
+++ /dev/null
@@ -1,111 +0,0 @@
----
-{
-"title": "EXPLODE_VARIANT_ARRAY",
-"language": "zh-CN"
-}
----
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-## 描述
-
-`explode_variant_array` 表函数,接受一个 variant 类型,其中每个元素是 JSON 对象类型,将该 json 数组中的每个
json 对象展开为多行,每行包含一个 JSON 对象。配合 LATERAL VIEW 使用。
-
-## 语法
-
-```sql
-EXPLODE_VARIANT_ARRAY(<variant>)
-```
-
-## 参数
-
-| 参数 | 说明 |
-| -- | -- |
-| `<variant>` | variant 类型 |
-
-## 返回值
-
-展开 JSON 数组,每个元素生成一行,返回 JSON 对象列。
-
-## 举例
-
-```sql
-CREATE TABLE `simple_nested_test` (
- `k` bigint NULL,
- `v` variant NULL
-) ENGINE=OLAP
-DUPLICATE KEY(`k`)
-DISTRIBUTED BY HASH(`k`) BUCKETS 8
-PROPERTIES (
-"file_cache_ttl_seconds" = "0",
-"is_being_synced" = "false",
-"storage_medium" = "hdd",
-"storage_format" = "V2",
-"inverted_index_storage_format" = "V2",
-"light_schema_change" = "true",
-"disable_auto_compaction" = "false",
-"variant_enable_flatten_nested" = "true",
-"enable_single_replica_compaction" = "false",
-"group_commit_interval_ms" = "10000",
-"group_commit_data_bytes" = "134217728"
-);
-```
-
-```sql
-insert into simple_nested_test values(1, '{
- "eventId": 1,
- "firstName": "Name1",
- "lastName": "Eric",
- "body": {
- "phoneNumbers": [
- {
- "number": "1111111111",
- "type": "GSM",
- "callLimit": 5
- },
- {
- "number": "222222222",
- "type": "HOME",
- "callLimit": 3
- },
- {
- "number": "33333333",
- "callLimit": 2,
- "type": "WORK"
- }
- ]
- }
-}');
-```
-
-```sql
-select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-```
-
-```text
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/admin-manual/data-admin/ccr/feature.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/admin-manual/data-admin/ccr/feature.md
index f97ae9e1388..c189a78ae40 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/admin-manual/data-admin/ccr/feature.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/admin-manual/data-admin/ccr/feature.md
@@ -81,7 +81,6 @@ CCR 任务不同步修改库属性操作。
| compaction_policy | 支持 | - | SQL
| |
| time_series_compaction 系列 | 支持 | - | SQL
| |
| binlog 系列 | 支持 | - | SQL
| |
-| variant_enable_flatten_nested | 支持 | - | SQL
| |
| skip_write_index_on_load | 支持 | - | SQL
| |
| row_strore 系列 | 支持 | - | SQL
| |
| seq 列 | 支持 | - | SQL
| |
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index cb0ff571dac..aa783dab2b9 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -348,7 +348,7 @@ mysql> SELECT
"nested" : [{"field1" : 123, "field11" : "123"}, {"field2" : 456, "field22"
: "456"}]
}
```
-在上面的 JSON 中,数组 nested 包含的对象(object)被称为嵌套数组类型。需要注意的是,目前仅支持一层数组的展开。以下是一个示例:
+在上面的 JSON 中,数组 nested
包含的对象(object)被称为嵌套数组类型。需要注意的是,目前仅支持一层数组的展开,且需要在是object的子field。以下是一个示例:
``` sql
-- 注意:设置 variant_enable_flatten_nested 为 true
-- 这样可以展开嵌套数组,将数组中的元素以列式存储
@@ -418,19 +418,6 @@ mysql> desc simple_nested_test;
+-------------------------------+----------------+------+-------+---------+-------+
8 rows in set (0.00 sec)
--- 使用 lateral view (explode_variant_array) 来展开数组,并查询符合条件的电话号码及事件 ID
-mysql> select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-2 rows in set (0.02 sec)
-```
-
### 使用限制和最佳实践
**VARIANT 类型的使用有以下限制:**
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/table-functions/explode-variant-array.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/table-functions/explode-variant-array.md
deleted file mode 100644
index cf113ec3b6c..00000000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/table-functions/explode-variant-array.md
+++ /dev/null
@@ -1,111 +0,0 @@
----
-{
-"title": "EXPLODE_VARIANT_ARRAY",
-"language": "zh-CN"
-}
----
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-## 描述
-
-`explode_variant_array` 表函数,接受一个 variant 类型,其中每个元素是 JSON 对象类型,将该 json 数组中的每个
json 对象展开为多行,每行包含一个 JSON 对象。配合 LATERAL VIEW 使用。
-
-## 语法
-
-```sql
-EXPLODE_VARIANT_ARRAY(<variant>)
-```
-
-## 参数
-
-| 参数 | 说明 |
-| -- | -- |
-| `<variant>` | variant 类型 |
-
-## 返回值
-
-展开 JSON 数组,每个元素生成一行,返回 JSON 对象列。
-
-## 举例
-
-```sql
-CREATE TABLE `simple_nested_test` (
- `k` bigint NULL,
- `v` variant NULL
-) ENGINE=OLAP
-DUPLICATE KEY(`k`)
-DISTRIBUTED BY HASH(`k`) BUCKETS 8
-PROPERTIES (
-"file_cache_ttl_seconds" = "0",
-"is_being_synced" = "false",
-"storage_medium" = "hdd",
-"storage_format" = "V2",
-"inverted_index_storage_format" = "V2",
-"light_schema_change" = "true",
-"disable_auto_compaction" = "false",
-"variant_enable_flatten_nested" = "true",
-"enable_single_replica_compaction" = "false",
-"group_commit_interval_ms" = "10000",
-"group_commit_data_bytes" = "134217728"
-);
-```
-
-```sql
-insert into simple_nested_test values(1, '{
- "eventId": 1,
- "firstName": "Name1",
- "lastName": "Eric",
- "body": {
- "phoneNumbers": [
- {
- "number": "1111111111",
- "type": "GSM",
- "callLimit": 5
- },
- {
- "number": "222222222",
- "type": "HOME",
- "callLimit": 3
- },
- {
- "number": "33333333",
- "callLimit": 2,
- "type": "WORK"
- }
- ]
- }
-}');
-```
-
-```sql
-select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-```
-
-```text
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index cb0ff571dac..b373eabe0ae 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -348,7 +348,7 @@ mysql> SELECT
"nested" : [{"field1" : 123, "field11" : "123"}, {"field2" : 456, "field22"
: "456"}]
}
```
-在上面的 JSON 中,数组 nested 包含的对象(object)被称为嵌套数组类型。需要注意的是,目前仅支持一层数组的展开。以下是一个示例:
+在上面的 JSON 中,数组 nested
包含的对象(object)被称为嵌套数组类型。需要注意的是,目前仅支持一层数组的展开,且需要在是object的子field。以下是一个示例:
``` sql
-- 注意:设置 variant_enable_flatten_nested 为 true
-- 这样可以展开嵌套数组,将数组中的元素以列式存储
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/table-functions/explode-variant-array.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/table-functions/explode-variant-array.md
deleted file mode 100644
index cf113ec3b6c..00000000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/table-functions/explode-variant-array.md
+++ /dev/null
@@ -1,111 +0,0 @@
----
-{
-"title": "EXPLODE_VARIANT_ARRAY",
-"language": "zh-CN"
-}
----
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-## 描述
-
-`explode_variant_array` 表函数,接受一个 variant 类型,其中每个元素是 JSON 对象类型,将该 json 数组中的每个
json 对象展开为多行,每行包含一个 JSON 对象。配合 LATERAL VIEW 使用。
-
-## 语法
-
-```sql
-EXPLODE_VARIANT_ARRAY(<variant>)
-```
-
-## 参数
-
-| 参数 | 说明 |
-| -- | -- |
-| `<variant>` | variant 类型 |
-
-## 返回值
-
-展开 JSON 数组,每个元素生成一行,返回 JSON 对象列。
-
-## 举例
-
-```sql
-CREATE TABLE `simple_nested_test` (
- `k` bigint NULL,
- `v` variant NULL
-) ENGINE=OLAP
-DUPLICATE KEY(`k`)
-DISTRIBUTED BY HASH(`k`) BUCKETS 8
-PROPERTIES (
-"file_cache_ttl_seconds" = "0",
-"is_being_synced" = "false",
-"storage_medium" = "hdd",
-"storage_format" = "V2",
-"inverted_index_storage_format" = "V2",
-"light_schema_change" = "true",
-"disable_auto_compaction" = "false",
-"variant_enable_flatten_nested" = "true",
-"enable_single_replica_compaction" = "false",
-"group_commit_interval_ms" = "10000",
-"group_commit_data_bytes" = "134217728"
-);
-```
-
-```sql
-insert into simple_nested_test values(1, '{
- "eventId": 1,
- "firstName": "Name1",
- "lastName": "Eric",
- "body": {
- "phoneNumbers": [
- {
- "number": "1111111111",
- "type": "GSM",
- "callLimit": 5
- },
- {
- "number": "222222222",
- "type": "HOME",
- "callLimit": 3
- },
- {
- "number": "33333333",
- "callLimit": 2,
- "type": "WORK"
- }
- ]
- }
-}');
-```
-
-```sql
-select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-```
-
-```text
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-```
\ No newline at end of file
diff --git a/sidebars.json b/sidebars.json
index 4bfaa9a88c7..1feefe8726d 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -1596,7 +1596,6 @@
"sql-manual/sql-functions/table-functions/explode-json-array-double",
"sql-manual/sql-functions/table-functions/explode-json-array-string",
"sql-manual/sql-functions/table-functions/explode-json-array-json",
-
"sql-manual/sql-functions/table-functions/explode-variant-array",
"sql-manual/sql-functions/table-functions/explode",
"sql-manual/sql-functions/table-functions/posexplode",
"sql-manual/sql-functions/table-functions/explode-map",
diff --git a/versioned_docs/version-2.1/admin-manual/data-admin/ccr/feature.md
b/versioned_docs/version-2.1/admin-manual/data-admin/ccr/feature.md
index 5abf45f1417..9e7bba7c8f1 100644
--- a/versioned_docs/version-2.1/admin-manual/data-admin/ccr/feature.md
+++ b/versioned_docs/version-2.1/admin-manual/data-admin/ccr/feature.md
@@ -81,7 +81,6 @@ Renaming is not supported for upstream and downstream; if
done, it may cause vie
| compaction_policy | Supported | - |
SQL | |
| time_series_compaction series | Supported | - |
SQL | |
| binlog series | Supported | - |
SQL | |
-| variant_enable_flatten_nested | Supported | - |
SQL | |
| skip_write_index_on_load | Supported | - |
SQL | |
| row_store series | Supported | - |
SQL | |
| seq column | Supported | - |
SQL | |
diff --git
a/versioned_docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/versioned_docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index edcaedb91ca..c818998a0a3 100644
---
a/versioned_docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/versioned_docs/version-2.1/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -344,7 +344,7 @@ mysql> SELECT
"nested" : [{"field1" : 123, "field11" : "123"}, {"field2" : 456, "field22"
: "456"}]
}
```
-In the JSON example above, the array nested contains objects (or nested data
types). It’s important to note that only one level of array expansion is
currently supported. Here is an example:
+In the JSON example above, the array nested contains objects (or nested data
types). It’s important to note that **only one level of array expansion is
currently supported, and the array must be a subfield of an object**. Here is
an example:
``` sql
-- Note: Set variant_enable_flatten_nested to true
-- This setting enables nested array expansion, allowing array<object>
elements to be stored in columnar format.
@@ -414,19 +414,6 @@ mysql> desc simple_nested_test;
+-------------------------------+----------------+------+-------+---------+-------+
8 rows in set (0.00 sec)
--- Use lateral view (explode_variant_array) to expand arrays and query phone
numbers and event IDs that meet specific criteria
-mysql> select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-2 rows in set (0.02 sec)
-```
-
### Usage Restrictions and Best Practices
**There are several limitations when using the VARIANT type:**
diff --git
a/versioned_docs/version-2.1/sql-manual/sql-functions/table-functions/explode-variant-array.md
b/versioned_docs/version-2.1/sql-manual/sql-functions/table-functions/explode-variant-array.md
deleted file mode 100644
index 73d74dd8867..00000000000
---
a/versioned_docs/version-2.1/sql-manual/sql-functions/table-functions/explode-variant-array.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-{
-"title": "EXPLODE_VARIANT_ARRAY",
-"language": "en"
-}
----
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-## Description
-
-The `explode_variant_array` table function accepts a variant type, where each
element is a JSON object, and expands each JSON object in the array into
multiple rows, with each row containing one JSON object. It is used in
conjunction with LATERAL VIEW.
-
-## Syntax
-```sql
-EXPLODE_VARIANT_ARRAY(<variant>)
-```
-
-## Return Value
-
-| Parameter | Description |
-| -- | -- |
-| `<variant>` | variant type |
-
-## Parameters
-
-Expands the JSON array, creating a row for each element, returning a JSON
object column.
-
-## Examples
-
-```sql
-CREATE TABLE `simple_nested_test` (
- `k` bigint NULL,
- `v` variant NULL
-) ENGINE=OLAP
-DUPLICATE KEY(`k`)
-DISTRIBUTED BY HASH(`k`) BUCKETS 8
-PROPERTIES (
-"file_cache_ttl_seconds" = "0",
-"is_being_synced" = "false",
-"storage_medium" = "hdd",
-"storage_format" = "V2",
-"inverted_index_storage_format" = "V2",
-"light_schema_change" = "true",
-"disable_auto_compaction" = "false",
-"variant_enable_flatten_nested" = "true",
-"enable_single_replica_compaction" = "false",
-"group_commit_interval_ms" = "10000",
-"group_commit_data_bytes" = "134217728"
-);
-```
-
-```sql
-insert into simple_nested_test values(1, '{
- "eventId": 1,
- "firstName": "Name1",
- "lastName": "Eric",
- "body": {
- "phoneNumbers": [
- {
- "number": "1111111111",
- "type": "GSM",
- "callLimit": 5
- },
- {
- "number": "222222222",
- "type": "HOME",
- "callLimit": 3
- },
- {
- "number": "33333333",
- "callLimit": 2,
- "type": "WORK"
- }
- ]
- }
-}');
-```
-
-```sql
-select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-```
-
-```text
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-```
\ No newline at end of file
diff --git
a/versioned_docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/versioned_docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index edcaedb91ca..c818998a0a3 100644
---
a/versioned_docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/versioned_docs/version-3.0/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -344,7 +344,7 @@ mysql> SELECT
"nested" : [{"field1" : 123, "field11" : "123"}, {"field2" : 456, "field22"
: "456"}]
}
```
-In the JSON example above, the array nested contains objects (or nested data
types). It’s important to note that only one level of array expansion is
currently supported. Here is an example:
+In the JSON example above, the array nested contains objects (or nested data
types). It’s important to note that **only one level of array expansion is
currently supported, and the array must be a subfield of an object**. Here is
an example:
``` sql
-- Note: Set variant_enable_flatten_nested to true
-- This setting enables nested array expansion, allowing array<object>
elements to be stored in columnar format.
@@ -414,19 +414,6 @@ mysql> desc simple_nested_test;
+-------------------------------+----------------+------+-------+---------+-------+
8 rows in set (0.00 sec)
--- Use lateral view (explode_variant_array) to expand arrays and query phone
numbers and event IDs that meet specific criteria
-mysql> select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-2 rows in set (0.02 sec)
-```
-
### Usage Restrictions and Best Practices
**There are several limitations when using the VARIANT type:**
diff --git
a/versioned_docs/version-3.0/sql-manual/sql-functions/table-functions/explode-variant-array.md
b/versioned_docs/version-3.0/sql-manual/sql-functions/table-functions/explode-variant-array.md
deleted file mode 100644
index 73d74dd8867..00000000000
---
a/versioned_docs/version-3.0/sql-manual/sql-functions/table-functions/explode-variant-array.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-{
-"title": "EXPLODE_VARIANT_ARRAY",
-"language": "en"
-}
----
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-## Description
-
-The `explode_variant_array` table function accepts a variant type, where each
element is a JSON object, and expands each JSON object in the array into
multiple rows, with each row containing one JSON object. It is used in
conjunction with LATERAL VIEW.
-
-## Syntax
-```sql
-EXPLODE_VARIANT_ARRAY(<variant>)
-```
-
-## Return Value
-
-| Parameter | Description |
-| -- | -- |
-| `<variant>` | variant type |
-
-## Parameters
-
-Expands the JSON array, creating a row for each element, returning a JSON
object column.
-
-## Examples
-
-```sql
-CREATE TABLE `simple_nested_test` (
- `k` bigint NULL,
- `v` variant NULL
-) ENGINE=OLAP
-DUPLICATE KEY(`k`)
-DISTRIBUTED BY HASH(`k`) BUCKETS 8
-PROPERTIES (
-"file_cache_ttl_seconds" = "0",
-"is_being_synced" = "false",
-"storage_medium" = "hdd",
-"storage_format" = "V2",
-"inverted_index_storage_format" = "V2",
-"light_schema_change" = "true",
-"disable_auto_compaction" = "false",
-"variant_enable_flatten_nested" = "true",
-"enable_single_replica_compaction" = "false",
-"group_commit_interval_ms" = "10000",
-"group_commit_data_bytes" = "134217728"
-);
-```
-
-```sql
-insert into simple_nested_test values(1, '{
- "eventId": 1,
- "firstName": "Name1",
- "lastName": "Eric",
- "body": {
- "phoneNumbers": [
- {
- "number": "1111111111",
- "type": "GSM",
- "callLimit": 5
- },
- {
- "number": "222222222",
- "type": "HOME",
- "callLimit": 3
- },
- {
- "number": "33333333",
- "callLimit": 2,
- "type": "WORK"
- }
- ]
- }
-}');
-```
-
-```sql
-select v['eventId'], phone_numbers
- from simple_nested_test lateral view
explode_variant_array(v['body']['phoneNumbers']) tmp1 as phone_numbers
- where phone_numbers['type'] = 'GSM' OR phone_numbers['type'] = 'HOME' and
phone_numbers['callLimit'] > 2;
-```
-
-```text
-+--------------------------+----------------------------------------------------+
-| element_at(v, 'eventId') | phone_numbers
|
-+--------------------------+----------------------------------------------------+
-| 1 |
{"callLimit":5,"number":"1111111111","type":"GSM"} |
-| 1 |
{"callLimit":3,"number":"222222222","type":"HOME"} |
-+--------------------------+----------------------------------------------------+
-```
\ No newline at end of file
diff --git a/versioned_sidebars/version-2.1-sidebars.json
b/versioned_sidebars/version-2.1-sidebars.json
index e87998bf9f4..2a7836d0d65 100644
--- a/versioned_sidebars/version-2.1-sidebars.json
+++ b/versioned_sidebars/version-2.1-sidebars.json
@@ -1574,7 +1574,6 @@
"sql-manual/sql-functions/table-functions/explode-json-array-double",
"sql-manual/sql-functions/table-functions/explode-json-array-string",
"sql-manual/sql-functions/table-functions/explode-json-array-json",
-
"sql-manual/sql-functions/table-functions/explode-variant-array",
"sql-manual/sql-functions/table-functions/explode",
"sql-manual/sql-functions/table-functions/explode-map",
"sql-manual/sql-functions/table-functions/explode-json-object",
diff --git a/versioned_sidebars/version-3.0-sidebars.json
b/versioned_sidebars/version-3.0-sidebars.json
index bdb96dafb1e..1c8d0f893f7 100644
--- a/versioned_sidebars/version-3.0-sidebars.json
+++ b/versioned_sidebars/version-3.0-sidebars.json
@@ -1643,7 +1643,6 @@
"sql-manual/sql-functions/table-functions/explode-json-array-double",
"sql-manual/sql-functions/table-functions/explode-json-array-string",
"sql-manual/sql-functions/table-functions/explode-json-array-json",
-
"sql-manual/sql-functions/table-functions/explode-variant-array",
"sql-manual/sql-functions/table-functions/explode",
"sql-manual/sql-functions/table-functions/explode-map",
"sql-manual/sql-functions/table-functions/explode-json-object",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]