Fix inner evaluation of join and leftjoin -> case true remove atom, case
false, keep boolean(f), fix sql generation for new case