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

feat(vector): add vector to schema #9060

Merged
merged 4 commits into from
Apr 2, 2024
Merged

Conversation

harshil-goel
Copy link
Contributor

@harshil-goel harshil-goel commented Mar 27, 2024

No description provided.

@harshil-goel harshil-goel requested a review from a team as a code owner March 27, 2024 12:11
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Harshil Goel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dgraph-bot dgraph-bot added area/testing Testing related issues area/documentation Documentation related issues. area/schema Issues related to the schema language and capabilities. area/core internal mechanisms go Pull requests that update Go code labels Mar 27, 2024
@harshil-goel harshil-goel force-pushed the harshil-goel/vector-index-add branch from 2f14201 to a3c812c Compare March 27, 2024 12:20
@harshil-goel harshil-goel force-pushed the harshil-goel/vector-index-add branch from a3c812c to 32238a1 Compare March 27, 2024 12:30
@harshil-goel harshil-goel force-pushed the harshil-goel/vector-index-add branch from 735a883 to 9769f6e Compare March 29, 2024 09:20
@mangalaman93 mangalaman93 changed the title Add vector to schema feat(vector): add vector to schema Mar 29, 2024
}
if !it.Next() {
// Nothing to read.
return []string{}, it.Item().Errorf("Invalid ending.")
return tokenizers, vectorSpecs, it.Item().Errorf("Invalid ending.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we just return nil, nil, err

@@ -42,7 +42,8 @@ func checkSchema(t *testing.T, h map[string]*pb.SchemaUpdate, expected []nameTyp
for _, nt := range expected {
typ, found := h[nt.name]
require.True(t, found, nt)
require.EqualValuesf(t, *nt.typ, *typ, "found in map: %+v\n expected: %+v", *typ, *nt.typ)
require.EqualValuesf(t, *nt.typ, *typ, "found in map: %+v\n expected: %+v",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo this change

resp, err := testutil.RetryQuery(dg, "schema {}")
require.NoError(t, err)

x.AssertTrue(strings.Contains(string(resp.Json), `{"predicate":"vectortest","type":"vfloat","tokenizer":["hnsw"]}`))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct

@@ -0,0 +1,107 @@
/*
* Copyright 2023 Hypermode, Inc. and Contributors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep it Hypermode?

@mangalaman93 mangalaman93 merged commit 94baacb into main Apr 2, 2024
7 of 11 checks passed
@mangalaman93 mangalaman93 deleted the harshil-goel/vector-index-add branch April 2, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core internal mechanisms area/documentation Documentation related issues. area/schema Issues related to the schema language and capabilities. area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

4 participants