Skip to content

(WIP) Resource table enhancement#12205

Draft
dippindots wants to merge 3 commits into
cBioPortal:masterfrom
dippindots:resource-table-enhancement
Draft

(WIP) Resource table enhancement#12205
dippindots wants to merge 3 commits into
cBioPortal:masterfrom
dippindots:resource-table-enhancement

Conversation

@dippindots

Copy link
Copy Markdown
Collaborator

Fix # (see https://help.github.com/en/articles/closing-issues-using-keywords)

Describe changes proposed in this pull request:

  • a
  • b

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 that
and notify them either through slack or by assigning them as a reviewer on the PR

dippindots and others added 3 commits June 9, 2026 18:05
- 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>
@dippindots dippindots marked this pull request as draft June 22, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant