Missing reanalyze() in select stmt after substitution.

Change-Id: I71203ebb02cf64e5bf259d2f6c5faf951f87f0d2
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3131
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins