MLE-20906 : Update Node Client based on changes to functions in Optic#936
Merged
anu3990 merged 1 commit intomarklogic:developfrom Jul 3, 2025
Merged
MLE-20906 : Update Node Client based on changes to functions in Optic#936anu3990 merged 1 commit intomarklogic:developfrom
anu3990 merged 1 commit intomarklogic:developfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Node client tests and generated types to align with changed Optic vector functions.
- Refresh license headers and normalize string quotes in generated test files
- Adjust test logic: rename functions, update expected vector results, and add a new
vectorScore#4case - Introduce a new
ServerNodetype and export in the server-types-generated module
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test-basic/plan-builder-generated.js | Updated license header; revised vectorScore tests and expected outputs; added vec.vectorScore#4 |
| test-basic/optic-vector.js | Fixed typo, renamed tests from cosineSimilarity to cosine, adjusted expected values, added cosineDistance |
| lib/server-types-generated.js | Updated license header, added ServerNode class, and updated module.exports |
Comments suppressed due to low confidence (3)
test-basic/plan-builder-generated.js:1768
- Consider adding a version check and skipping this test for server versions below 12 to match the pattern in previous vectorScore tests and prevent failures on older servers.
it('vec.vectorScore#4', function(done) {
lib/server-types-generated.js:47
- The inserted closing brace here appears unmatched and could introduce a syntax error. It should be removed or its placement adjusted to maintain proper block structure.
}
lib/server-types-generated.js:718
- [nitpick] Align the indentation of 'ServerNode: ServerNode,' with the other exports for consistent formatting.
ServerNode: ServerNode,
rjrudin
previously approved these changes
Jul 3, 2025
| * @param { VecVector } [vector2] - The vector from which to calculate the cosine with vector1. | ||
| * @returns { XsDouble } | ||
| */ | ||
| cosine(...args) { |
Contributor
There was a problem hiding this comment.
Just an FYI for the release notes, and this will apply for the Java Client as well - we'll need to call out that the method name changed here, but we're not considering that a breaking change since the addition of these vector functions was part of a "tech preview" for release for the server.
Contributor
Author
|
Updated vectorScore tests as suggested by Lazaro. |
rjrudin
approved these changes
Jul 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.