(WIP) Resource table enhancement#12205
Draft
dippindots wants to merge 3 commits into
Draft
Conversation
- Add resource_data table to cgds.sql (unified table replacing 3 split resource tables) - Add migration.sql v2.14.6: CREATE resource_data + migrate from legacy tables - Bump db.version to 2.14.6 in pom.xml Domain layer: - ResourceTableQuery, ResourceTableResult, ResourceTableRow, ResourceTableTab - ResourceTabsRequest, ResourceColumnFilter, ResourceColumnInfo, ResourceFacetOption - ResourceDataRepository port interface - GetResourceTableTabsUseCase, GetResourceTableDataUseCase Infrastructure: - ClickhouseResourceDataMapper (MyBatis, @Param annotations) - ClickhouseResourceDataRepository - ClickhouseJsonMapTypeHandler (JSON → Map<String,Object> for metadata column) - ResourceDataMapper.xml: full SQL with filters, sort, pagination, ClickHouse JSON extraction Controller: - ResourceTableController with @PreAuthorize on both POST endpoints POST /api/resource-table/tabs/fetch POST /api/resource-table/query/fetch Security: - InvolvedCancerStudyExtractorInterceptor: add path constants and extraction methods for both new endpoints Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- ClickhouseResourceDataMapperTest: integration tests using Testcontainers ClickHouse
- Tab queries: tab list, counts per tab, label fallback, patient filter
- Row queries: filtering, pagination, sort ASC/DESC, free-text search,
column filter (type), JSON metadata filter (metadata:stain)
- Count queries: rowCount, patientCount, sampleCount, STUDY entity exclusion
- ResourceTableControllerTest: WebMvcTest slice with mocked use cases
- POST /api/resource-table/tabs/fetch: tab list, empty body
- POST /api/resource-table/query/fetch: rows with metadata, empty result
- Updated clickhouse_cgds.sql (test schema):
- resource_definition: proper schema (RESOURCE_ID, CANCER_STUDY_ID, DISPLAY_NAME, ...)
- resource_data: new ClickHouse MergeTree table for unified resource storage
- Updated clickhouse_data.sql: test fixtures for resource_definition and resource_data
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Standalone SQL script for applying the v2.14.6 resource_data migration to an existing ClickHouse / ClickHouse Cloud deployment. MySQL migration.sql cannot run on ClickHouse (uses AUTO_INCREMENT, FOREIGN KEY, ENUM syntax). This script uses ClickHouse-native DDL and back-fills data from the three legacy split tables. Usage: see file header comment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Fix # (see https://help.github.com/en/articles/closing-issues-using-keywords)
Describe changes proposed in this pull request:
Checks
Any screenshots or GIFs?
If this is a new visual feature please add a before/after screenshot or gif
here with e.g. Giphy CAPTURE or Peek
Notify reviewers
Read our Pull request merging
policy. It can help to figure out who worked on the
file before you. Please use
git blame <filename>to determine thatand notify them either through slack or by assigning them as a reviewer on the PR