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
Change shell to print WARNINGS instead of ERRORS

Change-Id: I8b41a2f4307e31eda970ca891adb4f12fea926bb
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3088
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: Skye Wanderman-Milne <skye@cloudera.com>
Change precision/scale truncate in decimal divide analysis.

Previously, we tried to maintain as much of the scale as possible but
this leads to very easy overflow cases since it requires dropping all
digits before the decimal point. This patch picks a midway point.

I did a little bit of research this is close to what SQL server does
(the reference is linked in the function I changed).

Change-Id: I2100beead82559ef7b017c5f335acd532076c0d4
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3142
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins