Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2544 : Solr processed column value querying modified for being more accurate #2545

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_acquisition da on da.id = d.dataset_acquisition_id"
+ " LEFT JOIN mr_dataset_acquisition mda on mda.id = d.dataset_acquisition_id"
Expand Down Expand Up @@ -94,7 +94,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_acquisition da on da.id = d.dataset_acquisition_id"
+ " LEFT JOIN examination e ON e.id = da.examination_id"
Expand Down Expand Up @@ -125,7 +125,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_acquisition da on da.id = d.dataset_acquisition_id"
+ " LEFT JOIN examination e ON e.id = da.examination_id"
Expand Down Expand Up @@ -157,7 +157,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_acquisition da on da.id = d.dataset_acquisition_id"
+ " LEFT JOIN examination e ON e.id = da.examination_id"
Expand Down Expand Up @@ -188,7 +188,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_acquisition da on da.id = d.dataset_acquisition_id"
+ " LEFT JOIN examination e ON e.id = da.examination_id"
Expand Down Expand Up @@ -220,7 +220,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_acquisition da on da.id = d.dataset_acquisition_id"
+ " LEFT JOIN examination e ON e.id = da.examination_id"
Expand Down Expand Up @@ -252,7 +252,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"proc.processing_date as importDate, " +
"proc.username as username, " +
"null as sortingIndex, " +
"1 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_processing proc ON proc.id = d.dataset_processing_id"
+ " LEFT JOIN study st ON st.id = proc.study_id"
Expand Down Expand Up @@ -282,7 +282,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset refd ON refd.id = d.referenced_dataset_for_superimposition_id"
+ " LEFT JOIN dataset_acquisition da on da.id = refd.dataset_acquisition_id"
Expand Down Expand Up @@ -315,7 +315,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset refd ON refd.id = d.referenced_dataset_for_superimposition_id"
+ " LEFT JOIN dataset_acquisition da on da.id = refd.dataset_acquisition_id"
Expand Down Expand Up @@ -348,7 +348,7 @@ public class ShanoirMetadataRepositoryImpl implements ShanoirMetadataRepositoryC
"da.import_date as importDate, " +
"da.username as username, " +
"da.sorting_index as sortingIndex, " +
"0 as processed"
"CASE WHEN d.dataset_processing_id IS NULL THEN 0 ELSE 1 END as processed"
+ " FROM dataset d"
+ " LEFT JOIN dataset_acquisition da on da.id = d.dataset_acquisition_id"
+ " LEFT JOIN examination e ON e.id = da.examination_id"
Expand Down
Loading