We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADMIN SET FRONTEND CONFIG ("enable_experimental_vector" = "true"); CREATE TABLE t6 ( id bigint(20) NOT NULL COMMENT "", vector ARRAY<FLOAT> NOT NULL COMMENT "", INDEX index_vector (vector) USING VECTOR ( "index_type" = "hnsw", "dim"="5", "metric_type" = "cosine_similarity", "is_vector_normed" = "false", "M" = "16", "efconstruction" = "40" ) ) ENGINE=OLAP DUPLICATE KEY(id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ( "replication_num" = "1" ); insert into t6 values (1, [10,12,13,14,15]), (2, [1,2,3,4,5]), (3, [0.1,0.2,0.3,0.4,0.5]); explain select id, vector, approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector), l2_distance([0.1,0.2,0.3,0.4,0.5], vector), cosine_similarity([0.1,0.2,0.3,0.4,0.5], vector) from t6 order by approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector) limit 1000; select id, vector, approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector), l2_distance([0.1,0.2,0.3,0.4,0.5], vector), cosine_similarity([0.1,0.2,0.3,0.4,0.5], vector) from t6 order by approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector) limit 1000;
> explain select id, vector, approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector), l2_distance([0.1,0.2,0.3,0.4,0.5], vector), cosine_similarity([0.1,0.2,0.3,0.4,0.5], vector) from t6 order by approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector) limit 1000; | 0:OlapScanNode | | TABLE: t6 | | PREAGGREGATION: ON | | VECTORINDEX: FALSE | > select id, vector, approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector), l2_distance([0.1,0.2,0.3,0.4,0.5], vector), cosine_similarity([0.1,0.2,0.3,0.4,0.5], vector) from t6 order by approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector) limit 1000; +----+-----------------------+-------------------------------------------------------+------------------------------------------------+------------------------------------------------------+ | id | vector | approx_l2_distance([0.1, 0.2, 0.3, 0.4, 0.5], vector) | l2_distance([0.1, 0.2, 0.3, 0.4, 0.5], vector) | cosine_similarity([0.1, 0.2, 0.3, 0.4, 0.5], vector) | +----+-----------------------+-------------------------------------------------------+------------------------------------------------+------------------------------------------------------+ | 1 | [10,12,13,14,15] | 0.9525018 | 793.75 | 0.9525017 | | 2 | [1,2,3,4,5] | 1.0 | 44.55 | 1.0 | | 1 | [0.1,0.2,0.3,0.4,0.5] | 1.0 | 0.0 | 0.9999999 | +----+-----------------------+-------------------------------------------------------+------------------------------------------------+------------------------------------------------------+ +----+-----------------------+--------------------------------------
> explain select id, vector, approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector), l2_distance([0.1,0.2,0.3,0.4,0.5], vector), cosine_similarity([0.1,0.2,0.3,0.4,0.5], vector) from t6 order by approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector) limit 1000; | 0:OlapScanNode | | TABLE: t6 | | PREAGGREGATION: ON | | VECTORINDEX: ON | > select id, vector, approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector), l2_distance([0.1,0.2,0.3,0.4,0.5], vector), cosine_similarity([0.1,0.2,0.3,0.4,0.5], vector) from t6 order by approx_l2_distance([0.1,0.2,0.3,0.4,0.5], vector) limit 1000; +----+-----------------------+-------------------------------------------------------+------------------------------------------------+------------------------------------------------------+ | id | vector | approx_l2_distance([0.1, 0.2, 0.3, 0.4, 0.5], vector) | l2_distance([0.1, 0.2, 0.3, 0.4, 0.5], vector) | cosine_similarity([0.1, 0.2, 0.3, 0.4, 0.5], vector) | +----+-----------------------+-------------------------------------------------------+------------------------------------------------+------------------------------------------------------+ | 1 | [10,12,13,14,15] | 0.9525018 | 793.75 | 0.9525017 | | 2 | [1,2,3,4,5] | 1.0 | 44.55 | 1.0 | | 1 | [0.1,0.2,0.3,0.4,0.5] | 1.0 | 0.0 | 0.9999999 | +----+-----------------------+-------------------------------------------------------+------------------------------------------------+------------------------------------------------------+
main ada1be1
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Steps to reproduce the behavior (Required)
Expected behavior (Required)
Real behavior (Required)
StarRocks version (Required)
main ada1be1
The text was updated successfully, but these errors were encountered: