Add targted-perf query that makes local expr allocations

Change-Id: Ida40481cb429227058d78c619820de23f5c4a15e
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4772
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
Initialize block mgr limit based on the query limit, not current consumption.

This was always the intent and the code is wrong. The process mem tracker
is what is responsible for coordinating across queries.

We see this cause failures in the perf runs when we start up the next query
right after the current one finishes. This happens before the current one
has cleaned up, causing the new query to run with very little memory.

Change-Id: I1e25e55959c14c58789eaa38a122470e14761767
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4769
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
IMPALA-1261: The shell should not strip comments from the query text.

This patch enables the shell to pass query strings as-is to Impala's parser. In order to
preserve previous behaviour, we transform multi-line queries before writing them to
history. We replace EOL with an obscure ascii character (DLE), and re-apply the
transformation when reading it back from history.

Change-Id: I021b9c3d50b03df73bea1afd6ce3ec6b413484e0
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4664
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: jenkins

Conflicts:

	shell/impala_shell.py
IMPALA-1353: Enforce slot equivalences for inline-view tuples.

Correct elimination of redundant join predicates relies on slot
equivalences being enforced at the lowest possible plan node
possibly by generating new predicates. Previously, we only
enforced such equivalences at scan and aggregation nodes which
is insufficient, explained as follows. Equivalences between
slots of an inline view may not be correctly enforced in the
scans/aggs of the inline-view plan if those inline-view slots
point to complex expressions in the underlying view stmt.
We currently cannot reason about equivalences of complex
expressions. As a result, it is possible that inline-view slots
are known to be equivalent but the underlying expressions are
thought to be non-equivalent.

This patch adds enforcement of equivalent inline-view slots
by generating new predicates that are migrated into the
inline-view plan. This way, our existing expression substitution
logic can be used to indirectly reason about the equivalences
of complex expressions that are part of an inline view.

Change-Id: Id38115c90e2c47d65463380a6f8cb1d0f21134b7
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4755
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins

Conflicts:

	fe/src/main/java/com/cloudera/impala/planner/Planner.java
IMPALA-1351: Update NAAJ stream to use io sized buffers and better error handling.

Since we only make one NULL-aware stream per NAAJ (as opposed to one per partition),
we do not care about the memory footprint on this tuple stream. For simplicity,
this will always use io-sized buffers.
Also, improving error handling in PHJ::ProcessProbeBatch(), as status_ was not being
set properly.

Disabling the regression test for this bug, as it takes too long to run. Need to find
a simpler query.

Change-Id: I7572f607199f38b1bc30ae208ece2832522342a1
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4770
Reviewed-by: Ippokratis Pandis <ipandis@cloudera.com>
Tested-by: jenkins

Conflicts:

	be/src/exec/partitioned-hash-join-node.cc