Skip to content

.Net: Bug: Qdrant DateTime Range filter set incorrectly#12936

Merged
westey-m merged 1 commit intomicrosoft:mainfrom
TsengSR:bugfixes/qdrant-datetimeoffset-filter
Aug 19, 2025
Merged

.Net: Bug: Qdrant DateTime Range filter set incorrectly#12936
westey-m merged 1 commit intomicrosoft:mainfrom
TsengSR:bugfixes/qdrant-datetimeoffset-filter

Conversation

@TsengSR
Copy link
Copy Markdown
Contributor

@TsengSR TsengSR commented Aug 13, 2025

Motivation and Context

Fixes #12934

The filter translation layer set all 4 (Gt, Gte, Lt, Lte) properties of the datetime range object, which resulted in always 0 results being returned as no rows can be greater and smaller than the set date at the same time.

Description

At first I added some simple tests and an DateTimeOffset properties to the unit tests, which failed. After debugging and finding the issue, I made the changes and the tests passed.

I was only able to test the Qdrant and InMemory integrations though, due to lack of locally running and preconfigured databases.

Open

Contribution Checklist

@TsengSR TsengSR requested a review from a team as a code owner August 13, 2025 10:05
@moonbox3 moonbox3 added the .NET Issue or Pull requests regarding .NET code label Aug 13, 2025
@TsengSR TsengSR force-pushed the bugfixes/qdrant-datetimeoffset-filter branch from b48147e to 897c9de Compare August 13, 2025 10:06
@TsengSR
Copy link
Copy Markdown
Contributor Author

TsengSR commented Aug 13, 2025

@microsoft-github-policy-service agree

@TsengSR TsengSR changed the title .Net: Bug: Qdrant DateTime Range filter set incorrectlyFixed DateTimeOffset filter in Qdrant connector .Net: Bug: Qdrant DateTime Range filter set incorrectly Aug 13, 2025
@TsengSR TsengSR force-pushed the bugfixes/qdrant-datetimeoffset-filter branch from 897c9de to 7cdf009 Compare August 14, 2025 07:20
Comment thread dotnet/test/VectorData/VectorData.ConformanceTests/Filter/BasicFilterTests.cs Outdated
@TsengSR TsengSR force-pushed the bugfixes/qdrant-datetimeoffset-filter branch from 7cdf009 to 28b0fcc Compare August 18, 2025 11:34
@westey-m westey-m enabled auto-merge August 19, 2025 15:07
@westey-m westey-m added this pull request to the merge queue Aug 19, 2025
Merged via the queue into microsoft:main with commit 5caf833 Aug 19, 2025
19 checks passed
@westey-m
Copy link
Copy Markdown
Contributor

Thanks for the contribution @TsengSR. This will be part of our next release, which should be later today if all goes well.

jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
)

### Motivation and Context

Fixes microsoft#12934 

The filter translation layer set all 4 (Gt, Gte, Lt, Lte) properties of
the datetime range object, which resulted in always 0 results being
returned as no rows can be greater and smaller than the set date at the
same time.

### Description

At first I added some simple tests and an `DateTimeOffset` properties to
the unit tests, which failed. After debugging and finding the issue, I
made the changes and the tests passed.

I was only able to test the Qdrant and InMemory integrations though, due
to lack of locally running and preconfigured databases.

**Open**

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: TsengSR <kpgit@atomic-gear.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.Net: Bug: Qdrant DateTime Range filter set incorrectly

5 participants