Skip to content

Conversation

@WOONBE
Copy link
Contributor

@WOONBE WOONBE commented Jun 9, 2025

related issue : #3420
When retrieving documents from a Qdrant vector store, a NullPointerException was being thrown if the metadata payload for any document contained a field with a null value.

I fix the issue by replacing the stream-based Collectors.toMap() implementation with a more robust and explicit for-each loop.

I have confirmed the fix by performing tests in my local environment.

@ilayaperumalg
Copy link
Member

@WOONBE Thanks for the PR! Could you add test(s) to validate the fix please?

@WOONBE
Copy link
Contributor Author

WOONBE commented Jun 9, 2025

@WOONBE Thanks for the PR! Could you add test(s) to validate the fix please?

@ilayaperumalg Regarding the unit test for this change, I couldn't find an existing test class for QdrantObjectFactory where this new test case would naturally fit.
Please let me know if I should create a new test file, QdrantObjectFactoryTests.java, or if there's a more suitable existing file you'd prefer I add it to. I'm happy to add the test case accordingly.

@ilayaperumalg
Copy link
Member

@WOONBE Please feel free to add a new test class for the unit test. You could also add a test case in our ITs. Thanks again for looking into this!

@WOONBE
Copy link
Contributor Author

WOONBE commented Jun 10, 2025

@WOONBE Please feel free to add a new test class for the unit test. You could also add a test case in our ITs. Thanks again for looking into this!

@ilayaperumalg Thank you for the guidance!

I've pushed a new commit that adds a test class with a unit test to cover this fix.

Please let me know if there are any improvements or if the format needs any adjustments. I'd be happy to make further changes.

@WOONBE
Copy link
Contributor Author

WOONBE commented Jun 10, 2025

@ilayaperumalg My apologies, it seems I missed running the code formatter before submitting the initial PR.

I saw the "Formatting violations" error in the PR checks for the test file I added. I have now run mvn spring-javaformat:apply and pushed the updated code to resolve this.

Aside from this, please let me know if there's anything else I might have missed or any other feedback you have.
Thank you!

@ilayaperumalg
Copy link
Member

Rebased and merged as 8b45f41. Also, cherry-picked into 1.0.x via 8053ae3

@ilayaperumalg ilayaperumalg self-assigned this Jun 10, 2025
@ilayaperumalg ilayaperumalg added qdrant bug Something isn't working labels Jun 10, 2025
@ilayaperumalg
Copy link
Member

@WOONBE Thank you once again for the PR and following it up with the test update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants