CDH-20211, IMPALA-1152: Ensure that /var/tmp has drwxrwxrwt permissions

Kerberos uses /var/tmp as the location for the replay cache.  If the
permissions aren't such that any user can't write files there,
Kerberos authentication will fail in a manner that is quite difficult
to debug.  This fix will fail to start kerberized daemons if the
permissions aren't correct, and the failure string contains
instructions on how to fix the permissions.

Change-Id: I84a2329b6f311eaccb881bd2f6dc125ba99cb71f
IMPALA-1100: AnalysisException when CTAS has a WITH clause and inline
view

This commit fixes the issue where a CTAS statement with a WITH clause and
an inline view throws an AnalysisException. The problem was that during
the analysis of the WITH clause, the globalState of the analyzer used in
the CTAS was poluted because the same conjuncts were registered multiple
times.

Change-Id: I4f27aeb0f2107d565c80ac9e3eef7d0387865bdc
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4574
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
IMPALA-1271: Query with LAG(...) analytic fn hits DCHECK: ctx->IsArgConstant(2)

Change-Id: I74b4c78944078a9c50935ccc5ade22db09052bad
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4580
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins
BufferedBlockMgr: bug fixes for stress.

Change-Id: I084569e10595fd359c7c83be731c4378156185d4
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4576
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
IMPAL-1312: Fix num_pinned tracking in BufferedTupleStream.

Change-Id: I04264ef25ba8d43826e65f98d34135e7b3593f8b
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4582
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
IMPALA-1299: Analytic should be allows in correlated EXISTS subquery

With this commit we enable correlated and uncorrelated EXISTS
subqueries with grouping and/or aggregation including analytic
functions. Furthermore, we enable correlated EXISTS subqueries
with a LIMIT clause.

Change-Id: I36c33f80b152b7f175bf803cbe920ce1983d7162
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4583
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins
IMPALA-1243: Incorrect plan in analytic using inline view

This fixes the incorrect pushing of predicates into Unions for which at least one operand contains
an analytic expr.

It also adds a TupleDescriptor.debugName_ member variable that makes it easier to read the output
of DescriptorTable.debugString().

Change-Id: Icd50220e711851b8174fdfb53c6b2cd03ca3dcde
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4586
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins
Fix subqueries test for HBase

Change-Id: I8d3c10d29a198135e87ab848ba206c2662166760
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4597
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins