query reconstructor is partway there. scan nodes should be totally fine at this point. join still needs some work with replacing aliases with tmp table names (join conditions and filters)