From 27fa9871a62dbab67ad159d434f465f98896534d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 4 Oct 2024 13:39:28 -0700
Subject: [PATCH] .Net: Bump DuckDB.NET.Data from 1.0.1 to 1.1.1 in /dotnet
(#8969)
Bumps [DuckDB.NET.Data](https://github.com/Giorgi/DuckDB.NET) from 1.0.1
to 1.1.1.
Commits
4f88227
Update to DuckDB v1.1.1
90d9180
Add SQLNULL Type
823ccd7
Make properties read-only
10fa1b6
Add API to get progress report
1ccf91b
Merge branch 'bind-value' into develop
4fd76ae
Skip arm builds during nightly
5a4e58d
Add win-arm64 support to runtime identifiers (#213)
67dc268
Revert "Tweak DuckDB download logic"
93bfa51
Update release notes
dfab275
Merge branch 'nightly-builds' into develop
- Additional commits viewable in compare
view
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=DuckDB.NET.Data&package-manager=nuget&previous-version=1.0.1&new-version=1.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
---
dotnet/Directory.Packages.props | 4 ++--
dotnet/src/Connectors/Connectors.Memory.DuckDB/Database.cs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props
index 190f4add6eef..c36351f3f88e 100644
--- a/dotnet/Directory.Packages.props
+++ b/dotnet/Directory.Packages.props
@@ -76,8 +76,8 @@
-
-
+
+
diff --git a/dotnet/src/Connectors/Connectors.Memory.DuckDB/Database.cs b/dotnet/src/Connectors/Connectors.Memory.DuckDB/Database.cs
index a4f422d5e7d9..7eaf1201abc3 100644
--- a/dotnet/src/Connectors/Connectors.Memory.DuckDB/Database.cs
+++ b/dotnet/src/Connectors/Connectors.Memory.DuckDB/Database.cs
@@ -118,7 +118,7 @@ public async IAsyncEnumerable GetNearestMatchesAsync(
using var cmd = conn.CreateCommand();
cmd.CommandText = $@"
- SELECT key, metadata, timestamp, embedding, (embedding <=> {embeddingArrayString}) as score FROM {TableName}
+ SELECT key, metadata, timestamp, embedding, list_cosine_similarity(embedding, {embeddingArrayString}) as score FROM {TableName}
WHERE collection=${nameof(collectionName)} AND len(embedding) > 0 AND score >= {minRelevanceScore.ToString("F12", CultureInfo.InvariantCulture)}
ORDER BY score DESC
LIMIT ${nameof(limit)};";