Results of 1 - 10 of about 13 for distance (0.005 sec.)
- Spatial Functions 12897
- Function Index Scalar Functions Function Summary DuckDB_PROJ_Compiled_Version Returns a text description of the PROJ library version that this instance of DuckDB was compiled against. DuckDB_Proj_Version Returns a text description of the PR
...adian. ST_Boundary Returns the "boundary" of a geometry ST_Buffer Returns a buffer around the input geometry at the target distance ST_BuildArea Creates a polygonal geometry by attempting to "fill in" the input geometry. ST_Centroid Returns the centroid...1 "covers" geom2 ST_Crosses Returns true if geom1 "crosses" geom2 ST_DWithin Returns if two geometries are within a target distance of each-other ST_DWithin_GEOS Returns if two geometries are within a target distance of each-other ST_DWithin_Spheroid Ret...urns if two POINT_2D's are within a target distance in meters, using an ellipsoidal model of the earths surface ST_Difference Returns the "difference" between two geometries... - https://man.mtool.work/duckdb/2.0/core_extensions/spatial/functions.html
- Vector Similarity Search Extension 11138
- The vss extension is an experimental extension for DuckDB that adds indexing support to accelerate vector similarity search queries using DuckDB's new fixed-size ARRAY type. See the announcement blog post and the “What's New in the Vector S
...HNSW (vec); The index will then be used to accelerate queries that use an ORDER BY clause evaluating one of the supported distance metric functions against the indexed columns and a constant vector, followed by a LIMIT clause. For example: SELECT * FROM...my_vector_table ORDER BY array_distance(vec, [1, 2, 3]::FLOAT[3]) LIMIT 3; Additionally, the overloaded min_by(col, arg, n) can also be accelerated with the HNSW...index if the arg argument is a matching distance metric function. This can be used to do quick one-shot nearest neighbor searches. For example, to get the top 3 rows with... - https://man.mtool.work/duckdb/2.0/core_extensions/vss.html
- Array Functions 11138
- All LIST functions work with the ARRAY data type . Additionally, several ARRAY -native functions are also supported. Array-Native Functions Function Description array_cosine_distance(array1, array2) Computes the cosine distance between two
..._cross_product(array, array) Computes the cross product of two arrays of size 3. The array elements cannot be NULL . array_distance(array1, array2) Computes the distance between two arrays of the same size. The array elements cannot be NULL . The arrays...e size is the same for both arguments. array_value(arg, ...) Creates an ARRAY containing the argument values. array_cosine_distance(array1, array2) | Description | Computes the cosine distance between two arrays of the same size. The array elements canno...t be NULL . The arrays can have any size as long as the size is the same for both arguments. | | Example | array_cosine_distance(array_value(1.0::FLOAT, 2.0::FLOAT, 3.0::FLOAT), array_value(2.0::FLOAT, 3.0::FLOAT, 4.0::FLOAT)) | | Result | 0.007416606... - https://man.mtool.work/duckdb/2.0/sql/functions/array.html
- Lance Extension 9202
- The lance extension adds support for reading and writing Lance tables. Lance is a modern lakehouse format optimized for ML/AI workloads, with native cloud storage support. Installing and Loading You can install the lance extension from Duck
...S id, 'b'::VARCHAR AS s; SELECT count(*) FROM lance_ns.main.my_dataset; Vector Search -- Search a vector column, returning distances in `_distance` (smaller is closer) SELECT id, label, _distance FROM lance_vector_search( '⟨path/to/dataset.lance⟩', 'vec'..., [0.1, 0.2, 0.3, 0.4]::FLOAT[4], k = 5, prefilter = true ) ORDER BY _distance ASC; See the SQL reference for full parameter documentation . Full-Text Search (FTS) -- Search a text column, returning BM...documentation . Hybrid Search (Vector + FTS) -- Combine vector and text scores, returning `_hybrid_score` in addition to `_distance` / `_score` SELECT id, _hybrid_score, _distance, _score FROM lance_hybrid_search('⟨path/to/dataset.lance⟩', 'vec', [0.1, 0... - https://man.mtool.work/duckdb/2.0/core_extensions/lance.html
- List Functions 8973
- Function Description list[index] Extracts a single list element using a (1-based) index . list[begin[:end][:step]] Extracts a sublist using slice conventions . Negative values are accepted. list1 && list2 Alias for list_has_any . list1 <->
...list2 Alias for list_distance . list1 <=> list2 Alias for list_cosine_distance . list1 <@ list2 Alias for list_has_all . list1 @> list2 Alias for list_h...re skipped. See also operator || . list_contains(list, element) Returns true if the list contains the element. list_cosine_distance(list1, list2) Computes the cosine distance between two same-sized lists. list_cosine_similarity(list1, list2) Computes the...cosine similarity between two same-sized lists. list_count(list) Applies aggregate function count to the list . list_distance(list1, list2) Calculates the Euclidean distance between two points with coordinates given in two inputs lists of equal len... - https://man.mtool.work/duckdb/2.0/sql/functions/list.html
- Jupyter Notebooks 8076
- DuckDB's Python client can be used directly in Jupyter notebooks with no additional configuration, as the first section shows. Additional libraries can simplify SQL query development; the rest of this guide uses the JupySQL package. See oth
...1-01.parquet", "yellow_tripdata_2021-01.parquet", ) %sqlplot boxplot --table yellow_tripdata_2021-01.parquet --column trip_distance Install and Load DuckDB httpfs Extension DuckDB's httpfs extension allows Parquet and CSV files to be queried remotely ove...ps --no-execute SELECT * FROM 'https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2021-01.parquet' WHERE trip_distance < 6.3 To create a histogram, call %sqlplot histogram and pass the name of the table, the column to plot and the number of...ery defined previously and therefore only plots a subset of the data. %sqlplot histogram --table short_trips --column trip_distance --bins 10 --with short_trips Summary You now have the ability to alternate between SQL and Pandas in a simple and highly p... - https://man.mtool.work/duckdb/2.0/guides/python/jupyter.html
- Python Client API 8023
- Connection class duckdb. Appender Bases: object append_row ( self , * args ) → None Buffer one row, one value per column, each converted as an executemany parameter would be append_rows ( self , rows : object ) → None Buffer each row of an
...d within string . Arguments: search_string. SQL: contains . damerau_levenshtein ( * args : ValueOrExpr ) → Expression Edit distance, counting a swap of neighbours as one edit. Arguments: s2. SQL: damerau_levenshtein . format ( * args : ValueOrExpr ) → St...nd': ('list_bool_and', 0, []), 'bool_or': ('list_bool_or', 0, []), 'contains': ('list_contains', 0, ['T[]', 'T']), 'cosine_distance': ('list_cosine_distance', 0, ['DOUBLE[]', 'DOUBLE[]']), 'cosine_similarity': ('list_cosine_similarity', 0, ['DOUBLE[]', '...DOUBLE[]']), 'count': ('list_count', 0, []), 'distance': ('list_distance', 0, ['DOUBLE[]', 'DOUBLE[]']), 'distinct': ('list_distinct', 0, ['T[]']), 'entropy': ('list_entropy', 0... - https://man.mtool.work/duckdb/2.0/clients/python/reference/
- FROM and JOIN Clauses 7900
- The FROM clause specifies the source of the data on which the remainder of the query should operate. Logically, the FROM clause is where the query starts execution. The FROM clause can contain a single table, a combination of multiple table
...duced in DuckDB 2.0. A nearest join matches each left side row with the top-k right side rows according to a similarity or distance measure. This turns top-k similarity search into a join clause, which is handy for vector and embedding workloads. The joi...n is written as NEAREST ⟨k⟩ BY SIMILARITY ⟨expression⟩ (higher is closer) or NEAREST ⟨k⟩ BY DISTANCE ⟨expression⟩ (lower is closer). Prefixing it with APPROX performs an approximate search, which can be faster for large inp...regular join types, for example LEFT JOIN : SELECT q.user_id, t.product_id FROM users q LEFT JOIN products t NEAREST 1 BY DISTANCE array_distance(q.embedding, t.embedding); Self-Joins DuckDB allows self-joins for all types of joins. Note that tables nee... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/from.html
- Window Functions 7794
- DuckDB supports window functions , which can use multiple rows to calculate a value for each row. Window functions are blocking operators , i.e., they require their entire input to be buffered, making them one of the most memory-intensive o
...use a frame . Frames are specified as a number of rows on either side ( preceding or following ) of the current row . The distance can be specified as a number of rows , as a range of values using the partition's ordering value and a distance, or as a n...rted if that is desired. Framing Framing specifies a set of rows relative to each row where the function is evaluated. The distance from the current row is given as an expression either PRECEDING or FOLLOWING the current row in the order specified by the...ORDER BY clause in the OVER specification. This distance can either be specified as an integral number of ROWS or GROUPS , or as a RANGE delta expression. It is invalid for a fram... - https://man.mtool.work/duckdb/2.0/sql/functions/window_functions.html
- Text Functions 7566
- Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a
...two strings using various similarity measures . Function Description damerau_levenshtein(s1, s2) Extension of Levenshtein distance to also include transposition of adjacent characters as an allowed edit operation. In other words, the minimum number of e...ent cases (e.g., a and A ) are considered different. editdist3(s1, s2) Alias for levenshtein . hamming(s1, s2) The Hamming distance between two strings, i.e., the number of positions with different characters for two strings of equal length. Strings must...red different. mismatches(s1, s2) Alias for hamming . damerau_levenshtein(s1, s2) | Description | Extension of Levenshtein distance to also include transposition of adjacent characters as an allowed edit operation. In other words, the minimum number of e... - https://man.mtool.work/duckdb/2.0/sql/functions/text.html
DuckDB 2.0 Documentation / man.mtool.work