Skip to content

chore: refactor vector index tests and improve naming conventions#2906

Merged
robfrank merged 6 commits intomainfrom
chore/add-vector-tests
Dec 10, 2025
Merged

chore: refactor vector index tests and improve naming conventions#2906
robfrank merged 6 commits intomainfrom
chore/add-vector-tests

Conversation

@robfrank
Copy link
Collaborator

This pull request mainly updates test method signatures to use the more concise JUnit 5 style, improves assertion usage for better readability and consistency, and introduces a new comprehensive test suite for the vectorNeighbors SQL function. There are also minor improvements to type usage in the vector index implementation.

Test improvements and modernization:

  • Refactored test method signatures throughout multiple test classes to use the concise JUnit 5 style, removing unnecessary public modifiers and renaming methods for clarity (e.g., testEqualsOperatorBeforeIndexCreationequalsOperatorBeforeIndexCreation). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]
  • Updated assertions in VectorIndexProgressCallbackTest to use AssertJ (assertThat) for improved readability and consistency, replacing JUnit assertions. [1] [2] [3] [4]

New vectorNeighbors SQL function tests:

  • Added a new test class SQLFunctionVectorNeighborsTest with multiple tests covering programmatic and SQL-based usage of the vectorNeighbors function, including limit handling and result validation.

Type and import cleanups:

  • Updated type usage in LSMVectorIndex to use the shorter Pair<RID, Float> instead of the fully qualified name, and added the necessary import. [1] [2] [3]

General code style improvements:

  • Removed unnecessary imports and updated class modifiers for better code style in test files.

These changes help modernize the codebase, improve test clarity and maintainability, and ensure comprehensive coverage for new vector search functionality.

@robfrank robfrank added this to the 25.12.1 milestone Dec 10, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 modernizing the codebase by refactoring existing tests to JUnit 5 standards and enhancing assertion readability. It also introduces a dedicated test suite for the vectorNeighbors SQL function, ensuring robust coverage for vector search capabilities. Additionally, minor type usage improvements contribute to overall code cleanliness.

Highlights

  • Test Modernization (JUnit 5): Updated numerous test method signatures across various test classes to align with JUnit 5 conventions, removing public modifiers and test prefixes for clarity and conciseness.
  • Assertion Library Migration: Migrated assertions in VectorIndexProgressCallbackTest from JUnit's Assertions to AssertJ's assertThat for enhanced readability and consistency in test expectations.
  • New VectorNeighbors SQL Function Tests: Introduced a comprehensive new test suite (SQLFunctionVectorNeighborsTest) to validate the vectorNeighbors SQL function, covering both programmatic and SQL query usage, including limit handling and result ordering.
  • Vector Index Type Cleanup: Refined type usage within LSMVectorIndex.java to use the concise Pair<RID, Float> by adding the necessary import, improving code clarity and reducing verbosity.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 is a solid piece of work that modernizes the test suite by adopting JUnit 5 conventions and AssertJ assertions, which significantly improves code consistency and readability. The introduction of a new, comprehensive test suite for the vectorNeighbors SQL function is a great addition and provides good coverage. I've added a few suggestions for the new tests to enhance resource management and naming clarity. Overall, these are excellent improvements.

@mergify
Copy link
Contributor

mergify bot commented Dec 10, 2025

🧪 CI Insights

Here's what we observed from your CI run for 4a1c619.

🟢 All jobs passed!

But CI Insights is watching 👀

robfrank and others added 4 commits December 10, 2025 08:40
…LFunctionVectorNeighborsTest.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…LFunctionVectorNeighborsTest.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…LFunctionVectorNeighborsTest.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…LFunctionVectorNeighborsTest.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@codacy-production
Copy link

codacy-production bot commented Dec 10, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.16% 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c5dd04c) 75675 47992 63.42%
Head commit (4a1c619) 75675 (+0) 48116 (+124) 63.58% (+0.16%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2906) 1 1 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@robfrank robfrank merged commit d8b187a into main Dec 10, 2025
19 of 22 checks passed
mergify bot added a commit that referenced this pull request Jan 18, 2026
… [skip ci]

Bumps [pdfmake](https://github.com/bpampuch/pdfmake) from 0.3.1 to 0.3.2.
Release notes

*Sourced from [pdfmake's releases](https://github.com/bpampuch/pdfmake/releases).*

> 0.3.2
> -----
>
> * Fixed non-working `open()` and `print()` methods in browser
> * Added SVG validation: width and height must be specified (in SVG string/element or `svg` node)
> * Added support for image scaling with only `height` defined
> * Added custom `markerColor` for each item of `ul` and `ol`


Changelog

*Sourced from [pdfmake's changelog](https://github.com/bpampuch/pdfmake/blob/master/CHANGELOG.md).*

> 0.3.2 - 2026-01-11
> ------------------
>
> * Fixed non-working `open()` and `print()` methods in browser
> * Added SVG validation: width and height must be specified (in SVG string/element or `svg` node)
> * Added support for image scaling with only `height` defined
> * Added custom `markerColor` for each item of `ul` and `ol`


Commits

* [`2dd6c35`](bpampuch/pdfmake@2dd6c35) 0.3.2
* [`47f3742`](bpampuch/pdfmake@47f3742) refresh pdf examples
* [`542c40b`](bpampuch/pdfmake@542c40b) update dependencies
* [`f8a257e`](bpampuch/pdfmake@f8a257e) custom marker color for each item of ul/ol [#1810](https://redirect.github.com/bpampuch/pdfmake/issues/1810)
* [`1f96b69`](bpampuch/pdfmake@1f96b69) added support for image scaling with only `height` defined [#1756](https://redirect.github.com/bpampuch/pdfmake/issues/1756)
* [`ed940bc`](bpampuch/pdfmake@ed940bc) Added SVG validation: width and height must be specified [#2195](https://redirect.github.com/bpampuch/pdfmake/issues/2195) [#2062](https://redirect.github.com/bpampuch/pdfmake/issues/2062)
* [`0e1fe17`](bpampuch/pdfmake@0e1fe17) Update .npmignore
* [`1b8c67a`](bpampuch/pdfmake@1b8c67a) Fixed non-working `open()` and `print()` methods in browser [#2906](https://redirect.github.com/bpampuch/pdfmake/issues/2906)
* See full diff in [compare view](bpampuch/pdfmake@0.3.1...0.3.2)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=pdfmake&package-manager=npm\_and\_yarn&previous-version=0.3.1&new-version=0.3.2)](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)
robfrank added a commit that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant