-
Notifications
You must be signed in to change notification settings - Fork 26
fix SQL vector index definitions #362
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
Conversation
Summary of ChangesHello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on refining the SQL vector index definitions within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🧪 CI InsightsHere's what we observed from your CI run for 72301f2. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the SQL syntax for creating vector indexes in the java-vectors.adoc documentation, changing ARRAY OF FLOATS to LIST OF FLOAT and quoting metadata keys in CREATE INDEX. While these fixes are a good step, they have been applied inconsistently. Several examples within java-vectors.adoc itself were only partially updated, leaving them in an inconsistent state. Furthermore, other documentation files like sql-create-index.adoc were not updated at all, creating contradictions across the documentation. There is also a discrepancy between the updated SQL syntax and the unchanged Java API examples. To ensure clarity and prevent user confusion, it's crucial that these syntax updates are applied consistently across all relevant documentation and code examples.
| -- Create vertex type and property | ||
| CREATE VERTEX TYPE Document; | ||
| CREATE PROPERTY Document.embedding ARRAY OF FLOATS; | ||
| CREATE PROPERTY Document.embedding LIST OF FLOAT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've updated the SQL property type to LIST OF FLOAT. However, the Java API examples in this same file still use Type.ARRAY_OF_FLOATS (see lines 188 and 366). This creates a potential confusion for developers. If LIST OF FLOAT is the new correct SQL type, please clarify if Type.ARRAY_OF_FLOATS is still the correct corresponding type in the Java API, or if the Java examples also need to be updated for consistency.
| CREATE PROPERTY MultiModalRecord.imageEmbedding LIST OF FLOAT; | ||
| CREATE PROPERTY MultiModalRecord.textEmbedding LIST OF FLOAT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the property types have been updated here, the following CREATE INDEX statements for imageEmbedding and textEmbedding (lines 137-145) have not been updated to use double-quoted keys in their METADATA clauses. This makes this example inconsistent with the other updated examples in this file. To maintain consistency, these should also be updated.
| CREATE VERTEX TYPE Image; | ||
| CREATE PROPERTY Image.url STRING; | ||
| CREATE PROPERTY Image.features ARRAY OF FLOATS; | ||
| CREATE PROPERTY Image.features LIST OF FLOAT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you've correctly updated the property type to LIST OF FLOAT, the corresponding CREATE INDEX statement in this same code block (lines 419-422) still uses unquoted keys in its METADATA clause (dimensions, similarity). This is inconsistent with the other CREATE INDEX examples you've updated in this file. For consistency, the metadata keys here should also be double-quoted.
No description provided.