Skip to content
New issue

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

[SR-31450] query from table with vector index return internal error when enable_experimental_vector = false #55064

Open
andyziye opened this issue Jan 14, 2025 · 0 comments
Assignees
Labels
type/bug Something isn't working

Comments

@andyziye
Copy link
Collaborator

andyziye commented Jan 14, 2025

Steps to reproduce the behavior (Required)

create database test_vector_indexdf9244fa_d244_11ef_a814_00163e21975a;
use test_vector_indexdf9244fa_d244_11ef_a814_00163e21975a;
set enable_profile = true;
ADMIN SET FRONTEND CONFIG ("enable_experimental_vector" = "true");
CREATE TABLE t_test_vector_table (
    id bigint(20) NOT NULL COMMENT "",
    vector ARRAY<FLOAT> NOT NULL COMMENT "",
    INDEX index_vector (vector) USING VECTOR (
        "index_type" = "hnsw", 
        "dim"="4", 
        "metric_type" = "l2_distance", 
        "is_vector_normed" = "false", 
        "M" = "2",
        "efconstruction" = "2"
    )
) ENGINE=OLAP
DUPLICATE KEY(id)
DISTRIBUTED BY HASH(id) BUCKETS 1
PROPERTIES (
    "replication_num" = "1",
    "enable_persistent_index" = "false",
    "replicated_storage" = "false",
    "compression" = "LZ4"
);
insert into t_test_vector_table values 
            (1, [1.0, 2.0, 3.0, 4.0]),
            (2, [1.1, 2.1, 3.1, 4.1]),
            (3, [1.2, 2.2, 3.2, 4.2]),
            (4, [10.0, 10.0, 10.0, 10.0]),
            (5, [10.1, 10.1, 10.1, 10.1]),
            (6, [10.2, 10.2, 10.2, 10.2]),
            (7, [5.0, 5.0, 5.0, 5.0]),
            (8, [5.1, 5.1, 5.1, 5.1]),
            (9, [0.5, 0.5, 0.5, 0.5]),
            (10, [0.6, 0.6, 0.6, 0.6])

        ;

>select id from t_test_vector_table order by approx_l2_distance([10.0, 10.0, 10.0, 10.0], vector) limit 5;

+----+
| id |
+----+
| 4  |
| 5  |
| 6  |
| 8  |
| 7  |
+----+
5 rows in set

>ADMIN SET FRONTEND CONFIG ("enable_experimental_vector" = "false")
Query OK, 0 rows affected

>select id from t_test_vector_table order by approx_l2_distance([10.0, 10.0, 10.0, 10.0], vector) limit 5;
(1064, "Internal error: [2025-01-14 15:13:50] /root/tenann/tenann/searcher/faiss_hnsw_ann_searcher.cc:304: Error: Error in virtual void faiss::IndexHNSW::search(faiss::Index::idx_t, const float*, faiss::Index::idx_t, float*, faiss::Index::idx_t*, const faiss::SearchParameters*) const at

Expected behavior (Required)

Real behavior (Required)

An unknown error is returned when enable_experimental_vector is set to false before query.

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
    +-------------------+
    | current_version() |
    +-------------------+
    | main-e446727 |
    +-------------------+
@andyziye andyziye added the type/bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants