You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select abs(f1.x-f2.x) as xdist, f1.fofId, f2.fofId from Bolshoi.FOF as f1, Bolshoi.FOF as f2 where f1.snapnum=416 and f2.snapnum=416 and f1.mass > 5.e13 and f2.mass > 5.e13
Limit 10
Problem xdist is not calculated and not written to results. All necessary columns (f1.x`, f2.x) are selected, but during the join, the expression is forgotten.
This happens, as soon as I use data from the two joined tables. If I calculated a value based on two columns from the same table (f1.x+f1.y or so), everything works fine.
If I add the computed expression in the where-clause: and abs(f1.x-f2.x) < 0.5
then it will be correctly taken into account in the query plan for filtering the results, but again the value won't be given in the results-table.
Goal
This is needed for being able to match halos from different catalogues based on distance or other properties.
Query Plan
-- CALL paquExec('SELECT `f2`.`x` AS `f2.x`,`f2`.`fofId` AS `f2.fofId`,`f2`.`snapnum` AS `f2.snapnum`,`f2`.`mass` AS `f2.mass` FROM Bolshoi.FOF AS `f2` WHERE ( `f2`.`snapnum` = 416 ) and ( `f2`.`mass` > 5.e13 ) ', 'aggregation_tmp_17895463')
-- CALL paquExec('SELECT `f1`.`fofId` AS `f1.fofId`,`f2`.`f2.fofId` AS `f2.fofId` FROM Bolshoi.FOF AS `f1` JOIN ( SELECT `f2.x`,`f2.fofId`,`f2.snapnum`,`f2.mass` FROM `aggregation_tmp_17895463` ) AS `f2` WHERE ( `f1`.`snapnum` = 416 ) and ( `f1`.`mass` > 5.e13 ) LIMIT 0,10', 'aggregation_tmp_35129861')
-- CALL paquDropTmp('aggregation_tmp_17895463')
-- USE spider_tmp_shard-- SET @i=0-- CREATE TABLE cosmosim_user_kristin.`user--calcissue2` ENGINE=MyISAM SELECT @i:=@i+1 AS `row_id`, `f1.fofId`,`f2.fofId` FROM `aggregation_tmp_35129861` LIMIT 0,10
-- CALL paquDropTmp('aggregation_tmp_35129861')
Desired Query Plan
-- CALL paquExec('SELECT `f2`.`x` AS `f2.x`,`f2`.`fofId` AS `f2.fofId`,`f2`.`snapnum` AS `f2.snapnum`,`f2`.`mass` AS `f2.mass` FROM Bolshoi.FOF AS `f2` WHERE ( `f2`.`snapnum` = 416 ) and ( `f2`.`mass` > 5.e13 ) ', 'aggregation_tmp_17895463')
-- CALL paquExec('SELECT abs( `f1`.`x` - `f2`.`f2.x` ) AS `xdist`,`f1`.`fofId` AS `f1.fofId`,`f2`.`f2.fofId` AS `f2.fofId` FROM Bolshoi.FOF AS `f1` JOIN ( SELECT `f2.x`,`f2.fofId`,`f2.snapnum`,`f2.mass` FROM `aggregation_tmp_17895463` ) AS `f2` WHERE ( `f1`.`snapnum` = 416 ) and ( `f1`.`mass` > 5.e13 ) LIMIT 0,10', 'aggregation_tmp_35129861')
-- CALL paquDropTmp('aggregation_tmp_17895463')
-- USE spider_tmp_shard-- SET @i=0-- CREATE TABLE cosmosim_user_kristin.`user--calcissue2` ENGINE=MyISAM SELECT @i:=@i+1 AS `row_id`, `f1.fofId`,`f2.fofId` FROM `aggregation_tmp_35129861` LIMIT 0,10
-- CALL paquDropTmp('aggregation_tmp_35129861')
The text was updated successfully, but these errors were encountered:
Original Query
Problem
xdist
is not calculated and not written to results. All necessary columns (f1.x`, f2.x) are selected, but during the join, the expression is forgotten.This happens, as soon as I use data from the two joined tables. If I calculated a value based on two columns from the same table (f1.x+f1.y or so), everything works fine.
If I add the computed expression in the where-clause:
and abs(f1.x-f2.x) < 0.5
then it will be correctly taken into account in the query plan for filtering the results, but again the value won't be given in the results-table.
Goal
This is needed for being able to match halos from different catalogues based on distance or other properties.
Query Plan
Desired Query Plan
The text was updated successfully, but these errors were encountered: