Convert 'exception as e' to 'exception, e' in the shell for python 2.4 compatibility.

socket.error is the only caught exception using the 'as e' syntax. This patch
fixes the syntax to be compatible with python2.4, which does not support it.
The shell cancellation tests exercise this path, so no tests need to be added.

Change-Id: I5588f25612953a28d0817081005d5770115ca106
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4638
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: jenkins
Move aggregation tests on decimal tables to decimal.test

Fixes test failures in exhaustive mode when aggregation tests
are run on table formats that do not support decimal.

Change-Id: Ic5dfb398575770cf318ffcc0ce3a20737bb2f5cd
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4636
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Tested-by: jenkins
IMPALA-1302: Incorrect result of FIRST_VALUE query

FIRST_VALUE with row offsets preceding did not produce the correct
results. This fix changes the rewrite for FIRST_VALUE and adds
additional handling for NULLs in the backend.

Change-Id: I03d54c05f63f46e9adb467008fa876ab33812c7b
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4648
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: jenkins
IMPALA-1236: Always populate unique hosts in ComputeFragmentExecParams()

The set of unique hosts is used, amongst other things, to determine
which nodes to ask for resources from Llama for. It's built in
ComputeFragmentExecParams(), but some special cases (particularly for
union nodes) were failing to properly populate the set. This patch fixes
the problem.

Change-Id: Iad90a3d2d5055428a849b27f0655eca431627ef0
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4620
Reviewed-by: Daniel Hecht <dhecht@cloudera.com>
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 4f69f5994672d614f4a97b25f023a8f328d3f159)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4653
Reviewed-by: Henry Robinson <henry@cloudera.com>
Update distinctpc/pcsa to return bigint.

Change-Id: Iac3414aa0151f52ba9ec028da152b09fc09af264
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4637
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
IMPALA-1298: Add var_{pop,samp} as aliases for variance_{pop,samp}

Change-Id: I5880ad7ebf0775704ee7fa08685928224e316458
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4656
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
IMPALA-1326: fix bug in BufferedTupleStream::GetTupleRow()

Change-Id: If133a2041e0bae0c327fe83b114e36b9320784bb
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4658
Tested-by: jenkins
Reviewed-by: Nong Li <nong@cloudera.com>