Skip to content

Conversation

@dain
Copy link
Member

@dain dain commented Mar 1, 2025

Description

Previously nulls were ignored producing in an arbitrary result.
To make the implementation easier and more performant I added a hasNull method to block.

Release notes

(X) Release notes are required, with the following suggested text:

## Section
* Fix null handling in cosine_distance and cosine_similarity to return null when array contains null. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Mar 1, 2025
@mosabua
Copy link
Member

mosabua commented Mar 1, 2025

Kinda discovered in #24027 .. I will rebase after this merged and see if there is still anything even left for me to do ;-)

dain added 2 commits March 2, 2025 13:53
This method scans the block to see if it has a null value.
Previously nulls were ignored producing in an arbitrary result
@dain dain force-pushed the vector-cosine-distance branch from 6c2d0a7 to ddb09b7 Compare March 2, 2025 21:53
@github-actions github-actions bot added the postgresql PostgreSQL connector label Mar 2, 2025
@dain dain merged commit a58f4fe into trinodb:master Mar 3, 2025
96 checks passed
@dain dain deleted the vector-cosine-distance branch March 3, 2025 05:03
@github-actions github-actions bot added this to the 472 milestone Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants