morrySnow commented on code in PR #1931: URL: https://github.com/apache/doris-website/pull/1931#discussion_r1928027016
########## docs/sql-manual/sql-functions/table-functions/posexplode.md: ########## @@ -26,33 +26,51 @@ under the License. ## Description -The table function is used in conjunction with Lateral View and can support multiple Lateral Views. It only supports the new optimizer. +The `posexplode` table function expands an array column into multiple rows and adds a column indicating the position of each element, returning a struct type. It must be used with LATERAL VIEW and supports multiple LATERAL VIEWs. Only supported with the new optimizer. -It expands an array column into multiple rows and adds a column indicating the position, returning a struct type. When the array is NULL or empty, posexplode_outer returns NULL. Both posexplode and posexplode_outer will return NULL elements within the array. +`posexplode_outer` is similar to `posexplode`, except for the handling of NULL values. ## Syntax + ```sql -posexplode(array) -posexplode_outer(array) +POSEXPLODE(<arr>) +POSEXPLODE_OUTER(<arr>) ``` -### Example +## Parameters -```sql - CREATE TABLE IF NOT EXISTS `table_test`( - `id` INT NULL, - `name` TEXT NULL, - `score` array<string> NULL - ) ENGINE=OLAP - DUPLICATE KEY(`id`) - COMMENT 'OLAP' - DISTRIBUTED BY HASH(`id`) BUCKETS 1 - PROPERTIES ("replication_allocation" = "tag.location.default: 1"); +| Parameter | Description | +| -- | -- | +| `<arr>` | Array type | Review Comment: 参数的描述过于简单了。比如可以写,待被展开的数组(An array that is to be expanded.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org