xyfsjq commented on code in PR #1883: URL: https://github.com/apache/doris-website/pull/1883#discussion_r1923281293
########## 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: done -- 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