Disable spilling tests that are too flaky.

Change-Id: I4ac877c3fa8297d873c67f219bb0c75f0001562d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4731
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Tested-by: jenkins
IMPALA-1345: Fix C-style comment scanning

Before this change, for C-style comments, the scanner would accept
anything that starts with /* up to the first */ as long as the first
character after /* wasn't * unless all the characters were *.  This was
copied from the jflex manual, but I think the manual just
overcomplicates comment scanning in order to illustrate various ways of
doing things.

Instead, scan anything from /* up to the first */ as a C-style comment.

Add a bunch of test cases, including 3 that fail without this change.

Change-Id: I8e8b02d44fb0deab4f91302196ee93a650972328
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4730
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Tested-by: jenkins
IMPALA-1340: removing implicit casts during expr substitution is not always safe

Union statements were sometimes losing necessary casts during
expression substitution, causing the backend union node to receive
slot refs that did not have the same types as the result tuple. Add a
flag to Expr.Substitute() to preserve the root expr types, which adds
back the casts after substitution.

Currently only the union node sets this flag to true, but there may be
other places that are incorrect.

Change-Id: I1b4d9846860ef9694ff0c089f79654b1746d687d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4705
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
IMPALA-1342: Update outer-join analysis state to accommodate join inversion.

Change-Id: I9f0bb4af78b77a56a144a07ee9ed235711a12655
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4727
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Agg w/o grouping not estimating/reporting the right number of rows.

Change-Id: I63ef99f9c123da1116f94d4f6f413764ff16a518
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4726
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Disable the get_log_once test in the shell.

Will be re-enabled when the fix for getting the whole warning log goes in.

Change-Id: If0209dd45038d36a6a3b2d83da88662ae2cf74c5
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4592
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: Ishaan Joshi <ishaan@cloudera.com>
IMPALA-1348: Fix NAAJ where the null partitions have streams with multiple blocks.

Change-Id: I892f3435814bd4fcddeb496017dbb60704f13419
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4728
Tested-by: jenkins
Reviewed-by: Nong Li <nong@cloudera.com>
IMPALA-1343: Fix chain of left table refs when inverting a join.

Change-Id: Ib509f14d65578e3d8e8cccb015d569cb39e3e8a2
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4736
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins
Change the try/except/finally block to a try/finally block for python 2.4 compatibility.

Change-Id: I21fcbb761c168e2cbaeeae1c3850c97119f75cdd
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4735
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: jenkins
IMPALA-1350: rework symbol resolution

This passes our current UDF tests, and I manually checked that it
fixes the Impyla issue.

Change-Id: I6591c316e4a479b44057e26bed5892a559edbc85
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4741
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
CDH-22170: annotate CHAR and VARCHAR with "UTF8" in Parquet schema

I confirmed that Parquet var/char columns written by Impala can now be
read by Hive.

Change-Id: I14d2fc646835fc5ec0a64e0b93efd6d83511898a
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4749
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
IMPALA-1234: Fix bugs when producing EmptySetNode

Fixes two issues that can occur when generating the plan for a
stmt with an empty result set (e.g. due to limit 0 or constant
predicates that evaluate to false):
 1) Unions with an inline view that produces an empty result set
    does not create the EmptySetNode for the correct stmt.
 2) An EmptySetNode may contain non-materialized tuples which
    will fail a precondition check when generating the thrift
    plan.

Change-Id: I1511c755be3a59fdb8934624fd08250323266d27
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4744
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
IMPALA-1332: Fix memory leak for FULL OUTER/RIGHT OUTER joins.

This can happen if not all rows are returned.

Change-Id: I4d54641b71c44faa85a2138d16f9dda1052317b5
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4737
Tested-by: jenkins
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>