ClickHouse/tests
Robert Schulze fa635358d2
Initial Analyzer support for vector similarity search
This code is extremely shameful, don't look at it.

Only goal of this PR is to demonstrate that the analyzer is able to see
vector similarity indexes:

ip-10-19-83-181.eu-central-1.compute.internal :) explain plan indexes=1 SELECT id, vec, L2Distance(vec, [0.0, 2.0])
FROM tab
ORDER BY L2Distance(vec, [0.0, 2.0])
LIMIT 3 settings enable_analyzer = 1

EXPLAIN indexes = 1
SELECT
    id,
    vec,
    L2Distance(vec, [0., 2.])
FROM tab
ORDER BY L2Distance(vec, [0., 2.]) ASC
LIMIT 3
SETTINGS enable_analyzer = 1

Query id: 086df46e-2e27-4342-a47c-6900762a7c8c

    ┌─explain─────────────────────────────────────────────────────────────────────────────────────────┐
 1. │ Expression (Project names)                                                                      │
 2. │   Limit (preliminary LIMIT (without OFFSET))                                                    │
 3. │     Sorting (Sorting for ORDER BY)                                                              │
 4. │       Expression ((Before ORDER BY + (Projection + Change column names to column identifiers))) │
 5. │         ReadFromMergeTree (default.tab)                                                         │
 6. │         Indexes:                                                                                │
 7. │           PrimaryKey                                                                            │
 8. │             Condition: true                                                                     │
 9. │             Parts: 1/1                                                                          │
10. │             Granules: 1/1                                                                       │
11. │           Skip                                                                                  │
12. │             Name: idx                                                                           │
13. │             Description: vector_similarity GRANULARITY 100000000                                │
14. │             Parts: 1/1                                                                          │
15. │             Granules: 1/1                                                                       │
    └─────────────────────────────────────────────────────────────────────────────────────────────────┘

15 rows in set. Elapsed: 0.007 sec.
2024-11-06 22:10:12 +00:00
..
ci Merge pull request #71341 from ClickHouse/ci_remove_old_release_script 2024-11-05 10:03:07 +00:00
config
docker_scripts Add ReadBufferFromAzureBlobStorage and AsynchronousBoundedReadBuffer 2024-10-30 14:55:46 +01:00
fuzz fix style 2024-11-04 03:37:46 +00:00
instructions
integration Merge pull request #71308 from MikhailBurdukov/fix_named_collection_unescaping 2024-11-05 10:51:35 +00:00
jepsen.clickhouse
perf_drafts
performance
queries Initial Analyzer support for vector similarity search 2024-11-06 22:10:12 +00:00
sqllogic
.gitignore
.rgignore
analyzer_tech_debt.txt
clickhouse-test Merge pull request #68682 from ClickHouse/vdimir/join_select_inner_table 2024-11-04 14:13:44 +00:00
README.md
tsan_ignorelist.txt
ubsan_ignorelist.txt

Find CI documents and instructions on running CI checks locally here.