Changeset 23566 for trunk/ippTools/share/disttool_pendingcomponent.sql
- Timestamp:
- Mar 26, 2009, 2:03:56 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/disttool_pendingcomponent.sql
r23254 r23566 2 2 SELECT 3 3 distRun.dist_id, 4 distRun.label, 4 5 stage, 5 6 stage_id, … … 8 9 rawExp.camera, 9 10 outroot, 10 rawImfile.uri as path_base, 11 rawImfile.uri as path_base, -- change this once rawImfile has path_base 11 12 chipProcessedImfile.path_base as chip_path_base, 12 13 NULL as state, … … 15 16 FROM distRun 16 17 JOIN rawExp ON exp_id = stage_id 17 JOIN rawImfile using(exp_id) 18 JOIN ( -- find the last magicked chip run 19 SELECT 20 exp_id, 21 MAX(chip_id) AS chip_id 22 FROM chipRun 23 WHERE 24 chipRun.state = 'full' 25 AND chipRun.exp_id = exp_id 26 -- AND chipRun.magicked 27 -- magicked hook 1 %s 28 GROUP BY exp_id 29 ) AS bestChipRun 30 USING(exp_id) 31 JOIN rawImfile USING(exp_id) 18 32 JOIN chipProcessedImfile 19 ON distRun.chip_id = chipProcessedImfile.chip_id 20 AND rawImfile.class_id = chipProcessedImfile.class_id 33 USING(exp_id, chip_id, class_id) 21 34 LEFT JOIN distComponent 22 35 ON distRun.dist_id = distComponent.dist_id … … 26 39 AND distRun.stage = 'raw' 27 40 AND distComponent.dist_id IS NULL 41 -- if magicked add AND rawImfile.magicked here 42 -- where hook 1 %s 28 43 29 44 -- chip stage … … 31 46 SELECT 32 47 distRun.dist_id, 48 distRun.label, 33 49 stage, 34 50 stage_id, … … 53 69 AND distRun.stage = 'chip' 54 70 AND distComponent.dist_id IS NULL 55 UNION 56 SELECT 57 distRun.dist_id, 71 -- where hook 2 %s 72 UNION 73 SELECT 74 distRun.dist_id, 75 distRun.label, 76 stage, 77 stage_id, 78 chipProcessedImfile.class_id AS component, 79 clean, 80 rawExp.camera, 81 outroot, 82 camProcessedExp.path_base, 83 chipProcessedImfile.path_base as chip_path_base, 84 camRun.state, 85 NULL, 86 0 87 FROM distRun 88 JOIN camRun ON camRun.cam_id = distRun.stage_id 89 JOIN camProcessedExp USING(cam_id) 90 JOIN chipRun USING(chip_id) 91 JOIN chipProcessedImfile USING(exp_id, chip_id) 92 JOIN rawExp using(exp_id) 93 LEFT JOIN distComponent 94 ON distRun.dist_id = distComponent.dist_id 95 AND chipProcessedImfile.class_id = distComponent.component 96 WHERE 97 distRun.state = 'new' 98 AND distRun.stage = 'camera' 99 AND distComponent.dist_id IS NULL 100 -- where hook 3 %s 101 UNION 102 SELECT 103 distRun.dist_id, 104 distRun.label, 105 stage, 106 stage_id, 107 fakeProcessedImfile.class_id AS component, 108 clean, 109 rawExp.camera, 110 outroot, 111 fakeProcessedImfile.path_base, 112 NULL, 113 fakeRun.state, 114 NULL, 115 0 116 FROM distRun 117 JOIN fakeRun ON fakeRun.fake_id = distRun.stage_id 118 JOIN fakeProcessedImfile USING(fake_id) 119 JOIN camRun USING(cam_id) 120 JOIN chipRun USING(chip_id, exp_id) 121 JOIN rawExp using(exp_id) 122 LEFT JOIN distComponent 123 ON distRun.dist_id = distComponent.dist_id 124 AND fakeProcessedImfile.class_id = distComponent.component 125 WHERE 126 distRun.state = 'new' 127 AND distRun.stage = 'fake' 128 AND distComponent.dist_id IS NULL 129 -- where hook 4 %s 130 UNION 131 SELECT 132 distRun.dist_id, 133 distRun.label, 58 134 stage, 59 135 stage_id, … … 81 157 AND distRun.stage = 'warp' 82 158 AND distComponent.dist_id IS NULL 83 UNION 84 SELECT 85 distRun.dist_id, 159 -- where hook 5 %s 160 UNION 161 SELECT 162 distRun.dist_id, 163 distRun.label, 86 164 stage, 87 165 stage_id, … … 108 186 AND distRun.stage = 'diff' 109 187 AND distComponent.dist_id IS NULL 188 -- where hook 6 %s 110 189 UNION 111 190 SELECT DISTINCT 112 191 distRun.dist_id, 192 distRun.label, 113 193 stage, 114 194 stage_id, … … 152 232 AND distRun.stage = 'stack' 153 233 AND distComponent.dist_id IS NULL 234 -- where hook 7 %s 154 235 ) as Foo
Note:
See TracChangeset
for help on using the changeset viewer.
