Changeset 24174 for trunk/ippTools/share/magictool_inputs.sql
- Timestamp:
- May 13, 2009, 12:37:33 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTools/share/magictool_inputs.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap_magic (added) merged: 24120,24132-24136,24145,24147-24154,24156-24164,24168-24173
- Property svn:mergeinfo changed
-
trunk/ippTools/share/magictool_inputs.sql
r23886 r24174 1 SELECT * 2 FROM ( 3 -- Single skycells 1 -- Get input details for a magic node 4 2 SELECT 5 3 magicRun.magic_id, 6 magicRun.state, 7 magicInputSkyfile.node, 8 diffSkyfile.diff_id, 9 diffSkyfile.uri, 10 diffSkyfile.path_base, 11 diffSkyfile.fault, 12 diffSkyfile.quality 4 magicRun.inverse, -- Using the inverse subtraction? 5 magicRun.diff_id, 6 magicInputs.node, 7 -- Only one of diff_path_base and magic_path_base should be non-NULL 8 -- If diff_path_base is non-NULL, then only one of warp_path_base and stack_path_base should be non-NULL 9 magicInputs.diff_path_base, -- path_base for the diff (if any) 10 magicInputs.warp_path_base, -- path_base for the template warp (if any) 11 magicInputs.stack_path_base, -- path_base for the template stack (if any) 12 magicInputs.magic_path_base -- path_base for child nodes (if any) 13 13 FROM magicRun 14 JOIN magicInputSkyfile 15 USING(magic_id) 16 JOIN diffSkyfile 17 ON magicInputSkyfile.diff_id = diffSkyfile.diff_id 18 AND magicInputSkyfile.node = diffSkyfile.skycell_id 19 UNION 20 -- Merged skycells 21 SELECT 22 magicRun.magic_id, 23 magicRun.state, 24 magicTree.node, 25 0, -- no diff_id 26 magicNodeResult.uri, 27 NULL, -- magicNodeResult doesn't have a path_base 28 magicNodeResult.fault, 29 0 as quality 30 FROM magicTree 31 JOIN magicRun 32 USING(magic_id) 33 JOIN magicNodeResult 34 ON magicTree.magic_id = magicNodeResult.magic_id 35 AND magicTree.dep = magicNodeResult.node 36 ) as Foo 37 WHERE 38 fault = 0 39 AND quality = 0 14 JOIN ( 15 -- Single skycells: have uri=NULL 16 SELECT 17 magic_id, 18 magicRun.diff_id, 19 skycell_id AS node, 20 diffSkyfile.path_base AS diff_path_base, 21 warpSkyfile.path_base AS warp_path_base, 22 stackSumSkyfile.path_base AS stack_path_base, 23 NULL AS magic_path_base 24 FROM magicRun 25 JOIN magicTree USING(magic_id) 26 JOIN magicInputSkyfile USING(magic_id, node) 27 JOIN diffRun USING(diff_id) 28 JOIN diffSkyfile 29 ON diffSkyfile.diff_id = magicRun.diff_id 30 AND diffSkyfile.skycell_id = magicInputSkyfile.node 31 JOIN ( 32 -- Template for non-inverse 33 SELECT 34 magic_id, 35 skycell_id, 36 warp1 AS warp_id, 37 stack1 AS stack_id 38 FROM magicRun 39 JOIN diffInputSkyfile USING(diff_id) 40 WHERE magicRun.inverse = 0 41 -- WHERE hook (magicRun.magic_id, diffInputSkyfile.skycell_id) %s 42 UNION 43 -- Template for inverse 44 SELECT 45 magic_id, 46 skycell_id, 47 warp2 AS warp_id, 48 stack2 AS stack_id 49 FROM magicRun 50 JOIN diffInputSkyfile USING(diff_id) 51 WHERE magicRun.inverse = 1 52 -- WHERE hook (magicRun.magic_id, diffInputSkyfile.skycell_id) %s 53 ) AS diffTemplates USING(magic_id, skycell_id) 54 LEFT JOIN warpSkyfile USING(warp_id, skycell_id) 55 LEFT JOIN stackSumSkyfile USING(stack_id) 56 -- WHERE hook (magicRun.magic_id, magicTree.node) %s 57 UNION 58 -- Merged skycells: have diff_id=0, various_path_base=NULL 59 SELECT 60 magicTree.magic_id, 61 0 AS diff_id, 62 magicTree.dep, 63 NULL AS diff_path_base, 64 NULL AS warp_path_base, 65 NULL AS stack_path_base, 66 magicNodeResult.path_base AS magic_path_base 67 FROM magicTree 68 JOIN magicRun USING(magic_id) 69 JOIN magicNodeResult 70 ON magicTree.magic_id = magicNodeResult.magic_id 71 AND magicTree.dep = magicNodeResult.node 72 -- WHERE hook (magicRun.magic_id, magicTree.node) %s 73 ) AS magicInputs USING(magic_id)
Note:
See TracChangeset
for help on using the changeset viewer.
