hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject [10/10] hive git commit: HIVE-14390 : Wrong Table alias when CBO is on (Nemon Lou via Pengcheng Xiong, Jesus Camacho Rodriguez)
Date Sat, 06 Aug 2016 23:03:39 GMT
HIVE-14390 : Wrong Table alias when CBO is on (Nemon Lou via Pengcheng Xiong, Jesus Camacho Rodriguez)

Signed-off-by: Ashutosh Chauhan <hashutosh@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/95e788e3
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/95e788e3
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/95e788e3

Branch: refs/heads/master
Commit: 95e788e35ce80047f0ce54ace53ddd0c22b1aec0
Parents: c194577
Author: Nemon Lou <loudongfeng@huawei.com>
Authored: Sat Jul 30 01:37:00 2016 -0800
Committer: Ashutosh Chauhan <hashutosh@apache.org>
Committed: Sat Aug 6 15:49:55 2016 -0700

----------------------------------------------------------------------
 .../calcite/reloperators/HiveTableScan.java     |  2 +-
 .../clientpositive/annotate_stats_join.q.out    |  2 +-
 .../annotate_stats_join_pkfk.q.out              |  8 +--
 .../clientpositive/autoColumnStats_9.q.out      |  4 +-
 .../results/clientpositive/auto_join1.q.out     |  4 +-
 .../results/clientpositive/auto_join16.q.out    |  2 +-
 .../results/clientpositive/auto_join17.q.out    |  6 +-
 .../results/clientpositive/auto_join2.q.out     | 10 +--
 .../results/clientpositive/auto_join22.q.out    |  8 +--
 .../results/clientpositive/auto_join24.q.out    |  2 +-
 .../results/clientpositive/auto_join25.q.out    |  4 +-
 .../results/clientpositive/auto_join3.q.out     | 10 +--
 .../results/clientpositive/auto_join4.q.out     | 10 +--
 .../results/clientpositive/auto_join5.q.out     |  6 +-
 .../results/clientpositive/auto_join6.q.out     |  6 +-
 .../results/clientpositive/auto_join7.q.out     | 12 ++--
 .../results/clientpositive/auto_join8.q.out     |  8 +--
 .../auto_join_reordering_values.q.out           | 12 ++--
 .../clientpositive/auto_join_stats.q.out        | 20 +++---
 .../clientpositive/auto_join_stats2.q.out       |  4 +-
 .../auto_join_without_localtask.q.out           | 50 +++++++-------
 .../clientpositive/auto_sortmerge_join_12.q.out |  6 +-
 .../cbo_SortUnionTransposeRule.q.out            | 24 +++----
 .../results/clientpositive/cbo_input26.q.out    |  8 +--
 .../results/clientpositive/cbo_rp_join1.q.out   |  8 +--
 .../results/clientpositive/constprog2.q.out     |  4 +-
 .../clientpositive/constprog_partitioner.q.out  |  4 +-
 .../clientpositive/correlationoptimizer10.q.out | 16 ++---
 .../clientpositive/correlationoptimizer11.q.out |  8 +--
 .../clientpositive/correlationoptimizer13.q.out |  6 +-
 .../clientpositive/correlationoptimizer15.q.out |  4 +-
 .../clientpositive/correlationoptimizer2.q.out  |  4 +-
 .../clientpositive/correlationoptimizer6.q.out  | 52 +++++++-------
 .../clientpositive/correlationoptimizer7.q.out  | 16 ++---
 .../clientpositive/correlationoptimizer8.q.out  | 12 ++--
 .../clientpositive/correlationoptimizer9.q.out  | 12 ++--
 .../results/clientpositive/cross_join.q.out     | 12 ++--
 .../clientpositive/cross_join_merge.q.out       | 24 +++----
 .../clientpositive/cross_product_check_1.q.out  |  8 +--
 .../clientpositive/cross_product_check_2.q.out  |  8 +--
 .../test/results/clientpositive/cte_mat_3.q.out |  2 +-
 .../test/results/clientpositive/cte_mat_4.q.out |  4 +-
 .../results/clientpositive/decimal_join2.q.out  |  4 +-
 .../results/clientpositive/deleteAnalyze.q.out  |  2 +-
 .../clientpositive/dynamic_rdd_cache.q.out      | 10 +--
 .../clientpositive/explain_logical.q.out        |  8 +--
 .../clientpositive/filter_cond_pushdown.q.out   | 10 +--
 .../clientpositive/filter_join_breaktask.q.out  |  8 +--
 .../clientpositive/groupby_join_pushdown.q.out  | 22 +++---
 .../clientpositive/groupby_position.q.out       |  2 +-
 .../results/clientpositive/groupby_ppd.q.out    |  2 +-
 .../clientpositive/index_auto_self_join.q.out   |  4 +-
 .../clientpositive/infer_bucket_sort.q.out      |  8 +--
 .../infer_bucket_sort_convert_join.q.out        |  4 +-
 .../infer_bucket_sort_merge.q.out               |  4 +-
 .../infer_bucket_sort_reducers_power_two.q.out  |  4 +-
 .../test/results/clientpositive/innerjoin.q.out |  4 +-
 .../test/results/clientpositive/input23.q.out   |  2 +-
 .../test/results/clientpositive/input26.q.out   |  2 +-
 ql/src/test/results/clientpositive/join1.q.out  |  4 +-
 ql/src/test/results/clientpositive/join16.q.out |  2 +-
 ql/src/test/results/clientpositive/join17.q.out |  8 +--
 ql/src/test/results/clientpositive/join19.q.out | 10 +--
 ql/src/test/results/clientpositive/join2.q.out  |  6 +-
 ql/src/test/results/clientpositive/join22.q.out |  4 +-
 ql/src/test/results/clientpositive/join3.q.out  |  6 +-
 .../clientpositive/join32_lessSize.q.out        | 14 ++--
 ql/src/test/results/clientpositive/join34.q.out |  6 +-
 ql/src/test/results/clientpositive/join35.q.out |  6 +-
 ql/src/test/results/clientpositive/join4.q.out  |  6 +-
 ql/src/test/results/clientpositive/join40.q.out |  6 +-
 ql/src/test/results/clientpositive/join41.q.out |  4 +-
 ql/src/test/results/clientpositive/join5.q.out  |  6 +-
 ql/src/test/results/clientpositive/join6.q.out  |  6 +-
 ql/src/test/results/clientpositive/join7.q.out  | 12 ++--
 ql/src/test/results/clientpositive/join8.q.out  |  4 +-
 .../clientpositive/join_alt_syntax.q.out        | 26 +++----
 .../clientpositive/join_cond_pushdown_1.q.out   | 16 ++---
 .../clientpositive/join_cond_pushdown_2.q.out   | 12 ++--
 .../clientpositive/join_cond_pushdown_3.q.out   | 16 ++---
 .../clientpositive/join_cond_pushdown_4.q.out   | 12 ++--
 .../join_cond_pushdown_unqual2.q.out            |  4 +-
 .../join_cond_pushdown_unqual4.q.out            |  4 +-
 .../clientpositive/join_filters_overlap.q.out   | 34 ++++-----
 .../join_merge_multi_expressions.q.out          |  4 +-
 .../results/clientpositive/join_merging.q.out   |  8 +--
 .../results/clientpositive/join_parse.q.out     | 10 +--
 .../test/results/clientpositive/join_vc.q.out   |  6 +-
 .../clientpositive/limit_join_transpose.q.out   | 36 +++++-----
 .../limit_pushdown_negative.q.out               |  2 +-
 .../test/results/clientpositive/lineage1.q.out  |  8 +--
 .../test/results/clientpositive/lineage2.q.out  |  4 +-
 .../test/results/clientpositive/lineage3.q.out  | 10 +--
 .../llap/bucket_map_join_tez1.q.out             | 16 ++---
 .../llap/bucket_map_join_tez2.q.out             |  8 +--
 .../results/clientpositive/llap/cte_mat_3.q.out |  2 +-
 .../results/clientpositive/llap/cte_mat_4.q.out |  4 +-
 .../llap/dynamic_partition_pruning_2.q.out      |  2 +-
 .../llap/hybridgrace_hashjoin_1.q.out           | 24 +++----
 .../clientpositive/llap/llapdecider.q.out       | 12 ++--
 .../test/results/clientpositive/llap/mrr.q.out  |  4 +-
 .../results/clientpositive/llap/orc_llap.q.out  | 10 +--
 .../llap/tez_dynpart_hashjoin_1.q.out           | 12 ++--
 .../llap/tez_dynpart_hashjoin_2.q.out           |  6 +-
 .../clientpositive/llap/tez_join_hash.q.out     |  4 +-
 .../clientpositive/llap/tez_join_tests.q.out    |  2 +-
 .../clientpositive/llap/tez_joins_explain.q.out |  2 +-
 .../clientpositive/llap/tez_self_join.q.out     |  2 +-
 .../results/clientpositive/llap/tez_smb_1.q.out |  2 +-
 .../clientpositive/llap/tez_smb_main.q.out      |  8 +--
 .../results/clientpositive/llap/tez_union.q.out | 46 ++++++-------
 .../llap/tez_vector_dynpart_hashjoin_1.q.out    | 12 ++--
 .../llap/tez_vector_dynpart_hashjoin_2.q.out    |  6 +-
 .../clientpositive/mapjoin_mapjoin.q.out        |  6 +-
 .../clientpositive/mapjoin_memcheck.q.out       |  2 +-
 .../test/results/clientpositive/mergejoin.q.out |  8 +--
 .../results/clientpositive/mergejoins.q.out     |  4 +-
 .../clientpositive/mergejoins_mixed.q.out       | 72 ++++++++++----------
 .../results/clientpositive/metadataonly1.q.out  | 10 +--
 .../results/clientpositive/multiMapJoin2.q.out  | 66 +++++++++---------
 .../results/clientpositive/nonmr_fetch.q.out    |  2 +-
 .../results/clientpositive/optional_outer.q.out | 12 ++--
 .../results/clientpositive/parallel_join1.q.out |  4 +-
 ql/src/test/results/clientpositive/pcr.q.out    |  8 +--
 .../results/clientpositive/perf/query17.q.out   |  4 +-
 .../results/clientpositive/perf/query18.q.out   |  2 +-
 .../results/clientpositive/perf/query25.q.out   |  4 +-
 .../results/clientpositive/perf/query29.q.out   |  4 +-
 .../results/clientpositive/perf/query45.q.out   |  2 +-
 .../results/clientpositive/perf/query46.q.out   |  2 +-
 .../results/clientpositive/perf/query50.q.out   |  2 +-
 .../results/clientpositive/perf/query58.q.out   | 12 ++--
 .../results/clientpositive/perf/query64.q.out   | 24 +++----
 .../results/clientpositive/perf/query68.q.out   |  2 +-
 .../results/clientpositive/perf/query70.q.out   |  6 +-
 .../results/clientpositive/perf/query72.q.out   |  4 +-
 .../results/clientpositive/perf/query85.q.out   |  2 +-
 .../results/clientpositive/perf/query92.q.out   |  2 +-
 .../results/clientpositive/perf/query94.q.out   |  4 +-
 .../results/clientpositive/perf/query95.q.out   |  8 +--
 .../results/clientpositive/pointlookup2.q.out   |  8 +--
 .../results/clientpositive/pointlookup3.q.out   | 16 ++---
 .../test/results/clientpositive/ppd_join5.q.out |  4 +-
 .../clientpositive/ppd_join_filter.q.out        | 16 ++---
 .../clientpositive/ppd_outer_join1.q.out        |  4 +-
 .../clientpositive/ppd_outer_join2.q.out        |  4 +-
 .../clientpositive/ppd_outer_join3.q.out        |  4 +-
 .../clientpositive/ppd_outer_join4.q.out        |  8 +--
 .../clientpositive/ppd_repeated_alias.q.out     |  4 +-
 .../results/clientpositive/ppd_udf_case.q.out   |  4 +-
 .../clientpositive/rcfile_null_value.q.out      |  6 +-
 .../reduce_deduplicate_extended2.q.out          |  6 +-
 .../test/results/clientpositive/regex_col.q.out |  4 +-
 .../runtime_skewjoin_mapjoin_spark.q.out        | 12 ++--
 .../test/results/clientpositive/semijoin4.q.out |  4 +-
 .../test/results/clientpositive/semijoin5.q.out |  4 +-
 .../test/results/clientpositive/skewjoin.q.out  |  4 +-
 .../clientpositive/skewjoin_noskew.q.out        |  2 +-
 .../results/clientpositive/smb_mapjoin_17.q.out |  8 +--
 .../results/clientpositive/smb_mapjoin_25.q.out |  8 +--
 .../spark/annotate_stats_join.q.out             |  2 +-
 .../clientpositive/spark/auto_join1.q.out       |  4 +-
 .../clientpositive/spark/auto_join16.q.out      |  2 +-
 .../clientpositive/spark/auto_join17.q.out      |  6 +-
 .../clientpositive/spark/auto_join2.q.out       |  6 +-
 .../clientpositive/spark/auto_join22.q.out      |  4 +-
 .../clientpositive/spark/auto_join24.q.out      |  2 +-
 .../clientpositive/spark/auto_join3.q.out       |  6 +-
 .../clientpositive/spark/auto_join4.q.out       |  6 +-
 .../clientpositive/spark/auto_join5.q.out       |  6 +-
 .../clientpositive/spark/auto_join6.q.out       |  6 +-
 .../clientpositive/spark/auto_join7.q.out       | 12 ++--
 .../clientpositive/spark/auto_join8.q.out       |  4 +-
 .../spark/auto_join_reordering_values.q.out     | 12 ++--
 .../clientpositive/spark/auto_join_stats.q.out  |  4 +-
 .../clientpositive/spark/auto_join_stats2.q.out |  4 +-
 .../spark/auto_join_without_localtask.q.out     | 10 +--
 .../spark/auto_sortmerge_join_12.q.out          |  4 +-
 .../spark/bucket_map_join_tez1.q.out            | 16 ++---
 .../spark/bucket_map_join_tez2.q.out            |  8 +--
 .../spark/constprog_partitioner.q.out           |  4 +-
 .../clientpositive/spark/cross_join.q.out       | 12 ++--
 .../spark/cross_product_check_1.q.out           |  8 +--
 .../spark/cross_product_check_2.q.out           |  8 +--
 .../spark/dynamic_rdd_cache.q.out               | 58 ++++++++++++++--
 .../spark/filter_join_breaktask.q.out           |  8 +--
 .../clientpositive/spark/groupby_position.q.out |  2 +-
 .../spark/index_auto_self_join.q.out            |  4 +-
 .../spark/infer_bucket_sort_merge.q.out         |  4 +-
 .../infer_bucket_sort_reducers_power_two.q.out  |  4 +-
 .../clientpositive/spark/innerjoin.q.out        |  4 +-
 .../results/clientpositive/spark/join1.q.out    |  4 +-
 .../results/clientpositive/spark/join16.q.out   |  2 +-
 .../results/clientpositive/spark/join17.q.out   |  8 +--
 .../results/clientpositive/spark/join19.q.out   | 10 +--
 .../results/clientpositive/spark/join2.q.out    |  6 +-
 .../results/clientpositive/spark/join22.q.out   | 21 +++++-
 .../results/clientpositive/spark/join3.q.out    |  6 +-
 .../clientpositive/spark/join32_lessSize.q.out  | 12 ++--
 .../results/clientpositive/spark/join34.q.out   |  6 +-
 .../results/clientpositive/spark/join35.q.out   |  6 +-
 .../results/clientpositive/spark/join4.q.out    |  6 +-
 .../results/clientpositive/spark/join41.q.out   |  4 +-
 .../results/clientpositive/spark/join5.q.out    |  6 +-
 .../results/clientpositive/spark/join6.q.out    |  6 +-
 .../results/clientpositive/spark/join7.q.out    | 12 ++--
 .../results/clientpositive/spark/join8.q.out    |  4 +-
 .../clientpositive/spark/join_alt_syntax.q.out  | 26 +++----
 .../spark/join_cond_pushdown_1.q.out            | 16 ++---
 .../spark/join_cond_pushdown_2.q.out            | 12 ++--
 .../spark/join_cond_pushdown_3.q.out            | 16 ++---
 .../spark/join_cond_pushdown_4.q.out            | 12 ++--
 .../spark/join_cond_pushdown_unqual2.q.out      |  4 +-
 .../spark/join_cond_pushdown_unqual4.q.out      |  4 +-
 .../spark/join_filters_overlap.q.out            | 48 ++++++-------
 .../spark/join_merge_multi_expressions.q.out    |  4 +-
 .../clientpositive/spark/join_merging.q.out     |  8 +--
 .../results/clientpositive/spark/join_vc.q.out  |  6 +-
 .../clientpositive/spark/mapjoin_mapjoin.q.out  |  2 +-
 .../clientpositive/spark/mapjoin_memcheck.q.out |  2 +-
 .../clientpositive/spark/mergejoins.q.out       |  4 +-
 .../clientpositive/spark/mergejoins_mixed.q.out | 72 ++++++++++----------
 .../clientpositive/spark/parallel_join1.q.out   |  4 +-
 .../test/results/clientpositive/spark/pcr.q.out |  8 +--
 .../clientpositive/spark/ppd_join5.q.out        |  4 +-
 .../clientpositive/spark/ppd_join_filter.q.out  | 16 ++---
 .../clientpositive/spark/ppd_outer_join1.q.out  |  4 +-
 .../clientpositive/spark/ppd_outer_join2.q.out  |  4 +-
 .../clientpositive/spark/ppd_outer_join3.q.out  |  4 +-
 .../clientpositive/spark/ppd_outer_join4.q.out  |  8 +--
 .../spark/runtime_skewjoin_mapjoin_spark.q.out  |  4 +-
 .../results/clientpositive/spark/skewjoin.q.out |  4 +-
 .../clientpositive/spark/skewjoin_noskew.q.out  |  2 +-
 .../clientpositive/spark/smb_mapjoin_17.q.out   |  8 +--
 .../clientpositive/spark/smb_mapjoin_25.q.out   |  4 +-
 .../clientpositive/spark/subquery_exists.q.out  |  4 +-
 .../clientpositive/spark/subquery_in.q.out      | 10 +--
 .../clientpositive/spark/temp_table_join1.q.out |  4 +-
 .../clientpositive/spark/tez_join_tests.q.out   |  2 +-
 .../spark/tez_joins_explain.q.out               |  2 +-
 .../results/clientpositive/spark/union10.q.out  | 36 +++++++++-
 .../results/clientpositive/spark/union11.q.out  | 42 +++++++++++-
 .../results/clientpositive/spark/union13.q.out  |  2 +-
 .../results/clientpositive/spark/union15.q.out  | 37 +++++++---
 .../results/clientpositive/spark/union2.q.out   | 20 +++++-
 .../results/clientpositive/spark/union20.q.out  | 22 +++++-
 .../results/clientpositive/spark/union25.q.out  | 21 +++++-
 .../results/clientpositive/spark/union32.q.out  |  8 +--
 .../results/clientpositive/spark/union4.q.out   | 18 ++++-
 .../results/clientpositive/spark/union5.q.out   | 22 +++++-
 .../results/clientpositive/spark/union8.q.out   |  4 +-
 .../results/clientpositive/spark/union9.q.out   | 38 ++++++++++-
 .../clientpositive/spark/union_remove_12.q.out  |  8 +--
 .../clientpositive/spark/union_remove_13.q.out  |  8 +--
 .../clientpositive/spark/union_remove_14.q.out  |  8 +--
 .../clientpositive/spark/union_remove_23.q.out  |  8 +--
 .../clientpositive/spark/union_top_level.q.out  |  2 +-
 .../spark/vector_left_outer_join.q.out          |  4 +-
 .../spark/vector_mapjoin_reduce.q.out           |  4 +-
 .../spark/vector_outer_join1.q.out              |  8 +--
 .../spark/vector_outer_join2.q.out              |  4 +-
 .../spark/vector_outer_join3.q.out              | 12 ++--
 .../spark/vector_outer_join4.q.out              |  8 +--
 .../spark/vector_outer_join5.q.out              |  4 +-
 .../spark/vectorized_mapjoin.q.out              |  2 +-
 .../spark/vectorized_nested_mapjoin.q.out       |  4 +-
 .../spark/vectorized_shufflejoin.q.out          |  2 +-
 .../clientpositive/subquery_exists.q.out        |  4 +-
 .../clientpositive/subquery_exists_having.q.out |  4 +-
 .../results/clientpositive/subquery_in.q.out    | 10 +--
 .../clientpositive/subquery_in_having.q.out     | 20 +++---
 .../clientpositive/subquery_notexists.q.out     |  4 +-
 .../subquery_notexists_having.q.out             |  4 +-
 .../results/clientpositive/subquery_notin.q.out | 12 ++--
 .../clientpositive/subquery_notin_having.q.out  | 12 ++--
 .../subquery_unqualcolumnrefs.q.out             | 12 ++--
 .../clientpositive/temp_table_join1.q.out       |  4 +-
 .../results/clientpositive/tez/auto_join1.q.out |  4 +-
 .../tez/auto_sortmerge_join_12.q.out            |  4 +-
 .../tez/bucket_map_join_tez1.q.out              | 16 ++---
 .../tez/bucket_map_join_tez2.q.out              |  8 +--
 .../results/clientpositive/tez/cross_join.q.out | 12 ++--
 .../tez/cross_product_check_1.q.out             |  8 +--
 .../tez/cross_product_check_2.q.out             |  8 +--
 .../results/clientpositive/tez/cte_mat_3.q.out  |  2 +-
 .../results/clientpositive/tez/cte_mat_4.q.out  |  4 +-
 .../clientpositive/tez/deleteAnalyze.q.out      |  2 +-
 .../tez/dynamic_partition_pruning_2.q.out       |  2 +-
 .../clientpositive/tez/explainuser_1.q.out      | 44 ++++++------
 .../clientpositive/tez/explainuser_2.q.out      | 48 ++++++-------
 .../clientpositive/tez/explainuser_4.q.out      | 12 ++--
 .../tez/filter_join_breaktask.q.out             |  8 +--
 .../tez/hybridgrace_hashjoin_1.q.out            | 24 +++----
 .../test/results/clientpositive/tez/join1.q.out |  4 +-
 .../clientpositive/tez/llapdecider.q.out        | 12 ++--
 .../clientpositive/tez/mapjoin_mapjoin.q.out    |  2 +-
 .../results/clientpositive/tez/mergejoin.q.out  |  8 +--
 .../clientpositive/tez/metadataonly1.q.out      |  6 +-
 .../test/results/clientpositive/tez/mrr.q.out   |  4 +-
 .../results/clientpositive/tez/skewjoin.q.out   |  4 +-
 .../clientpositive/tez/subquery_exists.q.out    |  4 +-
 .../clientpositive/tez/subquery_in.q.out        | 10 +--
 .../tez/tez_dynpart_hashjoin_1.q.out            | 12 ++--
 .../tez/tez_dynpart_hashjoin_2.q.out            |  6 +-
 .../clientpositive/tez/tez_join_hash.q.out      |  4 +-
 .../clientpositive/tez/tez_join_tests.q.out     |  2 +-
 .../clientpositive/tez/tez_joins_explain.q.out  |  2 +-
 .../clientpositive/tez/tez_self_join.q.out      |  2 +-
 .../results/clientpositive/tez/tez_smb_1.q.out  |  2 +-
 .../clientpositive/tez/tez_smb_empty.q.out      |  6 +-
 .../clientpositive/tez/tez_smb_main.q.out       |  8 +--
 .../results/clientpositive/tez/tez_union.q.out  | 46 ++++++-------
 .../tez/tez_vector_dynpart_hashjoin_1.q.out     | 12 ++--
 .../tez/tez_vector_dynpart_hashjoin_2.q.out     |  6 +-
 .../results/clientpositive/tez/union2.q.out     |  2 +-
 .../results/clientpositive/tez/union4.q.out     |  2 +-
 .../results/clientpositive/tez/union5.q.out     |  2 +-
 .../results/clientpositive/tez/union8.q.out     |  4 +-
 .../results/clientpositive/tez/union9.q.out     |  4 +-
 .../clientpositive/tez/unionDistinct_1.q.out    | 42 ++++++------
 .../tez/vector_binary_join_groupby.q.out        |  4 +-
 .../tez/vector_char_mapjoin1.q.out              |  2 +-
 .../tez/vector_left_outer_join.q.out            |  4 +-
 .../tez/vector_mapjoin_reduce.q.out             |  4 +-
 .../clientpositive/tez/vector_outer_join1.q.out |  8 +--
 .../clientpositive/tez/vector_outer_join2.q.out |  4 +-
 .../clientpositive/tez/vector_outer_join3.q.out | 12 ++--
 .../clientpositive/tez/vector_outer_join4.q.out |  8 +--
 .../clientpositive/tez/vector_outer_join5.q.out |  4 +-
 .../tez/vector_varchar_mapjoin1.q.out           |  2 +-
 .../clientpositive/tez/vectorized_mapjoin.q.out |  2 +-
 .../tez/vectorized_nested_mapjoin.q.out         |  4 +-
 .../tez/vectorized_shufflejoin.q.out            |  2 +-
 .../udf_case_column_pruning.q.out               |  2 +-
 .../test/results/clientpositive/union10.q.out   |  4 +-
 .../test/results/clientpositive/union11.q.out   |  4 +-
 .../test/results/clientpositive/union13.q.out   |  2 +-
 .../test/results/clientpositive/union15.q.out   |  2 +-
 ql/src/test/results/clientpositive/union2.q.out |  2 +-
 .../test/results/clientpositive/union20.q.out   |  6 +-
 .../test/results/clientpositive/union25.q.out   |  2 +-
 .../test/results/clientpositive/union32.q.out   |  8 +--
 ql/src/test/results/clientpositive/union4.q.out |  2 +-
 ql/src/test/results/clientpositive/union5.q.out |  2 +-
 ql/src/test/results/clientpositive/union8.q.out |  4 +-
 ql/src/test/results/clientpositive/union9.q.out |  4 +-
 .../clientpositive/unionDistinct_1.q.out        | 42 ++++++------
 .../clientpositive/union_remove_12.q.out        | 12 ++--
 .../clientpositive/union_remove_13.q.out        | 12 ++--
 .../clientpositive/union_remove_14.q.out        | 12 ++--
 .../clientpositive/union_remove_23.q.out        |  8 +--
 .../clientpositive/union_top_level.q.out        |  4 +-
 .../vector_binary_join_groupby.q.out            |  4 +-
 .../clientpositive/vector_char_mapjoin1.q.out   |  2 +-
 .../clientpositive/vector_left_outer_join.q.out | 12 ++--
 .../clientpositive/vector_mapjoin_reduce.q.out  |  4 +-
 .../clientpositive/vector_outer_join1.q.out     | 24 +++----
 .../clientpositive/vector_outer_join2.q.out     | 12 ++--
 .../clientpositive/vector_outer_join3.q.out     | 36 +++++-----
 .../clientpositive/vector_outer_join4.q.out     | 24 +++----
 .../clientpositive/vector_outer_join5.q.out     | 12 ++--
 .../vector_varchar_mapjoin1.q.out               |  2 +-
 .../clientpositive/vectorized_mapjoin.q.out     |  2 +-
 .../vectorized_nested_mapjoin.q.out             | 12 ++--
 .../clientpositive/vectorized_shufflejoin.q.out |  2 +-
 365 files changed, 1811 insertions(+), 1534 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveTableScan.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveTableScan.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveTableScan.java
index c9505e4..cccbd2f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveTableScan.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveTableScan.java
@@ -135,7 +135,7 @@ public class HiveTableScan extends TableScan implements HiveRelNode {
       return super.explainTerms(pw)
           .item("qbid:alias", concatQbIDAlias);
     } else {
-      return super.explainTerms(pw);
+      return super.explainTerms(pw).item("table:alias", tblAlias);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/annotate_stats_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/annotate_stats_join.q.out b/ql/src/test/results/clientpositive/annotate_stats_join.q.out
index 0c21c66..2b78e1f 100644
--- a/ql/src/test/results/clientpositive/annotate_stats_join.q.out
+++ b/ql/src/test/results/clientpositive/annotate_stats_join.q.out
@@ -472,7 +472,7 @@ STAGE PLANS:
                   Statistics: Num rows: 6 Data size: 570 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: e
+            alias: e1
             Statistics: Num rows: 48 Data size: 4752 Basic stats: COMPLETE Column stats: COMPLETE
             Filter Operator
               predicate: deptid is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out b/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out
index 224f1ff..6588db2 100644
--- a/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out
+++ b/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out
@@ -628,7 +628,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 12 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
           TableScan
-            alias: s
+            alias: s1
             Statistics: Num rows: 12 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
             Filter Operator
               predicate: s_store_sk is not null (type: boolean)
@@ -714,7 +714,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
           TableScan
-            alias: s
+            alias: s1
             Statistics: Num rows: 12 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
             Filter Operator
               predicate: (s_store_sk > 1000) (type: boolean)
@@ -800,7 +800,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 12 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE
           TableScan
-            alias: s
+            alias: s1
             Statistics: Num rows: 12 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
             Filter Operator
               predicate: s_store_sk is not null (type: boolean)
@@ -886,7 +886,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 12 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
           TableScan
-            alias: s
+            alias: s1
             Statistics: Num rows: 12 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
             Filter Operator
               predicate: s_store_sk is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_9.q.out b/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
index f70aa58..c7582fc 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
@@ -48,7 +48,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -212,7 +212,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest_j1
 POSTHOOK: Lineage: dest_j1.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: desc formatted dest_j1
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@dest_j1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join1.q.out b/ql/src/test/results/clientpositive/auto_join1.q.out
index 7c51b50..1ce2663 100644
--- a/ql/src/test/results/clientpositive/auto_join1.q.out
+++ b/ql/src/test/results/clientpositive/auto_join1.q.out
@@ -52,7 +52,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -108,7 +108,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest_j1
 POSTHOOK: Lineage: dest_j1.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest_j1.key,dest_j1.value)) FROM dest_j1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest_j1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join16.q.out b/ql/src/test/results/clientpositive/auto_join16.q.out
index 51573f1..c4d654a 100644
--- a/ql/src/test/results/clientpositive/auto_join16.q.out
+++ b/ql/src/test/results/clientpositive/auto_join16.q.out
@@ -47,7 +47,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: tab
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 10.0) and (UDFToDouble(key) > 20.0) and (UDFToDouble(value) < 200.0)) (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join17.q.out b/ql/src/test/results/clientpositive/auto_join17.q.out
index f49d81a..d39c36e 100644
--- a/ql/src/test/results/clientpositive/auto_join17.q.out
+++ b/ql/src/test/results/clientpositive/auto_join17.q.out
@@ -48,7 +48,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -104,9 +104,9 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest1
 POSTHOOK: Lineage: dest1.key1 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.key2 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.key2 EXPRESSION [(src)src2.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: dest1.value1 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.value2 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.value2 SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest1.key1,dest1.value1,dest1.key2,dest1.value2)) FROM dest1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join2.q.out b/ql/src/test/results/clientpositive/auto_join2.q.out
index 26d16ee..b17d344 100644
--- a/ql/src/test/results/clientpositive/auto_join2.q.out
+++ b/ql/src/test/results/clientpositive/auto_join2.q.out
@@ -27,7 +27,7 @@ STAGE PLANS:
         $hdt$_0:src1 
           Fetch Operator
             limit: -1
-        $hdt$_2:src1 
+        $hdt$_2:src3 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
@@ -46,9 +46,9 @@ STAGE PLANS:
                   keys:
                     0 _col0 (type: string)
                     1 _col0 (type: string)
-        $hdt$_2:src1 
+        $hdt$_2:src3 
           TableScan
-            alias: src1
+            alias: src3
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -66,7 +66,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -130,7 +130,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest_j2
 POSTHOOK: Lineage: dest_j2.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest_j2.value SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_j2.value SIMPLE [(src)src3.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest_j2.key,dest_j2.value)) FROM dest_j2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest_j2

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join22.q.out b/ql/src/test/results/clientpositive/auto_join22.q.out
index a9fe18c..0700017 100644
--- a/ql/src/test/results/clientpositive/auto_join22.q.out
+++ b/ql/src/test/results/clientpositive/auto_join22.q.out
@@ -13,16 +13,16 @@ STAGE PLANS:
   Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_0:$hdt$_0:$hdt$_0:src4 
+        $hdt$_0:$hdt$_0:$hdt$_0:src1 
           Fetch Operator
             limit: -1
         $hdt$_0:$hdt$_1:src4 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_0:$hdt$_0:$hdt$_0:src4 
+        $hdt$_0:$hdt$_0:$hdt$_0:src1 
           TableScan
-            alias: src4
+            alias: src1
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -55,7 +55,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src4
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join24.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join24.q.out b/ql/src/test/results/clientpositive/auto_join24.q.out
index ec451af..acedf64 100644
--- a/ql/src/test/results/clientpositive/auto_join24.q.out
+++ b/ql/src/test/results/clientpositive/auto_join24.q.out
@@ -57,7 +57,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 309 Data size: 1482 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join25.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join25.q.out b/ql/src/test/results/clientpositive/auto_join25.q.out
index cc9a348..08cbe42 100644
--- a/ql/src/test/results/clientpositive/auto_join25.q.out
+++ b/ql/src/test/results/clientpositive/auto_join25.q.out
@@ -74,7 +74,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest_j2
 POSTHOOK: Lineage: dest_j2.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest_j2.value SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_j2.value SIMPLE [(src)src3.FieldSchema(name:value, type:string, comment:default), ]
 RUN: Stage-11:CONDITIONAL
 RUN: Stage-14:MAPREDLOCAL
 RUN: Stage-1:MAPRED
@@ -115,7 +115,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest_j1
 POSTHOOK: Lineage: dest_j1.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 RUN: Stage-6:CONDITIONAL
 RUN: Stage-7:MAPREDLOCAL
 RUN: Stage-1:MAPRED

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join3.q.out b/ql/src/test/results/clientpositive/auto_join3.q.out
index 6c6c79f..35e8273 100644
--- a/ql/src/test/results/clientpositive/auto_join3.q.out
+++ b/ql/src/test/results/clientpositive/auto_join3.q.out
@@ -27,7 +27,7 @@ STAGE PLANS:
         $hdt$_0:src1 
           Fetch Operator
             limit: -1
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
@@ -47,9 +47,9 @@ STAGE PLANS:
                     0 _col0 (type: string)
                     1 _col0 (type: string)
                     2 _col0 (type: string)
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -68,7 +68,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src3
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -126,7 +126,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest1
 POSTHOOK: Lineage: dest1.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.value SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.value SIMPLE [(src)src3.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest1.key,dest1.value)) FROM dest1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join4.q.out b/ql/src/test/results/clientpositive/auto_join4.q.out
index a4afc7b..eacf056 100644
--- a/ql/src/test/results/clientpositive/auto_join4.q.out
+++ b/ql/src/test/results/clientpositive/auto_join4.q.out
@@ -46,13 +46,13 @@ STAGE PLANS:
   Stage: Stage-5
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 25.0) and (UDFToDouble(key) > 10.0) and (UDFToDouble(key) < 20.0)) (type: boolean)
@@ -149,8 +149,8 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest1
 POSTHOOK: Lineage: dest1.c1 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: dest1.c2 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src2.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest1.c1,dest1.c2,dest1.c3,dest1.c4)) FROM dest1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join5.q.out b/ql/src/test/results/clientpositive/auto_join5.q.out
index bbc23dc..d526595 100644
--- a/ql/src/test/results/clientpositive/auto_join5.q.out
+++ b/ql/src/test/results/clientpositive/auto_join5.q.out
@@ -70,7 +70,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 25.0)) (type: boolean)
@@ -149,8 +149,8 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest1
 POSTHOOK: Lineage: dest1.c1 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: dest1.c2 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src2.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest1.c1,dest1.c2,dest1.c3,dest1.c4)) FROM dest1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join6.q.out b/ql/src/test/results/clientpositive/auto_join6.q.out
index fa0b4ed..53caf7d 100644
--- a/ql/src/test/results/clientpositive/auto_join6.q.out
+++ b/ql/src/test/results/clientpositive/auto_join6.q.out
@@ -62,7 +62,7 @@ STAGE PLANS:
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 25.0)) (type: boolean)
@@ -146,8 +146,8 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest1
 POSTHOOK: Lineage: dest1.c1 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: dest1.c2 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src2.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest1.c1,dest1.c2,dest1.c3,dest1.c4)) FROM dest1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join7.q.out b/ql/src/test/results/clientpositive/auto_join7.q.out
index 58e6298..aec4e82 100644
--- a/ql/src/test/results/clientpositive/auto_join7.q.out
+++ b/ql/src/test/results/clientpositive/auto_join7.q.out
@@ -72,7 +72,7 @@ STAGE PLANS:
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 25.0)) (type: boolean)
@@ -88,7 +88,7 @@ STAGE PLANS:
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: src1
+            alias: src3
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 20.0) and (UDFToDouble(key) < 25.0)) (type: boolean)
@@ -184,10 +184,10 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest1
 POSTHOOK: Lineage: dest1.c1 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: dest1.c2 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c5 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest1.c6 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c3 EXPRESSION [(src)src2.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c5 EXPRESSION [(src)src3.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c6 SIMPLE [(src)src3.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest1.c1,dest1.c2,dest1.c3,dest1.c4,dest1.c5,dest1.c6)) FROM dest1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join8.q.out b/ql/src/test/results/clientpositive/auto_join8.q.out
index 8daa1c5..ccbafba 100644
--- a/ql/src/test/results/clientpositive/auto_join8.q.out
+++ b/ql/src/test/results/clientpositive/auto_join8.q.out
@@ -46,13 +46,13 @@ STAGE PLANS:
   Stage: Stage-5
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 25.0) and (UDFToDouble(key) > 10.0) and (UDFToDouble(key) < 20.0)) (type: boolean)
@@ -153,7 +153,7 @@ POSTHOOK: Output: default@dest1
 POSTHOOK: Lineage: dest1.c1 EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: dest1.c2 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: dest1.c3 EXPRESSION []
-POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest1.c4 SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(dest1.c1,dest1.c2,dest1.c3,dest1.c4)) FROM dest1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest1

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out b/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
index f3f445b..b245706 100644
--- a/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
+++ b/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
@@ -117,7 +117,7 @@ STAGE PLANS:
                   value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int)
                   auto parallelism: false
           TableScan
-            alias: orderpayment
+            alias: dim_pay_date
             Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
@@ -184,7 +184,7 @@ STAGE PLANS:
               name: default.orderpayment_small
             name: default.orderpayment_small
       Truncated Path -> Alias:
-        /orderpayment_small [$hdt$_0:orderpayment, $hdt$_1:orderpayment]
+        /orderpayment_small [$hdt$_0:orderpayment, $hdt$_1:dim_pay_date]
       Needs Tagging: true
       Reduce Operator Tree:
         Join Operator
@@ -228,7 +228,7 @@ STAGE PLANS:
               value expressions: _col2 (type: int), _col3 (type: int), _col4 (type: string)
               auto parallelism: false
           TableScan
-            alias: orderpayment
+            alias: deal
             Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
@@ -315,7 +315,7 @@ STAGE PLANS:
               name: default.orderpayment_small
             name: default.orderpayment_small
       Truncated Path -> Alias:
-        /orderpayment_small [$hdt$_2:orderpayment]
+        /orderpayment_small [$hdt$_2:deal]
 #### A masked pattern was here ####
       Needs Tagging: true
       Reduce Operator Tree:
@@ -360,7 +360,7 @@ STAGE PLANS:
               value expressions: _col3 (type: int), _col4 (type: string), _col5 (type: int)
               auto parallelism: false
           TableScan
-            alias: orderpayment
+            alias: order_city
             Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
@@ -447,7 +447,7 @@ STAGE PLANS:
               name: default.orderpayment_small
             name: default.orderpayment_small
       Truncated Path -> Alias:
-        /orderpayment_small [$hdt$_3:orderpayment]
+        /orderpayment_small [$hdt$_3:order_city]
 #### A masked pattern was here ####
       Needs Tagging: true
       Reduce Operator Tree:

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join_stats.q.out b/ql/src/test/results/clientpositive/auto_join_stats.q.out
index 6a18a02..675179e 100644
--- a/ql/src/test/results/clientpositive/auto_join_stats.q.out
+++ b/ql/src/test/results/clientpositive/auto_join_stats.q.out
@@ -50,13 +50,13 @@ STAGE PLANS:
   Stage: Stage-10
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -172,7 +172,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -217,7 +217,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -311,13 +311,13 @@ STAGE PLANS:
   Stage: Stage-11
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:src1 
+        $hdt$_1:src2 
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -455,7 +455,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -500,7 +500,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join_stats2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join_stats2.q.out b/ql/src/test/results/clientpositive/auto_join_stats2.q.out
index 28fd569..11d7c56 100644
--- a/ql/src/test/results/clientpositive/auto_join_stats2.q.out
+++ b/ql/src/test/results/clientpositive/auto_join_stats2.q.out
@@ -75,7 +75,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -227,7 +227,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_join_without_localtask.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join_without_localtask.q.out b/ql/src/test/results/clientpositive/auto_join_without_localtask.q.out
index 85df1d6..aa6c5a9 100644
--- a/ql/src/test/results/clientpositive/auto_join_without_localtask.q.out
+++ b/ql/src/test/results/clientpositive/auto_join_without_localtask.q.out
@@ -21,13 +21,13 @@ STAGE PLANS:
   Stage: Stage-7
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:a 
+        $hdt$_1:b 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:a 
+        $hdt$_1:b 
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -123,7 +123,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -169,7 +169,7 @@ STAGE PLANS:
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -285,13 +285,13 @@ STAGE PLANS:
   Stage: Stage-14
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:a 
+        $hdt$_1:c 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:a 
+        $hdt$_1:c 
           TableScan
-            alias: a
+            alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
@@ -341,13 +341,13 @@ STAGE PLANS:
   Stage: Stage-12
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_2:a 
+        $hdt$_2:b 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_2:a 
+        $hdt$_2:b 
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -411,7 +411,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -455,7 +455,7 @@ STAGE PLANS:
               Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col1 (type: string)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -512,7 +512,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
@@ -558,7 +558,7 @@ STAGE PLANS:
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: string)
           TableScan
-            alias: a
+            alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
@@ -677,13 +677,13 @@ STAGE PLANS:
   Stage: Stage-14
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_2:a 
+        $hdt$_2:b 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_2:a 
+        $hdt$_2:b 
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (UDFToDouble(key) > 100.0) (type: boolean)
@@ -733,13 +733,13 @@ STAGE PLANS:
   Stage: Stage-12
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_0:a 
+        $hdt$_0:c 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_0:a 
+        $hdt$_0:c 
           TableScan
-            alias: a
+            alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
@@ -803,7 +803,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
@@ -847,7 +847,7 @@ STAGE PLANS:
               Statistics: Num rows: 182 Data size: 1939 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col0 (type: string)
           TableScan
-            alias: a
+            alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
@@ -904,7 +904,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (UDFToDouble(key) > 100.0) (type: boolean)
@@ -950,7 +950,7 @@ STAGE PLANS:
                   Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (UDFToDouble(key) > 100.0) (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out b/ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out
index c31b97e..0a4ffee 100644
--- a/ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out
+++ b/ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out
@@ -252,7 +252,7 @@ STAGE PLANS:
                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                     name: default.bucket_medium
                   name: default.bucket_medium
-        $hdt$_3:b 
+        $hdt$_3:d 
           Fetch Operator
             limit: -1
             Partition Description:
@@ -341,9 +341,9 @@ STAGE PLANS:
                     1 _col0 (type: string)
                     2 _col0 (type: string)
                   Position of Big Table: 2
-        $hdt$_3:b 
+        $hdt$_3:d 
           TableScan
-            alias: b
+            alias: d
             Statistics: Num rows: 1 Data size: 170 Basic stats: PARTIAL Column stats: NONE
             GatherStats: false
             Select Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out b/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
index 7542882..43132d9 100644
--- a/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
+++ b/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
@@ -44,7 +44,7 @@ STAGE PLANS:
                   sort order: +
                   Statistics: Num rows: 20 Data size: 208 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)
@@ -137,7 +137,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)
@@ -199,7 +199,7 @@ STAGE PLANS:
                   Statistics: Num rows: 20 Data size: 208 Basic stats: COMPLETE Column stats: NONE
                   TopN Hash Memory Usage: 0.1
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)
@@ -275,7 +275,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string), value (type: string)
@@ -380,7 +380,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string), value (type: string)
@@ -491,7 +491,7 @@ STAGE PLANS:
                   sort order: +
                   Statistics: Num rows: 20 Data size: 208 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)
@@ -630,7 +630,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)
@@ -755,7 +755,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)
@@ -863,7 +863,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string), value (type: string)
@@ -995,7 +995,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string), value (type: string)
@@ -1106,7 +1106,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)
@@ -1171,7 +1171,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 10 Data size: 104 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/cbo_input26.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_input26.q.out b/ql/src/test/results/clientpositive/cbo_input26.q.out
index ecfcb3f..77fc194 100644
--- a/ql/src/test/results/clientpositive/cbo_input26.q.out
+++ b/ql/src/test/results/clientpositive/cbo_input26.q.out
@@ -90,7 +90,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
               predicate: ((ds = '2008-04-08') and (hr = '14')) (type: boolean)
@@ -246,7 +246,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
               predicate: ((ds = '2008-04-08') and (hr = '14')) (type: boolean)
@@ -402,7 +402,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
               predicate: ((ds = '2008-04-08') and (hr = '14')) (type: boolean)
@@ -557,7 +557,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
               predicate: ((ds = '2008-04-08') and (hr = '14')) (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_join1.q.out b/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
index 9cb9594..695c6d6 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
@@ -43,7 +43,7 @@ STAGE PLANS:
                   Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
@@ -148,7 +148,7 @@ STAGE PLANS:
                   Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
@@ -253,7 +253,7 @@ STAGE PLANS:
                   Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
@@ -358,7 +358,7 @@ STAGE PLANS:
                   Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/constprog2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog2.q.out b/ql/src/test/results/clientpositive/constprog2.q.out
index 88679af..7bfd0cf 100644
--- a/ql/src/test/results/clientpositive/constprog2.q.out
+++ b/ql/src/test/results/clientpositive/constprog2.q.out
@@ -27,7 +27,7 @@ STAGE PLANS:
                   sort order: 
                   Statistics: Num rows: 500 Data size: 5301 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 1000 Data size: 10603 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (86 = key) (type: boolean)
@@ -99,7 +99,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 500 Data size: 5301 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 1000 Data size: 10603 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (UDFToDouble(key) = 86.0) (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/constprog_partitioner.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_partitioner.q.out b/ql/src/test/results/clientpositive/constprog_partitioner.q.out
index 5b212f5..d1016ad 100644
--- a/ql/src/test/results/clientpositive/constprog_partitioner.q.out
+++ b/ql/src/test/results/clientpositive/constprog_partitioner.q.out
@@ -27,7 +27,7 @@ STAGE PLANS:
                   sort order: 
                   Statistics: Num rows: 500 Data size: 5301 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: src1
+            alias: src2
             Statistics: Num rows: 1000 Data size: 10603 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (100 = key) (type: boolean)
@@ -104,7 +104,7 @@ STAGE PLANS:
                   Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: int), _col2 (type: int)
           TableScan
-            alias: li
+            alias: lineitem
             Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((l_shipmode = 'AIR') and (l_linenumber = 1) and l_orderkey is not null) (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer10.q.out b/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
index f0a35b1..81098ea 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
@@ -58,7 +58,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -243,7 +243,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -432,7 +432,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 20.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
@@ -609,7 +609,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) > 20.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
@@ -745,7 +745,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: xx
+            alias: x
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
@@ -760,7 +760,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: xx
+            alias: y
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
@@ -934,7 +934,7 @@ STAGE PLANS:
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: xx
+            alias: x
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
@@ -949,7 +949,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: xx
+            alias: y
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer11.q.out b/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
index e55bac9..70aaa28 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
@@ -83,7 +83,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 100 Data size: 1070 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -211,7 +211,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 100 Data size: 1070 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -328,7 +328,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -467,7 +467,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer13.q.out b/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
index 240c1ad..c3690a5 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
@@ -17,9 +17,9 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@tmp
 POSTHOOK: Lineage: tmp.c1 EXPRESSION [(src)x.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: tmp.c2 EXPRESSION [(src)x.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: tmp.c2 EXPRESSION [(src)y.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tmp.c3 SIMPLE [(src)x.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: tmp.c4 SIMPLE [(src)x.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: tmp.c4 SIMPLE [(src)y.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: -- The query in this file have operators with same set of keys
 -- but having different sorting orders.
 -- Correlation optimizer currently do not optimize this case.
@@ -76,7 +76,7 @@ STAGE PLANS:
                     Statistics: Num rows: 342 Data size: 7639 Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col2 (type: bigint)
           TableScan
-            alias: x
+            alias: x1
             Statistics: Num rows: 1028 Data size: 22964 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((c2 > 100) and (c1 < 120) and c3 is not null) (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/correlationoptimizer15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer15.q.out b/ql/src/test/results/clientpositive/correlationoptimizer15.q.out
index 2ab5257..f5a4c35 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer15.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer15.q.out
@@ -49,7 +49,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -270,7 +270,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: x
+            alias: y
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/95e788e3/ql/src/test/results/clientpositive/correlationoptimizer2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer2.q.out b/ql/src/test/results/clientpositive/correlationoptimizer2.q.out
index c77b6c0..d1f4e05 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer2.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer2.q.out
@@ -2008,7 +2008,7 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: x
+            alias: z
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
@@ -2119,7 +2119,7 @@ STAGE PLANS:
                   Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
-            alias: x
+            alias: z
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)


Mime
View raw message