morrySnow commented on code in PR #1883: URL: https://github.com/apache/doris-website/pull/1883#discussion_r1923194483
########## docs/sql-manual/sql-functions/scalar-functions/distance-functions/cosine-distance.md: ########## @@ -22,32 +22,38 @@ specific language governing permissions and limitations under the License. --> -## cosine_distance -### description -#### Syntax +## Description + +Calculates the cosine distance between two vectors (vector values are coordinates) + +## Syntax ```sql DOUBLE cosine_distance(ARRAY<T> array1, ARRAY<T> array2) ``` -Calculates the cosine distance between two vectors (the values of the vectors are the coordinates). -Return NULL if input array is NULL or any element of array is NULL. +## Parameters -#### Notice -* nested type of input array support: TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE -* input array1 and array2 should have the same element size +| Parameter | Description | +| -- |--| +| `array1` | The first vector (the vector value is the coordinate). The subtypes of the input array are: TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE. The number of elements must be consistent with array2. | +| `array1` | The second vector (the vector value is the coordinate), the subtype of the input array supports: TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE, the number of elements must be consistent with array1 | Review Comment: ```suggestion | `<array2>` | The second vector (the vector value is the coordinate), the subtype of the input array supports: TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE, the number of elements must be consistent with array1 | ``` ########## docs/sql-manual/sql-functions/scalar-functions/distance-functions/cosine-distance.md: ########## @@ -22,32 +22,38 @@ specific language governing permissions and limitations under the License. --> -## cosine_distance -### description -#### Syntax +## Description + +Calculates the cosine distance between two vectors (vector values are coordinates) + +## Syntax ```sql DOUBLE cosine_distance(ARRAY<T> array1, ARRAY<T> array2) Review Comment: 1. 不要参数和返回类型 2. 函数名大写 3. 参数用尖括号包裹 ```suggestion COSINE_DISTANCE(<array1>, <array2>) ``` ########## docs/sql-manual/sql-functions/scalar-functions/distance-functions/cosine-distance.md: ########## @@ -22,32 +22,38 @@ specific language governing permissions and limitations under the License. --> -## cosine_distance -### description -#### Syntax +## Description + +Calculates the cosine distance between two vectors (vector values are coordinates) + +## Syntax ```sql DOUBLE cosine_distance(ARRAY<T> array1, ARRAY<T> array2) ``` -Calculates the cosine distance between two vectors (the values of the vectors are the coordinates). -Return NULL if input array is NULL or any element of array is NULL. +## Parameters -#### Notice -* nested type of input array support: TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE -* input array1 and array2 should have the same element size +| Parameter | Description | +| -- |--| +| `array1` | The first vector (the vector value is the coordinate). The subtypes of the input array are: TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE. The number of elements must be consistent with array2. | Review Comment: ```suggestion | `<array1>` | The first vector (the vector value is the coordinate). The subtypes of the input array are: TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE. The number of elements must be consistent with array2. | ``` -- 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