Repository navigation
docs: describe prior_versions_index in its schema sidecar - #189
Merged
Merged
Conversation
prior_versions_index was the one bundled index whose schema JSON carried no table or column descriptions: its SQL builds the column list inside an EXECUTE IMMEDIATE string, so the build skipped description parsing for it. Split the script so EXECUTE IMMEDIATE only fills a temp table with every past series version, and the final SELECT is static SQL documented with the usual "# table-description:" / "# description:" comments; drop the special case in idc_index_data_manager.py. The bucket mapping is computed once and the S3 URL built from it. The output is unchanged: run against BigQuery, the script returns the same 82,428 rows as the 25.0.4 parquet, with the same columns in the same order and no differing row. The descriptions say what the table is not: it is not a record of what is new in a release (it never lists added series, and a row ending at a release does not mean that release changed the series; 11,338 versions in 25.0.4 span several rows only because their storage bucket changed), and point at series_init_idc_version / series_revised_idc_version in the main index instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fedorov
added a commit
to ImagingDataCommons/IDC-REST-MCP
that referenced
this pull request
Oct 20, 2026
idc-index-data 25.0.5 ships descriptions for prior_versions_index and its columns (ImagingDataCommons/idc-index-data#189), so drop the local fill-ins this branch carried for them, and the fill-in mechanism with them. The data is unchanged: 179 collections, 1,044,191 series, 99.9 TB, and the same prior_versions_index rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
prior_versions_indexwas the only bundled index whose schema JSON had no table or column descriptions. Its SQL builds the column list inside anEXECUTE IMMEDIATEstring, so the build skipped description parsing for it. Without descriptions the table is easy to misread, and in ImagingDataCommons/IDC-REST-MCP#52 that misreading led to wrong release diffs.Changes
EXECUTE IMMEDIATEnow only fills a temp table with every past series version. The final SELECT is static SQL, documented with the usual# table-description:/# description:comments. The bucket mapping is computed once, and the S3 URL is built from it.prior_versions_indexspecial case inidc_index_data_manager.py.tests/test_real_sql_parsing.pychecks that the table description and all 12 column descriptions parse.docs/dev/no longer calls the table undocumented.What the descriptions say
SeriesInstanceUIDthat is also in the main index was revised; one that is not was removed. Its main use is resolving manifests made from earlier releases.series_init_idc_version/series_revised_idc_versionin the main index.Verification
Not addressed
No row starts at v1, because the query drops the original
idc-open-idcbucket. So series versions that were served in v1 and replaced later are not recorded. This PR does not change that.🤖 Generated with Claude Code