Commit b697358
authored
.Net: [MEVD] Go over all key types, add support for Guid (#13315)
* Added new KeyTypeTests to cover provider key support, alongside the
existing DataTypeTests and EmbeddingTypeTests; moved all three into
TypeTests folder.
* As discussed offline, this adds Guid-as-string key support for all
providers. From research this seems to be very standard practice across
a wide range of databases: JSON-based databases generally encode various
types (e.g. DateTime) as string, and Guids are standard there. Sqlite is
similar, with Microsoft.Data.Sqlite supporting it natively. This notably
allows upper layers to assume that they can always use Guid, which helps
MEDI ([see this
issue](dotnet/extensions#6973)).
* Per-provider notes
* Azure AI Search: string only supported, added Guid-as-string as an
option
([docs](https://learn.microsoft.com/en-us/rest/api/searchservice/data-type-map-for-indexers-in-azure-search#bkmk_sql_search)
encouraging mapping Guid to strings)
* MongoDB/CosmosMongoDB: Added int and long support (Guid was already
supported).
* CosmosNoSql: Added Guid-as-string (standard practice)
* Pinecone: Added Guid-as-string
* Redis: Added Guid-as-string
* SQL Server: removed DateTime and `byte[]` as key types (as above) and
added Guid.
* SQLite: The Microsoft.Data.Sqlite (the low-level ADO.NET provider
we're built on top of) supports GUIDs as TEXT; so it's really not us
deciding to support - it's the lower-level driver. In addition, we
support mapping boolean to INTEGER (1/0), which seems similar. Added
support as data property as well, not just key.
Closes #11784
Closes #121821 parent d9ea1e3 commit b697358
File tree
74 files changed
+700
-239
lines changed- dotnet
- src
- InternalUtilities/connectors/Memory/MongoDB
- VectorData
- AzureAISearch
- CosmosMongoDB
- CosmosNoSql
- MongoDB
- Pinecone
- Redis
- SqlServer
- SqliteVec
- test/VectorData
- AzureAISearch.ConformanceTests
- ModelTests
- TypeTests
- CosmosMongoDB.ConformanceTests/TypeTests
- CosmosMongoDB.UnitTests
- CosmosNoSql.ConformanceTests/TypeTests
- CosmosNoSql.UnitTests
- InMemory.ConformanceTests/TypeTests
- MongoDB.ConformanceTests/TypeTests
- MongoDB.UnitTests
- PgVector.ConformanceTests/TypeTests
- Pinecone.ConformanceTests
- TestModels
- TypeTests
- Qdrant.ConformanceTests/TypeTests
- Redis.ConformanceTests/TypeTests
- SqlServer.ConformanceTests/TypeTests
- SqliteVec.ConformanceTests
- TypeTests
- VectorData.ConformanceTests/TypeTests
- Weaviate.ConformanceTests/TypeTests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
74 files changed
+700
-239
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | | - | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
795 | 801 | | |
796 | 802 | | |
797 | 803 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
| 100 | + | |
99 | 101 | | |
100 | | - | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | | - | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
852 | 855 | | |
853 | 856 | | |
854 | 857 | | |
| 858 | + | |
855 | 859 | | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
856 | 867 | | |
857 | 868 | | |
858 | 869 | | |
859 | 870 | | |
860 | 871 | | |
861 | 872 | | |
| 873 | + | |
862 | 874 | | |
863 | 875 | | |
864 | 876 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
621 | 627 | | |
622 | 628 | | |
623 | 629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
61 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
| |||
0 commit comments