IMPALA-1212 Accept subquery as LHS or RHS of between operator

This commit fixes the issue where an error was thrown if a subquery was
used in either side of a between predicate. Between predicates with
subqueries are replaced by their corresponding compound predicates
during query rewrite.

Change-Id: I4315a6e91c9306c6817bf6aa6bc1d0b586a1a067
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4246
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins
PA: Update hash table to allocate memory from the block mgr.

Change-Id: I1e34120fbd55a06db839ce54b3ec147badcdeab1
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4243
Tested-by: jenkins
Reviewed-by: Nong Li <nong@cloudera.com>
Wrapping up planning of analytic functions.

This patch adds support for:
- analytic functions in inline views
- analytic functions referencing inline views
- analytic functions in unions
- analytic functions in subqueries/joins
- avoid generating plan for non-materialized analytic exprs
- predicate assignment and propagation onto and through
  analytic eval nodes

Change-Id: I195d32606af670f216b88e1145177fd1d66456eb
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4173
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Renaming counter_update() to more intuitive counter_add()

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