-
[OPIK-4501] [BE] Add type filter to datasets list endpoint (#5312)
发布于
2026-02-20 19:27:14 +00:00 - [OPIK-4501] [BE] Add type filter to datasets list endpoint
Add
typequery parameter to GET /v1/private/datasets to filter by
dataset type (dataset or evaluation_suite). This enables the frontend
to separate evaluation suites from regular datasets in the table view.Changes:
- DatasetsResource: Add @QueryParam("type") DatasetType type
- DatasetCriteria: Add DatasetType type field
- DatasetDAO: Add type filter to all 6 SQL queries
- DatasetService: Pass type through all code paths
- DatasetsResourceTest: Add 4 integration tests for type filtering
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 2: Consolidate type filter tests into parameterized test
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 3: Add DatasetTypeParamConverter for lowercase query param binding
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 4: Extract AbstractParamConverterProvider to share converter boilerplate
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 5: Derive allowed values from DatasetType.values() in error message
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 6: Use isBlank instead of isEmpty in AbstractParamConverterProvider
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 7: Address PR nits — text blocks, @NonNull, SQL skill
- Convert 6 string-concatenated SQL queries to text blocks in DatasetDAO
- Add @NonNull to targetType in AbstractParamConverterProvider
- Add SQL text blocks gotcha to backend SKILL.md
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Claude Opus 4.6 noreply@anthropic.com
下载附件