You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by an...@apache.org on 2017/07/12 18:20:19 UTC

[1/4] incubator-trafodion git commit: TRAFODION-2683 add a new explain option to mask variant fields in output

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master d452464be -> bb21ace0b


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/hive/EXPECTED009
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/EXPECTED009 b/core/sql/regress/hive/EXPECTED009
index 45b027e..e771e54 100644
--- a/core/sql/regress/hive/EXPECTED009
+++ b/core/sql/regress/hive/EXPECTED009
@@ -214,7 +214,7 @@ A            B            C
 >>invoke t009hivecust1;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.T009HIVECUST1
--- Definition current  Tue May 16 15:38:03 2017
+-- Definition current  Tue Jul 11 18:13:26 2017
 
   (
     SYSKEY                           LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -263,7 +263,7 @@ A            B            C
 >>invoke t009hivecust2;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.T009HIVECUST2
--- Definition current  Tue May 16 15:38:13 2017
+-- Definition current  Tue Jul 11 18:13:36 2017
 
   (
     SYSKEY                           LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -434,7 +434,7 @@ T009T2
 >>invoke hive.sch_t009.t009t1;
 
 -- Definition of hive table T009T1
--- Definition current  Tue May 16 15:39:45 2017
+-- Definition current  Tue Jul 11 18:14:50 2017
 
   (
     A                                INT
@@ -516,7 +516,7 @@ ROW_ID      COLS
 >>invoke bblike1;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.BBLIKE1
--- Definition current  Tue May 16 15:39:59 2017
+-- Definition current  Tue Jul 11 18:15:03 2017
 
   (
     ROW_ID                           VARCHAR(100) CHARACTER SET ISO88591
@@ -533,7 +533,7 @@ ROW_ID      COLS
 >>invoke bblike2;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.BBLIKE2
--- Definition current  Tue May 16 15:40:04 2017
+-- Definition current  Tue Jul 11 18:15:07 2017
 
   (
     ROW_ID                           VARCHAR(100) CHARACTER SET ISO88591
@@ -572,7 +572,7 @@ ROW_ID      COLS
 >>invoke hive.hive.store_sales;
 
 -- Definition of hive table STORE_SALES
--- Definition current  Tue May 16 15:40:10 2017
+-- Definition current  Tue Jul 11 18:15:13 2017
 
   (
     SS_SOLD_DATE_SK                  INT
@@ -611,32 +611,32 @@ ROW_ID      COLS
 *** WARNING[6008] Statistics for column (SS_ITEM_SK) from table HIVE.HIVE.STORE_SALES were not available. As a result, the access path chosen might not be the best possible.
 
 --- SQL command prepared.
->>explain s;
+>>explain options 'c' s;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... S
-PLAN_ID .................. 212361709210663826
-ROWS_OUT ............. 1,709
-EST_TOTAL_COST ........... 0.27
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select * from store_sales where ss_item_sk = 1;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ............. 1,709
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.27
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 2.77461e+06
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality  1,709
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -674,12 +674,12 @@ DESCRIPTION
 
 HIVE_SCAN =================================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... HIVE.HIVE.STORE_SALES
-REQUESTS_IN .............. 1
-ROWS_OUT ............. 1,709
-EST_OPER_COST ............ 0.27
-EST_TOTAL_COST ........... 0.27
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 2.77461e+06
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -729,25 +729,25 @@ DESCRIPTION
 *** WARNING[6008] Statistics for column (SS_ITEM_SK) from table HIVE.HIVE.STORE_SALES were not available. As a result, the access path chosen might not be the best possible.
 
 --- SQL command prepared.
->>explain options 'f' s;
+>>explain options 'fc' s;
 
 LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ---- ---- ---- --------------------  --------  --------------------  ---------
 
-3    .    4    root                                                  2.92E+006
-1    2    3    nested_join                                           2.92E+006
-.    .    2    hive_scan                       STORE_SALES           2.78E+001
-.    .    1    hive_scan                       CUSTOMER              1.04E+005
+3    .    4    root                                                  1.00E+002
+1    2    3    nested_join                                           1.00E+002
+.    .    2    hive_scan                       STORE_SALES           1.00E+002
+.    .    1    hive_scan                       CUSTOMER              1.00E+002
 
 --- SQL operation complete.
->>explain s;
+>>explain options 'c' s;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... S
-PLAN_ID .................. 212361709210888079
-ROWS_OUT ......... 2,920,643
-EST_TOTAL_COST ........... 1.07
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select *
                            from customer, store_sales
                            where store_sales.ss_item_sk =
@@ -757,19 +757,19 @@ MUST_MATCH ............... forced nested join(forced scan, forced scan)
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 4        ONLY CHILD 3
-REQUESTS_IN .............. 1
-ROWS_OUT ......... 2,920,643
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 1.07
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 2.92064e+06
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinal  2,920,643
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -823,12 +823,12 @@ DESCRIPTION
 
 
 NESTED_JOIN ===============================  SEQ_NO 3        CHILDREN 1, 2
-REQUESTS_IN .............. 1
-ROWS_OUT ......... 2,920,642
-EST_OPER_COST ............ 0.5
-EST_TOTAL_COST ........... 1.07
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 2.92064e+06
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -838,12 +838,12 @@ DESCRIPTION
 
 HIVE_SCAN =================================  SEQ_NO 2        NO CHILDREN
 TABLE_NAME ............... HIVE.HIVE.STORE_SALES
-REQUESTS_IN ........ 104,843
-ROWS/REQUEST ............ 27.86
-EST_OPER_COST ............ 0.55
-EST_TOTAL_COST ........... 0.55
+REQUESTS_IN ............ ###
+ROWS/REQUEST ........... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 2.92064e+06
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -882,12 +882,12 @@ DESCRIPTION
 
 HIVE_SCAN =================================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... HIVE.HIVE.CUSTOMER
-REQUESTS_IN .............. 1
-ROWS_OUT ........... 104,843
-EST_OPER_COST ............ 0.02
-EST_TOTAL_COST ........... 0.02
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ..... 104,843
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -947,7 +947,7 @@ DESCRIPTION
 >>invoke hive.hive.date_dim;
 
 -- Definition of hive table DATE_DIM
--- Definition current  Tue May 16 15:40:16 2017
+-- Definition current  Tue Jul 11 18:15:19 2017
 
   (
     D_DATE_SK                        INT
@@ -1031,7 +1031,7 @@ CREATE TABLE DATE_DIM
 ;
 
 REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.DATE_DIM;
-/* ObjectUID = 24899351381469208 */
+/* ObjectUID = 5537310018384739180 */
 
 /* Trafodion DDL */
 
@@ -1086,14 +1086,14 @@ CREATE EXTERNAL TABLE DATE_DIM
 *** WARNING[6008] Statistics for column (D_DATE) from table HIVE.HIVE.DATE_DIM were not available. As a result, the access path chosen might not be the best possible.
 
 --- SQL command prepared.
->>explain s;
+>>explain options 'c' s;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... S
-PLAN_ID .................. 212361709220931595
-ROWS_OUT ................. 1
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select *
                            from hive.hive.date_dim
                            where d_date = date '2016-01-27';
@@ -1101,19 +1101,19 @@ STATEMENT ................ select *
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality .... 1
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -1152,12 +1152,12 @@ DESCRIPTION
 
 HIVE_SCAN =================================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... HIVE.HIVE.DATE_DIM
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -1182,7 +1182,7 @@ DESCRIPTION
 >>invoke hive.hive.date_dim;
 
 -- Definition of hive table DATE_DIM
--- Definition current  Tue May 16 15:40:28 2017
+-- Definition current  Tue Jul 11 18:15:35 2017
 
   (
     D_DATE_SK                        INT
@@ -1266,7 +1266,7 @@ CREATE TABLE DATE_DIM
 ;
 
 REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.DATE_DIM;
-/* ObjectUID = 24899351381469208 */
+/* ObjectUID = 5537310018384739180 */
 
 /* Trafodion DDL */
 
@@ -1321,14 +1321,14 @@ CREATE EXTERNAL TABLE DATE_DIM
 *** WARNING[6008] Statistics for column (D_DATE) from table HIVE.HIVE.DATE_DIM were not available. As a result, the access path chosen might not be the best possible.
 
 --- SQL command prepared.
->>explain s;
+>>explain options 'c' s;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... S
-PLAN_ID .................. 212361709232113312
-ROWS_OUT ................. 1
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select *
                            from hive.hive.date_dim
                            where d_date = date '2016-01-27';
@@ -1336,19 +1336,19 @@ STATEMENT ................ select *
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality .... 1
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -1387,12 +1387,12 @@ DESCRIPTION
 
 HIVE_SCAN =================================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... HIVE.HIVE.DATE_DIM
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/hive/FILTER009
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/FILTER009 b/core/sql/regress/hive/FILTER009
index 3e46af6..1635dc7 100755
--- a/core/sql/regress/hive/FILTER009
+++ b/core/sql/regress/hive/FILTER009
@@ -28,23 +28,5 @@ if [ "$fil" = "" ]; then
 fi
 
 sed "
-s/^\([ ]*PLAN_ID[ ]*[\.]*\) .*/\1 removed/g
-s/Fragment ID: 0, Length: [0-9]*/Fragment ID: 0, Length: AnyLength/g
-s/^\([ ]*EST_TOTAL_COST[ ]*[\.]*\) .*/EST_TOTAL_COST... removed/g
-s/^\([ ]*EST_OPER_COST[ ]*[\.]*\) .*/EST_OPER_COST... removed/g
-s/^\(ROWS_OUT[ ]*[\.]*\) .*/ROWS_OUT... removed/g
-s/explain_plan_size = [0-9]*/explain_plan_size = removed/g
-s/max_card_est[ ]*[\.]* .*/max_card_est... removed/g
-s/max_max_cardinality[ ]*[\.]* .*/max_max_cardinality... removed/g
-s/max_max_cardinali[ ]*[\.]* .*/max_max_cardinality... removed/g
-s/max_max_cardinal[ ]*[\.]* .*/max_max_cardinality... removed/g
-s/est_memory_per_cpu[ ]*[\.]* .*/est_memory_per_cpu... removed/g
-s/probes[ ]*[\.]* .*/probes... removed/g
-s/duplicated_succ_pr[ ]*[\.]* .*/duplicated_succ_pr... removed/g
-s/rows_accessed[ ]*[\.]* .*/rows_accessed... removed/g
-s/num_cache_entries[ ]* .*/num_cache_entries... removed/g
-s/num_inner_tuples[ ]* .*/num_inner_tuples... removed/g
-s/REQUESTS_IN[ ]*[\.]* .*/REQUESTS_IN... removed/g
-s/ROWS\/REQUEST[ ]*[\.]* .*/ROWS\/REQUESTS... removed/g
 s/\/\* ObjectUID = *[0-9]*/ObjectUID = <UID removed>/g
 " $fil

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/hive/TEST009
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/TEST009 b/core/sql/regress/hive/TEST009
index 23bd036..5edb20b 100755
--- a/core/sql/regress/hive/TEST009
+++ b/core/sql/regress/hive/TEST009
@@ -234,15 +234,15 @@ invoke hive.hive.store_sales;
 
 set schema hive.hive;
 prepare s from select * from store_sales where ss_item_sk = 1;
-explain s;
+explain options 'c' s;
 
 -- join with nested join
 control query shape nested_join(scan(path 'CUSTOMER'), 
       scan(path 'STORE_SALES'));
 prepare s from select * from customer, store_sales 
     where store_sales.ss_item_sk = customer.c_customer_sk;
-explain options 'f' s;
-explain s;
+explain options 'fc' s;
+explain options 'c' s;
 
 control query shape cut;
 set schema trafodion.sch;
@@ -263,7 +263,7 @@ create external table date_dim
 invoke hive.hive.date_dim;
 showddl hive.hive.date_dim;
 prepare s from select * from hive.hive.date_dim where d_date = date '2016-01-27';
-explain s;
+explain options 'c' s;
 
 drop external table if exists date_dim for hive.hive.date_dim;
 create external table date_dim 
@@ -272,7 +272,7 @@ create external table date_dim
 invoke hive.hive.date_dim;
 showddl hive.hive.date_dim;
 prepare s from select * from hive.hive.date_dim where d_date = date '2016-01-27';
-explain s;
+explain options 'c' s;
 
 
 -- error cases

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/DefaultConstants.h b/core/sql/sqlcomp/DefaultConstants.h
index 0dcd690..4cf1842 100644
--- a/core/sql/sqlcomp/DefaultConstants.h
+++ b/core/sql/sqlcomp/DefaultConstants.h
@@ -3912,6 +3912,12 @@ enum DefaultConstants
   // This default is for internal testing usage only and not externalized.
   HIVE_NO_REGISTER_OBJECTS,
 
+  // if set, cleanse output of explain text by filtering values that
+  // may not be deterministic on different systems.
+  // Same as explain format: options 'c'
+  // Used during dev regressions to cleanse explain output.
+  EXPLAIN_OPTION_C,
+
   // This enum constant must be the LAST one in the list; it's a count,
   // not an Attribute (it's not IN DefaultDefaults; it's the SIZE of it)!
   __NUM_DEFAULT_ATTRIBUTES

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index 6e04886..bd90ca0 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -1382,6 +1382,8 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
 
   DDkwd__(EXPLAIN_IN_RMS, 		        "ON"),
 
+  DDkwd__(EXPLAIN_OPTION_C,                     "OFF"),
+
   DDui___(EXPLAIN_OUTPUT_ROW_SIZE,   "80"),
 
   DDui1__(EXPLAIN_ROOT_INPUT_VARS_MAX,           "2000"), // maximum number of inputs that we can tolerate to 
@@ -1391,6 +1393,7 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
   DDkwd__(EXPLAIN_SPACE_OPT, 		        "ON"),
 
   DDkwd__(EXPLAIN_STRATEGIZER_PARAMETERS,  "OFF"),
+
   DDflte_(EX_OP_ALLOCATE_ATP,                   ".02"),
 
   // Calibration


[4/4] incubator-trafodion git commit: PR-1173 [TRAFODION-2683] add a new explain option to mask variant fields in output

Posted by an...@apache.org.
PR-1173 [TRAFODION-2683] add a new explain option to mask variant fields in output


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/bb21ace0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/bb21ace0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/bb21ace0

Branch: refs/heads/master
Commit: bb21ace0b853c7607ef41507c4ebe2bb20dcfc7e
Parents: d452464 b21f2a9
Author: Anoop Sharma <an...@esgyn.com>
Authored: Wed Jul 12 18:20:00 2017 +0000
Committer: Anoop Sharma <an...@esgyn.com>
Committed: Wed Jul 12 18:20:00 2017 +0000

----------------------------------------------------------------------
 core/sql/bin/SqlciErrors.txt            |   2 +-
 core/sql/comexe/ComTdbExeUtil.cpp       |  28 +-
 core/sql/comexe/ComTdbExeUtil.h         |  17 +-
 core/sql/comexe/ComTdbFastTransport.h   |  28 +-
 core/sql/executor/ExExeUtil.h           |   3 +
 core/sql/executor/ExExeUtilExplain.cpp  | 140 +++++++-
 core/sql/executor/ExExeUtilLoad.cpp     |  10 -
 core/sql/executor/ExFastTransport.cpp   | 167 ++-------
 core/sql/executor/ExFastTransport.h     |   3 -
 core/sql/generator/GenExplain.cpp       |   1 +
 core/sql/generator/GenFastTransport.cpp |   3 -
 core/sql/generator/GenRelExeUtil.cpp    |  12 +-
 core/sql/optimizer/RelExeUtil.cpp       | 158 ++++++---
 core/sql/optimizer/RelExeUtil.h         |  34 +-
 core/sql/parser/ParNameLocList.cpp      |   9 +-
 core/sql/parser/sqlparser.y             | 109 +++---
 core/sql/regress/executor/EXPECTED131   | 168 ++++-----
 core/sql/regress/executor/EXPECTED140   | 508 +++++++++++++--------------
 core/sql/regress/executor/FILTER131     |   2 -
 core/sql/regress/executor/FILTER140     |   5 -
 core/sql/regress/executor/TEST131       |   8 +-
 core/sql/regress/executor/TEST140       |  22 +-
 core/sql/regress/hive/EXPECTED009       | 186 +++++-----
 core/sql/regress/hive/EXPECTED018       |  31 --
 core/sql/regress/hive/FILTER009         |  18 -
 core/sql/regress/hive/TEST009           |  10 +-
 core/sql/regress/hive/TEST018           |  13 -
 core/sql/sqlcomp/DefaultConstants.h     |   8 +-
 core/sql/sqlcomp/nadefaults.cpp         |   5 +-
 29 files changed, 849 insertions(+), 859 deletions(-)
----------------------------------------------------------------------



[2/4] incubator-trafodion git commit: TRAFODION-2683 add a new explain option to mask variant fields in output

Posted by an...@apache.org.
TRAFODION-2683 add a new explain option to mask variant fields in output

--Syntax extension to cleanse and mask:
  explain options 'c' select ...
  explain options 'fc' select...
  prepare s from select ...
  explain option 'c' s;

--Masked fields will show up as "###" in explain output.

--Both option and options keyword can be used in explain and showplan.
    -- explain option/options ...
    -- showplan option/options ...

-- showplan can be used on explain statement.

-- Here is an example of what the output will look like:
>>explain option 'c' select * from dual;

----------------------------------------------- PLAN SUMMARY
MODULE_NAME .............. DYNAMICALLY COMPILED
STATEMENT_NAME ........... NOT NAMED
PLAN_ID ................ ###
ROWS_OUT ............... ###
EST_TOTAL_COST ......... ###
STATEMENT ................ select * from dual;

------------------------------------------- NODE LISTING
ROOT ================================  SEQ_NO 2        ONLY CHILD 1
REQUESTS_IN ............ ###
ROWS_OUT ............... ###
EST_OPER_COST .......... ###
EST_TOTAL_COST ......... ###
DESCRIPTION
  max_card_est ......... ###
  fragment_id ............ 0
  parent_frag ............ (none)
  fragment_type .......... master
  statement_index ........ 0
  affinity_value ....... ###
  max_max_cardinality    ###
  total_overflow_size    ###
  xn_access_mode ......... read_only
  xn_autoabort_interval    0
  auto_query_retry ....... enabled
  plan_version ....... 2,600
  embedded_arkcmp ........ used
  select_list ............ %(0)
  input_variables ........ %(0), %(0), %(0)

VALUES ========================  SEQ_NO 1        NO CHILDREN
REQUESTS_IN ............ ###
ROWS_OUT ............... ###
EST_OPER_COST .......... ###
EST_TOTAL_COST ......... ###
DESCRIPTION
  max_card_est ......... ###
  fragment_id ............ 0
  parent_frag ............ (none)
  fragment_type .......... master
  tuple_expr ............. %(0)

--- SQL operation complete.
>>


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/2a520b5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/2a520b5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/2a520b5e

Branch: refs/heads/master
Commit: 2a520b5e75ebfb87672ddd2b1cf100062fad64c2
Parents: 54b7391
Author: Anoop Sharma <an...@esgyn.com>
Authored: Tue Jul 11 19:09:53 2017 +0000
Committer: Anoop Sharma <an...@esgyn.com>
Committed: Tue Jul 11 19:09:53 2017 +0000

----------------------------------------------------------------------
 core/sql/bin/SqlciErrors.txt           |   2 +-
 core/sql/comexe/ComTdbExeUtil.cpp      |  28 +-
 core/sql/comexe/ComTdbExeUtil.h        |  17 +-
 core/sql/executor/ExExeUtil.h          |   3 +
 core/sql/executor/ExExeUtilExplain.cpp | 137 +++++++-
 core/sql/generator/GenExplain.cpp      |   1 +
 core/sql/generator/GenRelExeUtil.cpp   |  11 +-
 core/sql/optimizer/RelExeUtil.cpp      | 158 ++++++---
 core/sql/optimizer/RelExeUtil.h        |  34 +-
 core/sql/parser/ParNameLocList.cpp     |   9 +-
 core/sql/parser/sqlparser.y            | 109 +++---
 core/sql/regress/executor/EXPECTED131  | 168 ++++-----
 core/sql/regress/executor/EXPECTED140  | 508 ++++++++++++++--------------
 core/sql/regress/executor/FILTER131    |   2 -
 core/sql/regress/executor/FILTER140    |   5 -
 core/sql/regress/executor/TEST131      |   8 +-
 core/sql/regress/executor/TEST140      |  22 +-
 core/sql/regress/hive/EXPECTED009      | 186 +++++-----
 core/sql/regress/hive/FILTER009        |  18 -
 core/sql/regress/hive/TEST009          |  10 +-
 core/sql/sqlcomp/DefaultConstants.h    |   6 +
 core/sql/sqlcomp/nadefaults.cpp        |   3 +
 22 files changed, 825 insertions(+), 620 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/bin/SqlciErrors.txt
----------------------------------------------------------------------
diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt
index 4f2acda..828d3f3 100644
--- a/core/sql/bin/SqlciErrors.txt
+++ b/core/sql/bin/SqlciErrors.txt
@@ -2800,7 +2800,7 @@ $3~String1.
 15514 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM The value must be between 1 and 255 for the LIST command.
 15515 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM This command is not allowed because a SELECT is in progress.
 15516 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM This command is allowed only when a SELECT is in progress.
-15517 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM An invalid option was specified.
+15517 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM Specified string $0~string0 contains invalid options or invalid combination of options.
 15518 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM The value must be between 1 and 32767 for LINE_SPACING option.
 15519 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM The current PAGE_LENGTH $0~int0 value is insufficient for the report.  The PAGE_LENGTH should be $1~int1.
 15520 ZZZZZ 99999 MMMMMMMM MMMMM MMMMMMM The column value  $0~string0 is not in the DETAIL list. All TOTAL and SUBTOTAL items must be in the DETAIL list.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/comexe/ComTdbExeUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbExeUtil.cpp b/core/sql/comexe/ComTdbExeUtil.cpp
index 67dbc59..96b2cd2 100644
--- a/core/sql/comexe/ComTdbExeUtil.cpp
+++ b/core/sql/comexe/ComTdbExeUtil.cpp
@@ -120,7 +120,6 @@ ComTdbExeUtilDisplayExplain::ComTdbExeUtilDisplayExplain
  Int16 querycharset,
  char * moduleName,
  char * stmtName,
- char optionX,
  ex_expr * input_expr,
  ULng32 input_rowlen,
  ex_expr * output_expr,
@@ -129,7 +128,7 @@ ComTdbExeUtilDisplayExplain::ComTdbExeUtilDisplayExplain
  const unsigned short work_atp_index,
  Lng32 colDescSize,
  Lng32 outputRowSize,
-  ex_cri_desc * given_cri_desc,
+ ex_cri_desc * given_cri_desc,
  ex_cri_desc * returned_cri_desc,
  queue_index down,
  queue_index up,
@@ -152,22 +151,6 @@ ComTdbExeUtilDisplayExplain::ComTdbExeUtilDisplayExplain
        flags_(0)
 {
   setNodeType(ComTdb::ex_DISPLAY_EXPLAIN);
-
-  setOptionX(optionX);
-}
-
-void ComTdbExeUtilDisplayExplain::setOptionX(char c)    // move from char to mask_
-{
-  flags_ &= OPTION_OFF;                                 // clear in case reused
-  switch(c)
-    {
-      case 'e' : flags_ |= OPTION_E; break;             // expert mode
-      case 'f' : flags_ |= OPTION_F; break;             // summary mode
-      case 'm' : flags_ |= OPTION_M; break;             // machine readable mode
-      case 'n' : flags_ |= OPTION_N; break;             // normal mode
-      default  : assert(c == 'n');                      // always fail, input not supported
-    }
-  return;
 }
 
 Long ComTdbExeUtilDisplayExplain::pack(void * space)
@@ -197,12 +180,9 @@ void ComTdbExeUtilDisplayExplain::displayContents(Space * space,ULng32 flag)
       char buf[100];
       str_sprintf(buf, "\nFor ComTdbExeUtilDisplayExplain :");
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
-      
-      char c = 'm';
-      if (isOptionN()) {c = 'n';}
-      else if (isOptionF()) {c = 'f';}
-      else if (isOptionE()) {c = 'e';}
-      str_sprintf(buf,"optionX_ = %c", c);
+
+      str_sprintf(buf, "optionN = %d, optionF = %d, optionC = %d, optionE = %d, optionM = %d", 
+                  isOptionN(), isOptionF(), isOptionC(), isOptionE(), isOptionM());
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }
   

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/comexe/ComTdbExeUtil.h
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbExeUtil.h b/core/sql/comexe/ComTdbExeUtil.h
index 23e5b2e..5abbf1f 100644
--- a/core/sql/comexe/ComTdbExeUtil.h
+++ b/core/sql/comexe/ComTdbExeUtil.h
@@ -248,7 +248,6 @@ public:
 			      Int16 querycharset,
 			      char * moduleName,
 			      char * stmtName,
-			      char optionX, // explain format desired
 			      ex_expr * input_expr,
 			      ULng32 input_rowlen,
 			      ex_expr * output_expr,
@@ -304,12 +303,22 @@ public:
   // ---------------------------------------------------------------------
   NA_EIDPROC void displayContents(Space *space, ULng32 flag);
 
-  void setOptionX(char c);              // move from char to mask_
-
   NABoolean isOptionE() { return ((flags_ & OPTION_E) != 0); };
   NABoolean isOptionF() { return ((flags_ & OPTION_F) != 0); };
   NABoolean isOptionM() { return ((flags_ & OPTION_M) != 0); };
   NABoolean isOptionN() { return ((flags_ & OPTION_N) != 0); };
+  NABoolean isOptionC() { return ((flags_ & OPTION_C) != 0); };
+
+  void setOptionE(NABoolean v) 
+  {(v ? flags_ |= OPTION_E : flags_ &= ~OPTION_E); };
+  void setOptionF(NABoolean v) 
+  {(v ? flags_ |= OPTION_F : flags_ &= ~OPTION_F); };
+  void setOptionM(NABoolean v) 
+  {(v ? flags_ |= OPTION_M : flags_ &= ~OPTION_M); };
+  void setOptionN(NABoolean v) 
+  {(v ? flags_ |= OPTION_N : flags_ &= ~OPTION_N); };
+  void setOptionC(NABoolean v) 
+  {(v ? flags_ |= OPTION_C : flags_ &= ~OPTION_C); };
 
 private:
   enum OpToFlag
@@ -318,7 +327,7 @@ private:
     OPTION_E      = 0x0002,
     OPTION_M      = 0x0004,
     OPTION_N      = 0x0008,
-    OPTION_OFF    = 0xfff0
+    OPTION_C      = 0x0010
   };
 
   UInt32 flags_;                                      // 00-03

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/executor/ExExeUtil.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtil.h b/core/sql/executor/ExExeUtil.h
index 1567d35..51695c6 100644
--- a/core/sql/executor/ExExeUtil.h
+++ b/core/sql/executor/ExExeUtil.h
@@ -627,6 +627,9 @@ class ExExeUtilDisplayExplainTcb : public ExExeUtilTcb
                     Lng32 &done);
   Lng32  IsNumberFmt(char *fieldptr) const;
   void  FormatFirstLine (void);
+  NABoolean filterKey(
+       const char *key, Lng32 keySize, char * value, char * retVal,
+       Lng32 &decLoc);
   void  FormatLine (const char *key, const char *val, Lng32 keySize, Lng32 valSize,
                     Lng32 indent = 0, Lng32 decLoc = 0);
   void  FormatLongLine (const char *key, char *val, Lng32 keySize, Lng32 valSize,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/executor/ExExeUtilExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilExplain.cpp b/core/sql/executor/ExExeUtilExplain.cpp
index 3e44e3e..537f58e 100644
--- a/core/sql/executor/ExExeUtilExplain.cpp
+++ b/core/sql/executor/ExExeUtilExplain.cpp
@@ -829,6 +829,9 @@ short ExExeUtilDisplayExplainTcb::GetColumns()
                 return EXE_EXPLAIN_BAD_DATA;
             else                // indicator is zero, normal data
             {
+              if (exeUtilTdb().isOptionC())
+                cardinality_ = 100;
+              else
                 cardinality_  = *((float*)ptr);
             }
             break;
@@ -1124,6 +1127,11 @@ void ExExeUtilDisplayExplainTcb::FormatForF()
 	  *current++ = '*';
 	  --remaining_width;
 	}
+      else if (exeUtilTdb().isOptionC())
+	{
+	  *current++ = '#';
+	  --remaining_width;
+	}
       else
 	{
 	  par_proc = str_str(par_proc, " ");
@@ -1289,6 +1297,11 @@ void ExExeUtilDisplayExplainTcb::FormatForF()
 	  *current++ = '*';
 	  --remaining_width;
 	}
+      else if (exeUtilTdb().isOptionC())
+	{
+	  *current++ = '#';
+	  --remaining_width;
+	}
       else{
 	child_proc = str_str(child_proc, " ");
 	if (child_proc != 0)
@@ -1431,6 +1444,11 @@ void ExExeUtilDisplayExplainTcb::FormatForF()
 	  *current++ = '*';
 	  --remaining_width;
 	}
+      else if (exeUtilTdb().isOptionC())
+	{
+	  *current++ = '#';
+	  --remaining_width;
+	}
       else{
 	par_proc = str_str(par_proc, " ");
 	if (par_proc != 0)
@@ -1559,6 +1577,11 @@ void ExExeUtilDisplayExplainTcb::FormatForF()
 	  *current++ = '*';
 	  --remaining_width;
 	}
+      else if (exeUtilTdb().isOptionC())
+	{
+	  *current++ = '#';
+	  --remaining_width;
+	}
       else{
 	child_proc = str_str(child_proc, " ");
 	if (child_proc != 0)
@@ -2164,7 +2187,106 @@ This routine will check for an empty line in the lines_ array and do
 nothing if there is no space.  It will set a "data loss" message in the
 last line if another line is attempted.
 *****/
-void ExExeUtilDisplayExplainTcb::FormatLine(const char *key, const char *val, Lng32 keySize,
+
+typedef struct {
+  const char * key;
+  const char * value;
+} FilterKeyValueStruct;
+const FilterKeyValueStruct filterKeyValue[] =
+  {
+    {"PLAN_ID", "###"},
+    {"ROWS_OUT", "###"},
+    {"EST_OPER_COST", "###"},
+    {"EST_TOTAL_COST", "###"},
+    {"REQUESTS_IN", "###"},
+    {"ROWS/REQUEST", "###"},
+    {"OPERATOR_COST", "###"},
+    {"ROLLUP_COST", "###"},
+    {"max_card_est", "###"},
+    {"max_max_cardinality", "###"},
+    {"total_overflow_size", "###"},
+    {"est_memory_per_cpu", "###"},
+    {"buffer_size", "###"},
+    {"memory_quota", "###"},
+    {"memory_quota_per_esp", "###"},
+    {"memory_limit_per_cpu", "###"},
+    {"cache_size", "###"},
+    {"probes", "###"},
+    {"successful_probes", "###"},
+    {"unique_probes", "###"},
+    {"duplicated_succ_probes", "###"},
+    {"rows_accessed", "###"},
+    {"affinity_value", "###"},
+    {"parent_processes", "###"},
+    {"child_processes", "###"},
+    {"num_cache_entries", "###"},
+    {"num_inner_tuples", "###"},
+    {"ObjectUIDs", "###"},
+    
+  };
+
+NABoolean ExExeUtilDisplayExplainTcb::filterKey(
+     const char *key, Lng32 keySize, char * value, char * retVal,
+     Lng32 &decLoc)
+{
+  if ((! key) || (keySize == 0))
+    return FALSE;
+
+  Int32 maxSize = sizeof(filterKeyValue) / sizeof(FilterKeyValueStruct);
+  
+  for (Int32 i = 0; i < maxSize; i++)
+    {
+      if (strcmp(key, filterKeyValue[i].key) == 0)
+        {
+          strcpy(retVal, filterKeyValue[i].value);
+          decLoc = strlen(filterKeyValue[i].value);
+          return TRUE;
+        }
+    }
+
+  // filter out key of pattern: esp_N_node_map
+  if ((strncmp(key, "esp_", 4) == 0) &&
+      (strstr(key, "_node_map")))
+    {
+      strcpy(retVal, "###");
+      decLoc = 3;
+      return TRUE;
+    }
+  else if ((strcmp(key, "child_partitioning_function") == 0) ||
+           (strcmp(key, "parent_partitioning_function") == 0))
+    {
+      // value for parent func has the form similar to: broadcast N times...
+      // value for child func has form similar to: hash2 partitioned N ways...
+      // Replace numbers in 'value' with '#'
+      Int32 i = 0;
+
+      // if child partitioning starts with hash1 or hash2, skip that token.
+      // We dont want the numbers in 'hash1'/'hash2' to be replaced.
+      if ((strcmp(key, "child_partitioning_function") == 0) &&
+          (strncmp(value, "hash1", 5) == 0) ||
+          (strncmp(value, "hash2", 5) == 0))
+        {
+          memcpy(retVal, value, 5);
+          i += 5;
+        }
+
+      while (i < strlen(value))
+        {
+          if ((value[i] >= '0') && (value[i] <= '9'))
+            retVal[i] = '#';
+          else
+            retVal[i] = value[i];
+          i++;
+        }
+
+      retVal[i] = 0;
+      return TRUE;
+    }
+
+  return FALSE;
+}
+
+void ExExeUtilDisplayExplainTcb::FormatLine(const char *key, const char *inval, Lng32 keySize,
                                             Lng32 valSize, Lng32 indent, Lng32 decLoc)
 {
     char *line;                 // ptr to line to insert
@@ -2174,6 +2296,8 @@ void ExExeUtilDisplayExplainTcb::FormatLine(const char *key, const char *val, Ln
     Lng32  keycut;               // size of keyword col permitted (cut if not zero)
     Lng32  field1;               // space for col 1, keyword
     
+    char valBuf[1000];
+    char * val = (char*)inval;
     // See if we can do anything
     if (cntLines_ >= MLINE) {                   // if output is full
       cnt = (Lng32)str_len(lines_[cntLines_-1]);// size line
@@ -2183,7 +2307,16 @@ void ExExeUtilDisplayExplainTcb::FormatLine(const char *key, const char *val, Ln
     }
     line = lines_[cntLines_];                   // point to empty line, don't change
     temp = line;                                // set working pointer
-    
+
+    if (exeUtilTdb().isOptionC() && key)
+      {
+        if (filterKey(key, keySize, val, valBuf, decLoc))
+          {
+            val = valBuf;
+            valSize = strlen(val);
+          }
+      }
+
     // Do the indent if needed
     if (indent > 0) {
       cnt = indent;                           // don't change input

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/generator/GenExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenExplain.cpp b/core/sql/generator/GenExplain.cpp
index abde591..738d95e 100644
--- a/core/sql/generator/GenExplain.cpp
+++ b/core/sql/generator/GenExplain.cpp
@@ -243,6 +243,7 @@ RelExpr::addExplainInfo(ComTdb * tdb,
     {
       explainTuple->
         setTotalCost((MINOF(rollUpCost->displayTotalCost(), 1e32)).getValue());
+
      // Set detail info for calibration:
       if (explainForCalibration)  
       {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/generator/GenRelExeUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelExeUtil.cpp b/core/sql/generator/GenRelExeUtil.cpp
index 2f39796..21eb027 100644
--- a/core/sql/generator/GenRelExeUtil.cpp
+++ b/core/sql/generator/GenRelExeUtil.cpp
@@ -306,7 +306,7 @@ TrafDesc *ExeUtilDisplayExplain::createVirtualTableDesc()
     (Lng32) CmpCommon::getDefaultNumeric(EXPLAIN_OUTPUT_ROW_SIZE);
   ComTdbVirtTableColumnInfo * vtci = NULL;
   
-  if (optionX_ != 'm')
+  if (NOT isOptionM())
     {
       vtci = ComTdbExeUtilDisplayExplain::getVirtTableOptionXColumnInfo();
       vtci->length = outputRowSize - 1;
@@ -418,7 +418,6 @@ short ExeUtilDisplayExplain::codeGen(Generator * generator)
 	 getStmtTextCharSet(),
 	 moduleName,
 	 stmtName,
-	 optionX_,
 	 0, 0, // no input expr
 	 0, 0, // no output expr
 	 0, 0, // no work cri desc
@@ -428,10 +427,14 @@ short ExeUtilDisplayExplain::codeGen(Generator * generator)
 	 returnedDesc,
 	 (queue_index)8,
 	 (queue_index)1024,
-#pragma nowarn(1506)   // warning elimination 
 	 2, // num buffers
 	 32000); // bufferSIze
-#pragma warn(1506)  // warning elimination 
+
+  exe_util_tdb->setOptionE(isOptionE());
+  exe_util_tdb->setOptionF(isOptionF());
+  exe_util_tdb->setOptionM(isOptionM());
+  exe_util_tdb->setOptionN(isOptionN());
+  exe_util_tdb->setOptionC(isOptionC());
 
   generator->initTdbFields(exe_util_tdb);
   

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/optimizer/RelExeUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/RelExeUtil.cpp b/core/sql/optimizer/RelExeUtil.cpp
index 998c239..ea6574d 100644
--- a/core/sql/optimizer/RelExeUtil.cpp
+++ b/core/sql/optimizer/RelExeUtil.cpp
@@ -1042,7 +1042,8 @@ ExeUtilDisplayExplain::ExeUtilDisplayExplain(
      : ExeUtilExpr(opType, CorrName("DUMMY"), exprNode, NULL,
                    stmtText, stmtTextCharSet, oHeap),
        moduleName_(NULL), stmtName_(NULL),
-       optionX_('n'), optionsStr_(NULL)
+       optionsStr_(NULL),
+       flags_(0)
 {
   if (optionsStr)
     {
@@ -1075,11 +1076,110 @@ RelExpr * ExeUtilDisplayExplain::copyTopNode(RelExpr *derivedNode, CollHeap* out
 					       NULL, getExprNode(),
 					       outHeap);
 
-  result->optionX_ = optionX_;
+  result->flags_ = flags_;
 
   return ExeUtilExpr::copyTopNode(result, outHeap);
 }
 
+short ExeUtilDisplayExplain::setOptionX(char c, Int32 &numOptions)
+{
+  switch(c)
+    {
+    case 'e' : 
+      if (isOptionE())
+        return -1; // already specified
+      flags_ |= OPTION_E; 
+      numOptions++;
+      break;             // expert mode
+    case 'f' : 
+      if (isOptionF())
+        return -1; // already specified
+      flags_ |= OPTION_F; 
+      numOptions++;
+      break;             // formatted summary mode
+    case 'm' : 
+      if (isOptionM())
+        return -1; // already specified
+      flags_ |= OPTION_M; 
+      numOptions++;
+      break;             // machine readable mode
+    case 'n' : 
+      if (isOptionN())
+        return -1; // already specified
+      flags_ |= OPTION_N; 
+      numOptions++;
+      break;             // normal mode
+    case 'c' : 
+      if (isOptionC())
+        return -1; // already specified
+      flags_ |= OPTION_C; 
+      break;             // cleansed mode
+    default  : 
+      return -1; // error
+    }
+
+  return 0;
+}
+
+short ExeUtilDisplayExplain::setOptionsX()
+{
+  Int32 numOptions = 0;
+  if (optionsStr_)
+    {
+      if (strlen(optionsStr_) == 0)
+        return -1; // error, cannot be empty string
+
+      for (Int32 i = 0; i < strlen(optionsStr_); i++)
+        {
+          if (setOptionX(optionsStr_[i], numOptions))
+            return -1;
+        }
+    }
+
+  // nothing specified, set to normal full explain
+  if (numOptions == 0)
+    setOptionX('n', numOptions);
+
+  if (numOptions > 1)
+    return -1; // only one option can be specified
+
+  if ((CmpCommon::getDefault(EXPLAIN_OPTION_C) == DF_ON) &&
+      (isOptionN() || isOptionF()))
+    setOptionX('c', numOptions);
+
+  if ((isOptionC()) && (isOptionE() || isOptionM()))
+    return -1; // 'c' can only be specified with 'n' or 'f'
+  
+  return 0;
+}
+
+RelExpr * ExeUtilDisplayExplain::bindNode(BindWA *bindWA)
+{
+  if (nodeIsBound()) {
+    bindWA->getCurrentScope()->setRETDesc(getRETDesc());
+    return this;
+  }
+
+  RelExpr * boundExpr = NULL;
+
+  if (setOptionsX())
+    {
+      NAString errStr("'");
+      errStr += optionsStr_;
+      errStr += "'";
+      *CmpCommon::diags() << DgSqlCode(-15517)
+                          << DgString0(errStr);
+      bindWA->setErrStatus();
+      return NULL;
+    }
+
+  boundExpr = ExeUtilExpr::bindNode(bindWA);
+  if (bindWA->errStatus()) 
+    return NULL;
+
+  return boundExpr;
+}
+
 // -----------------------------------------------------------------------
 // Member functions for class ExeUtilDisplayExplainComplex
 // -----------------------------------------------------------------------
@@ -3928,60 +4028,6 @@ RelExpr * ExeUtilExpr::bindNode(BindWA *bindWA)
 // -----------------------------------------------------------------------
 // member functions for class ExeUtilDisplayExplain
 // -----------------------------------------------------------------------
-short ExeUtilDisplayExplain::setOptionsX()
-{
-  // optionX_ default set to 'n' by constructor
-  if (optionsStr_)                  // if specified by user, validate and save
-    {
-      char c = optionsStr_[0];      // pick up first char of input
-      if (c != '\0')                // if an option is provided
-        {
-          if (optionsStr_[1] != '\0') {c = '\0'; } // check if more than one, force fail
-        }
-      switch(c)
-        {
-          case 'e' :                // expert mode
-          case 'f' :                // summary mode
-          case 'm' :                // machine readable mode
-          case 'n' :                // normal mode
-            break;
-
-          default  :                // fail all else
-            return -1;
-        }
-      optionX_ = c;                 // it is valid, save it
-    }
-
-  return 0;
-}
-
-RelExpr * ExeUtilDisplayExplain::bindNode(BindWA *bindWA)
-{
-  if (nodeIsBound()) {
-    bindWA->getCurrentScope()->setRETDesc(getRETDesc());
-    return this;
-  }
-
-  RelExpr * boundExpr = NULL;
-
-  if (setOptionsX())
-    {
-      *CmpCommon::diags() << DgSqlCode(-15517);
-      bindWA->setErrStatus();
-
-      return NULL;
-    }
-
-  boundExpr = ExeUtilExpr::bindNode(bindWA);
-  if (bindWA->errStatus()) 
-    return NULL;
-
-  return boundExpr;
-}
-
-// -----------------------------------------------------------------------
-// member functions for class ExeUtilDisplayExplain
-// -----------------------------------------------------------------------
 RelExpr * ExeUtilDisplayExplainComplex::bindNode(BindWA *bindWA)
 {
   return NULL;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/optimizer/RelExeUtil.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/RelExeUtil.h b/core/sql/optimizer/RelExeUtil.h
index 2272f29..0716eb6 100644
--- a/core/sql/optimizer/RelExeUtil.h
+++ b/core/sql/optimizer/RelExeUtil.h
@@ -628,14 +628,46 @@ public:
 
   virtual NABoolean producesOutput() { return TRUE; }
 
+  NABoolean isOptionE() { return ((flags_ & OPTION_E) != 0); };
+  NABoolean isOptionF() { return ((flags_ & OPTION_F) != 0); };
+  NABoolean isOptionM() { return ((flags_ & OPTION_M) != 0); };
+  NABoolean isOptionN() { return ((flags_ & OPTION_N) != 0); };
+
+  // this option is used to cleanse and return deterministic explain output.
+  // when it is set, non-deterministic fields are filtered out and replaced
+  // with a deterministic pattern. Fields like cost or num esps, etc.
+  // Used during traf regressions run with explain/explain_options_f stmts
+  // to cleanse non-deterministic fields, if those fields are not relevant.
+  // Filtererd patterns are discussed in executor/ExExeUtilExplain.cpp.
+  NABoolean isOptionC() { return ((flags_ & OPTION_C) != 0); };
+
 protected:
+  enum OpToFlag
+  {
+    // formatted explain
+    OPTION_F      = 0x0001,
+
+    // expert mode explain
+    OPTION_E      = 0x0002,
+
+    // machine readable explain
+    OPTION_M      = 0x0004,
+
+    // normal full explain
+    OPTION_N      = 0x0008,
+    
+    // cleansed explain
+    OPTION_C      = 0x0010
+  };
+
   short setOptionsX();
+  short setOptionX(char c, Int32 &numOptions);
 
   char * moduleName_;
   char * stmtName_;
   char * optionsStr_;
 
-  char optionX_;                // explain [options 'x'] storage
+  UInt32 flags_;                                  
 };
 
 class ExeUtilDisplayExplainComplex : public ExeUtilDisplayExplain

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/parser/ParNameLocList.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/ParNameLocList.cpp b/core/sql/parser/ParNameLocList.cpp
index 08b7e82..c0e5e58 100644
--- a/core/sql/parser/ParNameLocList.cpp
+++ b/core/sql/parser/ParNameLocList.cpp
@@ -1153,7 +1153,14 @@ void ParSetTextStartPosForDisplayExplain(ParNameLocList * pNameLocList)
   if (c == 0)
     qryStrPos = qryStrPos + strlen("EXPLAIN");
   else
-    qryStrPos = qryStrPos + strlen("'f'");
+    {
+      // At this point, tokStr contains the token that follows the "options"
+      // key word for the stmt "explain options '<str>' ..."
+      // Skip string that follows the "options" keyword
+      char * trailingQ = strchr((char*)tokStr.data()+1, '\'');
+      Int32 len = trailingQ - tokStr.data() + 1;
+      qryStrPos = qryStrPos + len;
+    }
 
   //
   // the position of the left parenthesis token is the starting

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/parser/sqlparser.y
----------------------------------------------------------------------
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index 0c4f87d..c4d59e4 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -2222,7 +2222,7 @@ static void enableMakeQuotedStringISO88591Mechanism()
 %type <stringval>		default_identifier
 %type <stringval>               table_control_identifier
 %type <stringval>		optional_control_identifier
-%type <stringval>               optional_explain_options
+%type <stringval>               optional_options
 %type <exprnodeptrs>		shape_arg_list
 %type <stringval>		shape_identifier
 %type <tokval>			token_shape_identifier
@@ -15238,7 +15238,7 @@ exe_util_get_volatile_info : TOK_GET TOK_ALL TOK_VOLATILE TOK_SCHEMAS
 		 $$ = volSch;
 	       }
 
-explain_starting_tokens : TOK_EXPLAIN optional_explain_options
+explain_starting_tokens : TOK_EXPLAIN optional_options
                                 {
                                   ParNameLocListPtr = new (PARSERHEAP()) 
                                     ParNameLocList ( SQLTEXT()
@@ -17087,8 +17087,11 @@ exe_util_display_explain: explain_starting_tokens interactive_query_expression d
 		}
 
 /* type stringval */
-optional_explain_options : /* empty */
+optional_options : /* empty */
              { $$ = NULL; }
+         | TOK_OPTION QUOTED_STRING
+           /* DEFAULT_CHARSET has no effect on QUOTED_STRING in this context */
+             { $$ = $2; }
          | TOK_OPTIONS QUOTED_STRING
            /* DEFAULT_CHARSET has no effect on QUOTED_STRING in this context */
              { $$ = $2; }
@@ -22861,7 +22864,7 @@ show_statement:
 			      ColReference(new (PARSERHEAP()) ColRefName(TRUE, PARSERHEAP())));
 	     }
 
-	  | TOK_SHOWPLAN options TOK_EXPLAIN interactive_query_expression
+	  | TOK_SHOWPLAN options TOK_EXPLAIN optional_options interactive_query_expression
 	     {
 	       // create a dummy name so as to satisfy the constructor of
 	       // Describe. The tablename param is not used for SHOWPLAN qry.
@@ -33283,53 +33286,57 @@ create_synonym_stmt : TOK_CREATE TOK_SYNONYM
                                }
 
 /* type longint */
-options : /* empty */
-             { $$ = 0x0000000E; }
-         | TOK_OPTION QUOTED_STRING
-             {
-               // DEFAULT_CHARSET has no effect on QUOTED_STRING in this context
-	       Int32 i = 0;
-	       char *str = (char *)$2->data();
-	       ULng32 flag = 0;
-	       while(str[i] != '\0')
-		 {
-		   switch(str[i])
-		     {
-		     case ' ' :  break;
-		     case 'p' :  if (flag & 0x00000002)
-		       YYERROR;
-		     else
-		       flag = flag | 0x00000002;
-		     break;
-		     case 'e' :  if (flag & 0x00000004)
-		       YYERROR;
-		     else
-		       flag = flag | 0x00000004;
-		     break;
-		     case 't' :  if (flag & 0x00000008)
-		       YYERROR;
-		     else
-		       flag = flag | 0x00000008;
-		     break;
-		     case 'n' :  if (flag & 0x00000010)
-		       YYERROR;
-		     else
-		       flag = flag | 0x00000010;
-		     break;
-		     default  :  YYERROR;
-		     }
-		   i++;
-		 }
-	       // if only 'n' option is specified(no regenerate pcode),
-	       // then display everything.
-	       if (flag == 0x10)
-		 {
-		   flag |= 0x0E;
-		 }
-#pragma nowarn(1506)   // warning elimination 
-	       $$ = flag;
-#pragma warn(1506)   // warning elimination 
-	     }
+options : optional_options 
+           {
+             if ($1 == NULL)
+               {
+                 $$ = 0x0000000E;
+               }
+             else 
+               {
+                 // DEFAULT_CHARSET has no effect on QUOTED_STRING in this context
+                 Int32 i = 0;
+                 char *str = (char *)$1->data();
+                 ULng32 flag = 0;
+                 while(str[i] != '\0')
+                   {
+                     switch(str[i])
+                       {
+                       case ' ' :  break;
+                       case 'p' :  if (flag & 0x00000002)
+                           YYERROR;
+                         else
+                           flag = flag | 0x00000002;
+                         break;
+                       case 'e' :  if (flag & 0x00000004)
+                           YYERROR;
+                         else
+                           flag = flag | 0x00000004;
+                         break;
+                       case 't' :  if (flag & 0x00000008)
+                           YYERROR;
+                         else
+                           flag = flag | 0x00000008;
+                         break;
+                       case 'n' :  if (flag & 0x00000010)
+                           YYERROR;
+                         else
+                           flag = flag | 0x00000010;
+                         break;
+                       default  :  YYERROR;
+                       }
+                     i++;
+                   }
+                 // if only 'n' option is specified(no regenerate pcode),
+                 // then display everything.
+                 if (flag == 0x10)
+                   {
+                     flag |= 0x0E;
+                   }
+                 $$ = flag;
+               }
+           }
+
 cpu_identifier : SYSTEM_CPU_IDENTIFIER
                 {
                   $$ = $1;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/executor/EXPECTED131
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED131 b/core/sql/regress/executor/EXPECTED131
index e48e481..eb4185a 100644
--- a/core/sql/regress/executor/EXPECTED131
+++ b/core/sql/regress/executor/EXPECTED131
@@ -66,32 +66,32 @@
 
 --- SQL operation complete.
 >>-- should have small scanner on and endKey populated (JIRA 1446)
->>explain select * from t1311k where uniq >2 and uniq <5;
+>>explain options 'c' select * from t1311k where uniq >2 and uniq <5;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212341123369312144
-ROWS_OUT ................. 3
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select * from t1311k where uniq >2 and uniq <5;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 3
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 3
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality .... 3
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -102,7 +102,7 @@ DESCRIPTION
   SCHEMA ................. T131SCH
   HBASE_SMALL_SCANNER .... SYSTEM
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 2464140936984138637
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.T131SCH.T1311K.UNIQ,
                              TRAFODION.T131SCH.T1311K.C1000,
                              TRAFODION.T131SCH.T1311K.STR1
@@ -110,12 +110,12 @@ DESCRIPTION
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T1311K
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 3
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 3
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -124,41 +124,41 @@ DESCRIPTION
   columns ................ all
   begin_keys(excl) ....... 2
   end_keys(excl) ......... 5
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed .......... 3
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:1
   key_columns ............ UNIQ
   executor_predicates .... (UNIQ > 2) and (UNIQ < 5)
 
 --- SQL operation complete.
->>explain select * from t1311k where uniq >2 and uniq <99;
+>>explain options 'c' select * from t1311k where uniq >2 and uniq <99;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212341123369559929
-ROWS_OUT ................ 97
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select * from t1311k where uniq >2 and uniq <99;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 97
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 97
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 97
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -169,7 +169,7 @@ DESCRIPTION
   SCHEMA ................. T131SCH
   HBASE_SMALL_SCANNER .... SYSTEM
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 2464140936984138637
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.T131SCH.T1311K.UNIQ,
                              TRAFODION.T131SCH.T1311K.C1000,
                              TRAFODION.T131SCH.T1311K.STR1
@@ -177,12 +177,12 @@ DESCRIPTION
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T1311K
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 97
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 97
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -191,9 +191,9 @@ DESCRIPTION
   columns ................ all
   begin_keys(excl) ....... 2
   end_keys(excl) ........ 99
-  cache_size ........... 100
-  probes ................. 1
-  rows_accessed ......... 97
+  cache_size ........... ###
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:1
   key_columns ............ UNIQ
   executor_predicates .... (UNIQ > 2) and (UNIQ < 99)
@@ -312,32 +312,32 @@ UNIQ         C1000
 
 --- 96 row(s) selected.
 >>-- should get Small scanner off since the scanned rows do not fit in 64K block
->>explain select * from t1311k where uniq >2 and uniq <30;
+>>explain options 'c' select * from t1311k where uniq >2 and uniq <30;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212341123369831943
-ROWS_OUT ................ 29
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select * from t1311k where uniq >2 and uniq <30;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 29
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 29
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 29
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -348,7 +348,7 @@ DESCRIPTION
   SCHEMA ................. T131SCH
   HBASE_SMALL_SCANNER .... SYSTEM
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 2464140936984138637
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.T131SCH.T1311K.UNIQ,
                              TRAFODION.T131SCH.T1311K.C1000,
                              TRAFODION.T131SCH.T1311K.STR1
@@ -356,12 +356,12 @@ DESCRIPTION
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T1311K
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 29
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 29
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -370,41 +370,41 @@ DESCRIPTION
   columns ................ all
   begin_keys(excl) ....... 2
   end_keys(excl) ........ 30
-  cache_size ........... 100
-  probes ................. 1
-  rows_accessed ......... 29
+  cache_size ........... ###
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:1
   key_columns ............ UNIQ
   executor_predicates .... (UNIQ > 2) and (UNIQ < 30)
 
 --- SQL operation complete.
 >>-- should get Small scanner on since the scanned rows fit in 128K block
->>explain select * from t1311kbis where uniq >2 and uniq <30;
+>>explain options 'c' select * from t1311kbis where uniq >2 and uniq <30;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212341123371665258
-ROWS_OUT ................ 29
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select * from t1311kbis where uniq >2 and uniq <30;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 29
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 29
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 29
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -415,7 +415,7 @@ DESCRIPTION
   SCHEMA ................. T131SCH
   HBASE_SMALL_SCANNER .... SYSTEM
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 2464140936984140319
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.T131SCH.T1311KBIS.UNIQ,
                              TRAFODION.T131SCH.T1311KBIS.C1000,
                              TRAFODION.T131SCH.T1311KBIS.STR1
@@ -423,12 +423,12 @@ DESCRIPTION
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T1311KBIS
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 29
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 29
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -437,10 +437,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(excl) ....... 2
   end_keys(excl) ........ 30
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ......... 29
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:1
   key_columns ............ UNIQ
   executor_predicates .... (UNIQ > 2) and (UNIQ < 30)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/executor/EXPECTED140
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED140 b/core/sql/regress/executor/EXPECTED140
index 9e508a5..c45d107 100644
--- a/core/sql/regress/executor/EXPECTED140
+++ b/core/sql/regress/executor/EXPECTED140
@@ -124,18 +124,18 @@
 +>  , SS_NET_PROFIT     
 +>from hive.hive.store_sales where ss_sold_date_sk is not null;
 Task:  LOAD            Status: Started    Object: TRAFODION.SCH.T140C
-Task:  CLEANUP         Status: Started    Time: 2017-05-18 19:50:17.884
-Task:  CLEANUP         Status: Ended      Time: 2017-05-18 19:50:17.906
+Task:  CLEANUP         Status: Started    Time: 2017-07-11 18:08:30.847
+Task:  CLEANUP         Status: Ended      Time: 2017-07-11 18:08:30.869
 Task:  CLEANUP         Status: Ended      Elapsed Time:    00:00:00.022
-Task:  LOADING DATA    Status: Started    Time: 2017-05-18 19:50:17.906
+Task:  LOADING DATA    Status: Started    Time: 2017-07-11 18:08:30.869
        Rows Processed: 2750311 
        Error Rows:     0 
-Task:  LOADING DATA    Status: Ended      Time: 2017-05-18 19:50:57.493
-Task:  LOADING DATA    Status: Ended      Elapsed Time:    00:00:39.586
-Task:  COMPLETION      Status: Started    Time: 2017-05-18 19:50:57.493
+Task:  LOADING DATA    Status: Ended      Time: 2017-07-11 18:09:00.406
+Task:  LOADING DATA    Status: Ended      Elapsed Time:    00:00:29.538
+Task:  COMPLETION      Status: Started    Time: 2017-07-11 18:09:00.406
        Rows Loaded:    2750311 
-Task:  COMPLETION      Status: Ended      Time: 2017-05-18 19:50:59.480
-Task:  COMPLETION      Status: Ended      Elapsed Time:    00:00:01.987
+Task:  COMPLETION      Status: Ended      Time: 2017-07-11 18:09:01.113
+Task:  COMPLETION      Status: Ended      Elapsed Time:    00:00:00.706
 
 --- 2750311 row(s) loaded.
 >>update statistics for table t140c on every column sample;
@@ -151,32 +151,32 @@ Task:  COMPLETION      Status: Ended      Elapsed Time:    00:00:01.987
 >>obey TEST140(run);
 >>-- test returned rows with or without adding key column and test of all pushdown functions with null or non null column
 >>-- only one column retrieved
->>explain select a from t140 where b>500;
+>>explain options 'c' select a from t140 where b>500;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897088994366
-ROWS_OUT ................ 33
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select a from t140 where b>500;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 33
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 50
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 33
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -194,18 +194,18 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617040
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140.A
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 33
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 50
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -214,10 +214,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:3
   pushed_down_rpn ........ (#1:4>?)
   key_columns ............ UNIQ, UNIQ2
@@ -237,32 +237,32 @@ A
 
 --- 6 row(s) selected.
 >>--verify that the column retrieved for null handling is not the _SALT_ for optimization of skips, salt being the last physical column
->>explain select an from t140b where b<=200;
+>>explain options 'c' select an from t140b where b<=200;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897089356492
-ROWS_OUT ................ 33
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select an from t140b where b<=200;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 33
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 75
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 33
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -280,18 +280,18 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617402
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140B.AN
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140B
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 33
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 75
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -300,42 +300,42 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:2,#1:6
   pushed_down_rpn ........ (#1:4<=?)
   key_columns ............ _SALT_, UNIQ, UNIQ2
 
 --- SQL operation complete.
 >>-- we should have 2 columns retrieved since an is nullable
->>explain select an from t140 where b<=200;
+>>explain options 'c' select an from t140 where b<=200;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897089555947
-ROWS_OUT ................ 33
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select an from t140 where b<=200;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 33
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 75
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 33
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -353,18 +353,18 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617040
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140.AN
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 33
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 75
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -373,10 +373,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:2,#1:6
   pushed_down_rpn ........ (#1:4<=?)
   key_columns ............ UNIQ, UNIQ2
@@ -394,32 +394,32 @@ AN
 
 --- 4 row(s) selected.
 >>-- should not get back 2 column, only one since predicate says an is not null
->>explain select an from t140 where b=200 and an is not null;
+>>explain options 'c' select an from t140 where b=200 and an is not null;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897089760158
-ROWS_OUT ................ 10
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select an from t140 where b=200 and an is not null;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 10
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 99
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 10
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -437,19 +437,19 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617040
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140.AN
   input_variables ........ %(200)
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 10
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 99
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -458,10 +458,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:6
   pushed_down_rpn ........ (#1:4=?)(#1:6 is_not_null.)AND
   key_columns ............ UNIQ, UNIQ2
@@ -476,32 +476,32 @@ AN
 
 --- 1 row(s) selected.
 >>-- should only get 2 column back since a is not null, no need to add key column
->>explain select an, a from t140 where b!=500;
+>>explain options 'c' select an, a from t140 where b!=500;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897089997296
-ROWS_OUT ................ 67
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select an, a from t140 where b!=500;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 67
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ......... 100
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 67
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -519,18 +519,18 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617040
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140.AN, TRAFODION.SCH.T140.A
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 67
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ......... 100
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -539,10 +539,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:3,#1:6
   pushed_down_rpn ........ (#1:4<?)(#1:4>?)OR
   key_columns ............ UNIQ, UNIQ2
@@ -594,32 +594,32 @@ AN
          13
 
 --- 4 row(s) selected.
->>explain select an from t140 where bn=201 and an is not null;
+>>explain options 'c' select an from t140 where bn=201 and an is not null;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897090271231
-ROWS_OUT ................ 10
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select an from t140 where bn=201 and an is not null;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 10
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 99
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 10
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -637,19 +637,19 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617040
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140.AN
   input_variables ........ %(201)
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 10
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 99
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -658,10 +658,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:6
   pushed_down_rpn ........ (#1:7=.?)(#1:6 is_not_null.)AND
   key_columns ............ UNIQ, UNIQ2
@@ -675,32 +675,32 @@ AN
          21
 
 --- 1 row(s) selected.
->>explain select an, a from t140 where bn!=501;
+>>explain options 'c' select an, a from t140 where bn!=501;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897090489336
-ROWS_OUT ................ 67
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select an, a from t140 where bn!=501;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 67
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ......... 100
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 67
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -718,18 +718,18 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617040
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140.AN, TRAFODION.SCH.T140.A
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 67
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ......... 100
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -738,10 +738,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:3,#1:6
   pushed_down_rpn ........ (#1:7<.?)(#1:7>.?)OR
   key_columns ............ UNIQ, UNIQ2
@@ -808,32 +808,32 @@ A
 
 --- 5 row(s) selected.
 >>-- make sure that we only retrieve one column as an cannot be null in the result set.
->>explain select an from t140 where an between 20 and 40;
+>>explain options 'c' select an from t140 where an between 20 and 40;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897090784717
-ROWS_OUT ................ 11
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select an from t140 where an between 20 and 40;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 11
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 75
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality ... 11
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -851,18 +851,18 @@ DESCRIPTION
   SCHEMA ................. TRAFODION.SCH
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617040
+  ObjectUIDs ........... ###
   select_list ............ TRAFODION.SCH.T140.AN
 
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140
-REQUESTS_IN .............. 1
-ROWS_OUT ................ 11
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est .......... 75
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -871,10 +871,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   small_scanner .......... ON
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:6
   pushed_down_rpn ........ (#1:6>=.?)(#1:6<=.?)AND
   key_columns ............ UNIQ, UNIQ2
@@ -913,32 +913,32 @@ AN
 >>cqd hbase_dop_parallel_scanner '2.0';
 
 --- SQL operation complete.
->>explain select avg(a) from t140b;
+>>explain options 'c' select avg(a) from t140b;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897091104921
-ROWS_OUT ................. 1
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select avg(a) from t140b;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 3        ONLY CHILD 2
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality    100
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -958,19 +958,19 @@ DESCRIPTION
   PARALLEL_NUM_ESPS ...... 1
   HBASE_DOP_PARALLEL_SCAN  2
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617402
+  ObjectUIDs ........... ###
   select_list ............ cast(cast((cast((cast((cast(sum(TRAFODION.SCH.T140B.
                              A)) * 10000 ...0)) / cast(count(1 )))) / 10000
                              ...0)))
 
 
 SORT_SCALAR_AGGR ==========================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -979,12 +979,12 @@ DESCRIPTION
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140B
-REQUESTS_IN .............. 1
-ROWS_OUT ............... 100
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ......... 100
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -993,10 +993,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   parallel_scanner ....... 2
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:3
   key_columns ............ _SALT_, UNIQ, UNIQ2
 
@@ -1013,32 +1013,32 @@ DESCRIPTION
 >>cqd hbase_dop_parallel_scanner '1.0';
 
 --- SQL operation complete.
->>explain select avg(a) from t140b;
+>>explain options 'c' select avg(a) from t140b;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897091443690
-ROWS_OUT ................. 1
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select avg(a) from t140b;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 3        ONLY CHILD 2
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality    100
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -1058,19 +1058,19 @@ DESCRIPTION
   PARALLEL_NUM_ESPS ...... 1
   HBASE_DOP_PARALLEL_SCAN  1
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 3998763283695617402
+  ObjectUIDs ........... ###
   select_list ............ cast(cast((cast((cast((cast(sum(TRAFODION.SCH.T140B.
                              A)) * 10000 ...0)) / cast(count(1 )))) / 10000
                              ...0)))
 
 
 SORT_SCALAR_AGGR ==========================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -1079,12 +1079,12 @@ DESCRIPTION
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140B
-REQUESTS_IN .............. 1
-ROWS_OUT ............... 100
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ......... 100
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -1093,10 +1093,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   parallel_scanner ....... 1
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:3
   key_columns ............ _SALT_, UNIQ, UNIQ2
 
@@ -1109,32 +1109,32 @@ DESCRIPTION
                   45
 
 --- 1 row(s) selected.
->>explain select avg(a) from t140b;
+>>explain options 'c' select avg(a) from t140b;
 
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212361897091569821
-ROWS_OUT ................. 1
-EST_TOTAL_COST ........... 0.01
+PLAN_ID ................ ###
+ROWS_OUT ............... ###
+EST_TOTAL_COST ......... ###
 STATEMENT ................ select avg(a) from t140b;
 
 
 ------------------------------------------------------------------ NODE LISTING
 ROOT ======================================  SEQ_NO 3        ONLY CHILD 2
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
   statement_index ........ 0
-  affinity_value ......... 0
-  max_max_cardinality    100
-  total_overflow_size .... 0.00 KB
+  affinity_value ....... ###
+  max_max_cardinality    ###
+  total_overflow_size    ###
   xn_access_mode ......... read_only
   xn_autoabort_interval    0
   auto_query_retry ....... enabled
@@ -1153,19 +1153,19 @@ DESCRIPTION
   HBASE_SMALL_SCANNER .... OFF
   PARALLEL_NUM_ESPS ...... 1
   HBASE_DOP_PARALLEL_SCAN  1
-  ObjectUIDs ............. 3998763283695617402
+  ObjectUIDs ........... ###
   select_list ............ cast(cast((cast((cast((cast(sum(TRAFODION.SCH.T140B.
                              A)) * 10000 ...0)) / cast(count(1 )))) / 10000
                              ...0)))
 
 
 SORT_SCALAR_AGGR ==========================  SEQ_NO 2        ONLY CHILD 1
-REQUESTS_IN .............. 1
-ROWS_OUT ................. 1
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ........... 1
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -1174,12 +1174,12 @@ DESCRIPTION
 
 TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... T140B
-REQUESTS_IN .............. 1
-ROWS_OUT ............... 100
-EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ........... 0.01
+REQUESTS_IN ............ ###
+ROWS_OUT ............... ###
+EST_OPER_COST .......... ###
+EST_TOTAL_COST ......... ###
 DESCRIPTION
-  max_card_est ......... 100
+  max_card_est ......... ###
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
@@ -1188,10 +1188,10 @@ DESCRIPTION
   columns ................ all
   begin_keys(incl)
   end_keys(incl)
-  cache_size ........... 100
+  cache_size ........... ###
   parallel_scanner ....... 1
-  probes ................. 1
-  rows_accessed ........ 100
+  probes ............... ###
+  rows_accessed ........ ###
   column_retrieved ....... #1:3
   key_columns ............ _SALT_, UNIQ, UNIQ2
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/executor/FILTER131
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/FILTER131 b/core/sql/regress/executor/FILTER131
index 4a9a7ef..8b2a15e 100755
--- a/core/sql/regress/executor/FILTER131
+++ b/core/sql/regress/executor/FILTER131
@@ -25,7 +25,5 @@
 
 fil=$1
 sed "
-s/^\([ ]*PLAN_ID[ ]*[\.]*\) .*/\1 removed/g
-s/^\([ ]*ObjectUIDs[ ]*[\.]*\) .*/\1 removed/g
 " $fil
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/executor/FILTER140
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/FILTER140 b/core/sql/regress/executor/FILTER140
index 9363956..f396578 100755
--- a/core/sql/regress/executor/FILTER140
+++ b/core/sql/regress/executor/FILTER140
@@ -25,9 +25,6 @@
 
 fil=$1
 sed "
-s/^\([ ]*affinity_value[ ]*[\.]*\) .*/affinity_value removed/g
-s/^\([ ]*max_max_cardinality[ ]*[\.]*\) .*/max_max_cardinality removed/g
-s/^\([ ]*PLAN_ID[ ]*[\.]*\) .*/\1 removed/g
 s/^\([ ]*HBASE_PORT[ ]*[\.]*\) .*/ HBASE_PORT........ removed/g
 s/^\([ ]*HBASE_SERVER[ ]*[\.]*\) .*/\1 removed/g
 s/^\([ ]*HBASE_INTERFACE[ ]*[\.]*\) .*/\1 removed/g
@@ -36,8 +33,6 @@ s/^\([ ]*HBASE_FILTER_PREDS[ ]*[\.]*\) .*/\1 removed/g
 s/^\([ ]*TRAF_ALIGNED_ROW_FORMAT[ ]*[\.]*\) .*/\1 removed/g
 s/^\([ ]*TRAF_INDEX_CREATE_OPT[ ]*[\.]*\) .*/\1 removed/g
 s/^\([ ]*embedded_arkcmp[ ]*[\.]*\) .*/\1 removed/g
-s/^\([ ]*EST_TOTAL_COST[ ]*[\.]*\) .*/\1 removed/g
-s/^\([ ]*EST_OPER_COST[ ]*[\.]*\) .*/\1 removed/g
 s/^\(\.*PREPARATION[ ]Status:[ ]*\) .*/removed/g
 s/^\([ ]*Task:[ ]COMPLETION[ ]Status:[ ]*\) .*/removed/g
 s/.*PREPARATION.*/removed/

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/executor/TEST131
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/TEST131 b/core/sql/regress/executor/TEST131
index 2d812c5..0d7d4dd 100644
--- a/core/sql/regress/executor/TEST131
+++ b/core/sql/regress/executor/TEST131
@@ -90,12 +90,12 @@ set schema t131sch;
 -- suspect this is because histogram is cached per session and we are starting a new session, reloading Histogram...
 cqd hbase_small_scanner 'SYSTEM';
 -- should have small scanner on and endKey populated (JIRA 1446)
-explain select * from t1311k where uniq >2 and uniq <5;
-explain select * from t1311k where uniq >2 and uniq <99;
+explain options 'c' select * from t1311k where uniq >2 and uniq <5;
+explain options 'c' select * from t1311k where uniq >2 and uniq <99;
 select uniq, c1000 from t1311k where uniq >2 and uniq <5;
 select uniq, c1000 from t1311k where uniq >2 and uniq <99;
 -- should get Small scanner off since the scanned rows do not fit in 64K block
-explain select * from t1311k where uniq >2 and uniq <30;
+explain options 'c' select * from t1311k where uniq >2 and uniq <30;
 -- should get Small scanner on since the scanned rows fit in 128K block
-explain select * from t1311kbis where uniq >2 and uniq <30;
+explain options 'c' select * from t1311kbis where uniq >2 and uniq <30;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a520b5e/core/sql/regress/executor/TEST140
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/TEST140 b/core/sql/regress/executor/TEST140
index 06313c7..3b08cd0 100644
--- a/core/sql/regress/executor/TEST140
+++ b/core/sql/regress/executor/TEST140
@@ -143,31 +143,31 @@ cqd cache_histograms_in_kb reset;
 ?section run
 -- test returned rows with or without adding key column and test of all pushdown functions with null or non null column
 -- only one column retrieved
-explain select a from t140 where b>500;
+explain options 'c' select a from t140 where b>500;
 select a from t140 where b>=500;
 --verify that the column retrieved for null handling is not the _SALT_ for optimization of skips, salt being the last physical column
-explain select an from t140b where b<=200;
+explain options 'c' select an from t140b where b<=200;
 -- we should have 2 columns retrieved since an is nullable
-explain select an from t140 where b<=200;
+explain options 'c' select an from t140 where b<=200;
 select an from t140 where b<=200;
 -- should not get back 2 column, only one since predicate says an is not null
-explain select an from t140 where b=200 and an is not null;
+explain options 'c' select an from t140 where b=200 and an is not null;
 select an from t140 where b=200 and an is not null;
 -- should only get 2 column back since a is not null, no need to add key column
-explain select an, a from t140 where b!=500;
+explain options 'c' select an, a from t140 where b!=500;
 select an, a from t140 where b!=500;
 -- see if we handle null logic correctly
 select a from t140 where bn>=501;
 select an from t140 where bn<=201;
-explain select an from t140 where bn=201 and an is not null;
+explain options 'c' select an from t140 where bn=201 and an is not null;
 select an from t140 where bn=201 and an is not null;
-explain select an, a from t140 where bn!=501;
+explain options 'c' select an, a from t140 where bn!=501;
 select an, a from t140 where bn!=501;
 select a from t140 where an is null;
 select a from t140 where an is not null;
 select a from t140 where a between 20 and 40;
 -- make sure that we only retrieve one column as an cannot be null in the result set.
-explain select an from t140 where an between 20 and 40;
+explain options 'c' select an from t140 where an between 20 and 40;
 select an from t140 where an between 20 and 40;
 select an from t140 where an in (21,41,51,61,10);
 
@@ -177,13 +177,13 @@ cqd hbase_small_scanner 'OFF';
 cqd parallel_num_esps '1';
 -- force 2 threads
 cqd hbase_dop_parallel_scanner '2.0';
-explain select avg(a) from t140b;
+explain options 'c' select avg(a) from t140b;
 select avg(a) from t140b;
 -- force 100% of threads (with 2 partition this is 2 threads)
 cqd hbase_dop_parallel_scanner '1.0';
-explain select avg(a) from t140b;
+explain options 'c' select avg(a) from t140b;
 select avg(a) from t140b;
-explain select avg(a) from t140b;
+explain options 'c' select avg(a) from t140b;
 select avg(a) from t140b;
 cqd parallel_num_esps '1';
 cqd hbase_dop_parallel_scanner '1.0';


[3/4] incubator-trafodion git commit: removed obsolete code that used libhdfs to write to hive/text files

Posted by an...@apache.org.
removed obsolete code that used libhdfs to write to hive/text files

Traf had code to write to hive/text files using direct libhdfs
interface from C or through java interface. hive/sequence files
were added later and they are written using java interface.
libhdfs code was made obsolete a while back and is no longer used.
That code has now been removed.
Traf now uses common java interface to write to hive/text and
hive/sequence files.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/b21f2a94
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/b21f2a94
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/b21f2a94

Branch: refs/heads/master
Commit: b21f2a946dc00ffade5d7f7e7452f3a5cdf6fd24
Parents: 2a520b5
Author: Anoop Sharma <an...@esgyn.com>
Authored: Wed Jul 12 00:32:17 2017 +0000
Committer: Anoop Sharma <an...@esgyn.com>
Committed: Wed Jul 12 00:32:17 2017 +0000

----------------------------------------------------------------------
 core/sql/comexe/ComTdbFastTransport.h   |  28 +----
 core/sql/executor/ExExeUtilExplain.cpp  |   3 +
 core/sql/executor/ExExeUtilLoad.cpp     |  10 --
 core/sql/executor/ExFastTransport.cpp   | 167 ++++-----------------------
 core/sql/executor/ExFastTransport.h     |   3 -
 core/sql/generator/GenFastTransport.cpp |   3 -
 core/sql/generator/GenRelExeUtil.cpp    |   1 -
 core/sql/regress/hive/EXPECTED018       |  31 -----
 core/sql/regress/hive/TEST018           |  13 ---
 core/sql/sqlcomp/DefaultConstants.h     |   2 -
 core/sql/sqlcomp/nadefaults.cpp         |   2 -
 11 files changed, 24 insertions(+), 239 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/comexe/ComTdbFastTransport.h
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbFastTransport.h b/core/sql/comexe/ComTdbFastTransport.h
index 4b4146c..a63290b 100644
--- a/core/sql/comexe/ComTdbFastTransport.h
+++ b/core/sql/comexe/ComTdbFastTransport.h
@@ -71,9 +71,7 @@ public:
     SEQUENCE_FILE               = 0x0080,
     PRINT_DIAGS                 = 0x0100,
     HDFS_COMPRESSED             = 0x0200,
-    SKIP_WRITING_TO_FILES       = 0x0400,
-    BYPASS_LIBHDFS              = 0x0800,
-    CONTINUE_ON_ERROR           = 0x1000
+    CONTINUE_ON_ERROR           = 0x0400
   };
 
   ComTdbFastExtract ()
@@ -342,30 +340,6 @@ public:
     return ((flags_ & HDFS_COMPRESSED) != 0);
   }
   ;
-  void setSkipWritingToFiles(UInt32 value)
-  {
-    if (value)
-      flags_ |= SKIP_WRITING_TO_FILES;
-    else
-      flags_ &= ~SKIP_WRITING_TO_FILES;
-  }
-  NABoolean getSkipWritingToFiles() const
-  {
-    return ((flags_ & SKIP_WRITING_TO_FILES) != 0);
-  }
-  ;
-  void setBypassLibhdfs(UInt32 value)
-  {
-    if (value)
-      flags_ |= BYPASS_LIBHDFS;
-    else
-      flags_ &= ~BYPASS_LIBHDFS;
-  }
-  NABoolean getBypassLibhdfs() const
-  {
-    return ((flags_ & BYPASS_LIBHDFS) != 0);
-  }
-
   void setContinueOnError(NABoolean value)
   { value ? flags_ |= CONTINUE_ON_ERROR : flags_ &= ~CONTINUE_ON_ERROR; }
   NABoolean getContinueOnError() const

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/executor/ExExeUtilExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilExplain.cpp b/core/sql/executor/ExExeUtilExplain.cpp
index 537f58e..2880435 100644
--- a/core/sql/executor/ExExeUtilExplain.cpp
+++ b/core/sql/executor/ExExeUtilExplain.cpp
@@ -2205,10 +2205,13 @@ const FilterKeyValueStruct filterKeyValue[] =
     {"max_card_est", "###"},
     {"max_max_cardinality", "###"},
     {"total_overflow_size", "###"},
+    {"est_memory_per_node", "###"},
     {"est_memory_per_cpu", "###"},
+    {"est_memory_per_instance", "###"},
     {"buffer_size", "###"},
     {"memory_quota", "###"},
     {"memory_quota_per_esp", "###"},
+    {"memory_quota_per_instance", "###"},
     {"memory_limit_per_cpu", "###"},
     {"cache_size", "###"},
     {"probes", "###"},

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/executor/ExExeUtilLoad.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilLoad.cpp b/core/sql/executor/ExExeUtilLoad.cpp
index c7129a9..dfbbac4 100644
--- a/core/sql/executor/ExExeUtilLoad.cpp
+++ b/core/sql/executor/ExExeUtilLoad.cpp
@@ -2242,11 +2242,6 @@ short ExExeUtilHBaseBulkUnLoadTcb::work()
         step_ = UNLOAD_END_ERROR_;
         break;
       }
-      if (holdAndSetCQD("TRAF_UNLOAD_BYPASS_LIBHDFS", "ON") < 0)
-      {
-        step_ = UNLOAD_END_ERROR_;
-        break;
-      }
       if (hblTdb().getSkipWriteToFiles())
       {
         setEmptyTarget(FALSE);
@@ -2495,11 +2490,6 @@ short ExExeUtilHBaseBulkUnLoadTcb::work()
         step_ = UNLOAD_ERROR_;
         break;
       }
-      if (restoreCQD("TRAF_UNLOAD_BYPASS_LIBHDFS") < 0)
-      {
-        step_ = UNLOAD_ERROR_;
-        break;
-      }
       if ( restoreCQD("TRAF_UNLOAD_HDFS_COMPRESS") < 0)
       {
         step_ = UNLOAD_ERROR_;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/executor/ExFastTransport.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExFastTransport.cpp b/core/sql/executor/ExFastTransport.cpp
index 12ff6ee..5d3b9ec 100644
--- a/core/sql/executor/ExFastTransport.cpp
+++ b/core/sql/executor/ExFastTransport.cpp
@@ -433,54 +433,6 @@ ExOperStats * ExFastExtractTcb::doAllocateStatsEntry(
                                          tdb);
   }
 }
-///////////////////////////////////
-///////////////////////////////////
-
-Lng32 ExHdfsFastExtractTcb::lobInterfaceInsert(ssize_t bytesToWrite)
-{
-  Int64 requestTag = 0;
-  Int64 descSyskey = 0;
-  return ExpLOBInterfaceInsert(lobGlob_,
-      fileName_,
-      targetLocation_,
-      (Lng32)Lob_External_HDFS_File,
-      hdfsHost_,
-      hdfsPort_,
-      0,
-      NULL,  //lobHandle == NULL -->simpleInsert
-      NULL,
-      NULL,
-      0,
-      NULL,
-      requestTag,
-      0,
-      descSyskey,
-      Lob_InsertDataSimple,
-      NULL,
-      Lob_None,//LobsSubOper so
-      1,  //waitedOp
-      currBuffer_->data_,
-      bytesToWrite,
-      0,     //bufferSize
-      myTdb().getHdfsReplication(),     //replication
-      0      //blockSize
-      );
-}
-
-Lng32 ExHdfsFastExtractTcb::lobInterfaceCreate()
-{
-  return   ExpLOBinterfaceCreate(lobGlob_,
-      fileName_,
-      targetLocation_,
-      (Lng32)Lob_External_HDFS_File,
-      hdfsHost_,
-      hdfsPort_,
-      0, //bufferSize -- 0 --> use default
-      myTdb().getHdfsReplication(), //replication
-      0 //bloclSize --0 -->use default
-      );
-
-}
 
 Lng32 ExHdfsFastExtractTcb::lobInterfaceDataModCheck
 (Int64 &failedModTS,
@@ -498,19 +450,6 @@ Lng32 ExHdfsFastExtractTcb::lobInterfaceDataModCheck
 }
 
 
-Lng32 ExHdfsFastExtractTcb::lobInterfaceClose()
-{
-  return
-      ExpLOBinterfaceCloseFile
-      (lobGlob_,
-       fileName_,
-       NULL, //(char*)"",
-       (Lng32)Lob_External_HDFS_File,
-       hdfsHost_,
-       hdfsPort_);
-
-}
-
 ExHdfsFastExtractTcb::ExHdfsFastExtractTcb(
     const ExFastExtractTdb &fteTdb,
     const ex_tcb & childTcb,
@@ -545,14 +484,11 @@ Int32 ExHdfsFastExtractTcb::fixup()
 
   ex_tcb::fixup();
 
-  if(!myTdb().getSkipWritingToFiles() &&
-     !myTdb().getBypassLibhdfs())
-    memset (hdfsHost_, '\0', sizeof(hdfsHost_));
-      strncpy(hdfsHost_, myTdb().getHdfsHostName(), sizeof(hdfsHost_));
-      hdfsPort_ = myTdb().getHdfsPortNum();
-    ExpLOBinterfaceInit
-      (lobGlob_, getGlobals()->getDefaultHeap(),getGlobals()->castToExExeStmtGlobals()->getContext(),TRUE,hdfsHost_,hdfsPort_);
-
+  strncpy(hdfsHost_, myTdb().getHdfsHostName(), sizeof(hdfsHost_));
+  hdfsPort_ = myTdb().getHdfsPortNum();
+  ExpLOBinterfaceInit
+    (lobGlob_, getGlobals()->getDefaultHeap(),getGlobals()->castToExExeStmtGlobals()->getContext(),TRUE,hdfsHost_,hdfsPort_);
+  
   modTS_ = myTdb().getModTSforDir();
 
   return 0;
@@ -811,8 +747,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
 
       ComDiagsArea *da = NULL;
 
-      if (!myTdb().getSkipWritingToFiles())
-        if (myTdb().getTargetFile() )
+      if (myTdb().getTargetFile() )
         {
           Lng32 fileNum = getGlobals()->castToExExeStmtGlobals()->getMyInstanceNumber();
           memset (hdfsHost_, '\0', sizeof(hdfsHost_));
@@ -834,8 +769,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
           else
             snprintf(fileName_,999, "%s%d-%s-%d", "file", fileNum, pt,rand() % 1000);
 
-          if ((isSequenceFile() || myTdb().getBypassLibhdfs()) &&
-              !sequenceFileWriter_)
+          if (!sequenceFileWriter_)
           {
             sequenceFileWriter_ = new(getHeap())
                                      SequenceFileWriter((NAHeap *)getHeap());
@@ -848,47 +782,25 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
             }
           }
 
-          if (isSequenceFile()  ||  myTdb().getBypassLibhdfs())
-          {
-            strcat(targetLocation_, "//");
-            strcat(targetLocation_, fileName_);
-            if (isSequenceFile())
-              sfwRetCode = sequenceFileWriter_->open(targetLocation_, SFW_COMP_NONE);
-            else
-              sfwRetCode = sequenceFileWriter_->hdfsCreate(targetLocation_, isHdfsCompressed());
-            if (sfwRetCode != SFW_OK)
-            {
-              createSequenceFileError(sfwRetCode);
-              pstate.step_ = EXTRACT_ERROR;
-              break;
-            }
-          }
+          strcat(targetLocation_, "//");
+          strcat(targetLocation_, fileName_);
+          if (isSequenceFile())
+            sfwRetCode = sequenceFileWriter_->open(targetLocation_, SFW_COMP_NONE);
           else
-          {
-            retcode = 0;
-            retcode = lobInterfaceCreate();
-            if (retcode < 0)
+            sfwRetCode = sequenceFileWriter_->hdfsCreate(targetLocation_, isHdfsCompressed());
+          if (sfwRetCode != SFW_OK)
             {
-              Lng32 cliError = 0;
-
-              Lng32 intParam1 = -retcode;
-              ComDiagsArea * diagsArea = NULL;
-              ExRaiseSqlError(getHeap(), &diagsArea,
-                  (ExeErrorCode)(8442), NULL, &intParam1,
-                  &cliError, NULL, (char*)"ExpLOBinterfaceCreate",
-                  getLobErrStr(intParam1));
-              pentry_down->setDiagsArea(diagsArea);
+              createSequenceFileError(sfwRetCode);
               pstate.step_ = EXTRACT_ERROR;
               break;
             }
-          }
             
           if (feStats)
           {
             feStats->setPartitionNumber(fileNum);
           }
         }
-        else
+      else
         {
           updateWorkATPDiagsArea(__FILE__,__LINE__,"sockets are not supported");
           pstate.step_ = EXTRACT_ERROR;
@@ -1083,8 +995,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
     {
       ssize_t bytesToWrite = currBuffer_->bufSize_ - currBuffer_->bytesLeft_;
 
-      if (!myTdb().getSkipWritingToFiles())
-        if (isSequenceFile())
+      if (isSequenceFile())
         {
           sfwRetCode = sequenceFileWriter_->writeBuffer(currBuffer_->data_, bytesToWrite, myTdb().getRecordSeparator());
           if (sfwRetCode != SFW_OK)
@@ -1094,7 +1005,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
             break;
           }
         }
-        else  if (myTdb().getBypassLibhdfs())
+      else
         {
           sfwRetCode = sequenceFileWriter_->hdfsWrite(currBuffer_->data_, bytesToWrite);
           if (sfwRetCode != SFW_OK)
@@ -1104,25 +1015,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
             break;
           }
         }
-        else
-        {
-          retcode = 0;
-          retcode = lobInterfaceInsert(bytesToWrite);
-          if (retcode < 0)
-          {
-            Lng32 cliError = 0;
-
-            Lng32 intParam1 = -retcode;
-            ComDiagsArea * diagsArea = NULL;
-            ExRaiseSqlError(getHeap(), &diagsArea,
-                (ExeErrorCode)(8442), NULL, &intParam1,
-                &cliError, NULL, (char*)"ExpLOBInterfaceInsert",
-                getLobErrStr(intParam1));
-            pentry_down->setDiagsArea(diagsArea);
-            pstate.step_ = EXTRACT_ERROR;
-            break;
-          }
-        }
+
       if (feStats)
       {
         feStats->incReadyToSendBuffersCount();
@@ -1204,8 +1097,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
       if (qParent_.up->isFull())
         return WORK_OK;
 
-      if (!myTdb().getSkipWritingToFiles())
-        if (isSequenceFile())
+      if (isSequenceFile())
         {
           sfwRetCode = sequenceFileWriter_->close();
           if (!errorOccurred_ && sfwRetCode != SFW_OK )
@@ -1215,7 +1107,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
             break;
           }
         }
-        else  if (myTdb().getBypassLibhdfs())
+      else
         {
           if (sequenceFileWriter_)
             {
@@ -1228,26 +1120,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
                 }
             }
         }
-        else
-        {
-          retcode = lobInterfaceClose();
-          if (! errorOccurred_ && retcode < 0)
-          {
-            Lng32 cliError = 0;
-
-            Lng32 intParam1 = -retcode;
-            ComDiagsArea * diagsArea = NULL;
-            ExRaiseSqlError(getHeap(), &diagsArea,
-                (ExeErrorCode)(8442), NULL, &intParam1,
-                &cliError, NULL,
-                (char*)"ExpLOBinterfaceCloseFile",
-                getLobErrStr(intParam1));
-            pentry_down->setDiagsArea(diagsArea);
 
-            pstate.step_ = EXTRACT_ERROR;
-            break;
-          }
-        }
       //insertUpQueueEntry will insert Q_NO_DATA into the up queue and
       //remove the head of the down queue
       insertUpQueueEntry(ex_queue::Q_NO_DATA, NULL, TRUE);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/executor/ExFastTransport.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExFastTransport.h b/core/sql/executor/ExFastTransport.h
index d0875f5..4f57a9f 100644
--- a/core/sql/executor/ExFastTransport.h
+++ b/core/sql/executor/ExFastTransport.h
@@ -402,9 +402,6 @@ public:
 protected:
 
 
-  Lng32 lobInterfaceInsert(ssize_t bytesToWrite);
-  Lng32 lobInterfaceCreate();
-  Lng32 lobInterfaceClose();
   Lng32 lobInterfaceDataModCheck(Int64 &failedModTS,
                                  char * failedLocBuf,
                                  Int32 &failedLocBufLen);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/generator/GenFastTransport.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenFastTransport.cpp b/core/sql/generator/GenFastTransport.cpp
index 0c88a28..eec0b7d 100644
--- a/core/sql/generator/GenFastTransport.cpp
+++ b/core/sql/generator/GenFastTransport.cpp
@@ -481,9 +481,6 @@ static short ft_codegen(Generator *generator,
   tdb->setSequenceFile(isSequenceFile);
   tdb->setHdfsCompressed(CmpCommon::getDefaultNumeric(TRAF_UNLOAD_HDFS_COMPRESS)!=0);
 
-  tdb->setSkipWritingToFiles(CmpCommon::getDefault(TRAF_UNLOAD_SKIP_WRITING_TO_FILES) == DF_ON);
-  tdb->setBypassLibhdfs(CmpCommon::getDefault(TRAF_UNLOAD_BYPASS_LIBHDFS) == DF_ON);
-
   if ((hiveNAColArray) &&
       (hiveInsertErrMode == 2))
     {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/generator/GenRelExeUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelExeUtil.cpp b/core/sql/generator/GenRelExeUtil.cpp
index 21eb027..e6fb5a5 100644
--- a/core/sql/generator/GenRelExeUtil.cpp
+++ b/core/sql/generator/GenRelExeUtil.cpp
@@ -5703,7 +5703,6 @@ short ExeUtilHBaseBulkUnLoad::codeGen(Generator * generator)
   exe_util_tdb->setCompressType(compressType_);
   exe_util_tdb->setOneFile(oneFile_);
   exe_util_tdb->setMergePath(mergePathStr);
-  exe_util_tdb->setSkipWriteToFiles(CmpCommon::getDefault(TRAF_UNLOAD_SKIP_WRITING_TO_FILES) == DF_ON);
   exe_util_tdb->setOverwriteMergeFile(overwriteMergeFile_);
   exe_util_tdb->setScanType(scanType_);
   exe_util_tdb->setSnapshotSuffix(snapSuffixStr);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/regress/hive/EXPECTED018
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/EXPECTED018 b/core/sql/regress/hive/EXPECTED018
index b2ba64c..79aa4bc 100644
--- a/core/sql/regress/hive/EXPECTED018
+++ b/core/sql/regress/hive/EXPECTED018
@@ -2471,35 +2471,4 @@ ss order by ca_address_id;
 >>log;
 regrhadoop.ksh fs -rm /user/trafodion/hive/exttables/unload_customer_demographics/*
 >>
->>CQD TRAF_UNLOAD_SKIP_WRITING_TO_FILES 'ON';
-
---- SQL operation complete.
->>UNLOAD  
-+>WITH PURGEDATA FROM TARGET
-+>INTO '/user/trafodion/hive/exttables/unload_customer_demographics'
-+>(select * from trafodion.hbase.customer_demographics_salt) ;
-Task: UNLOAD           Status: Started
-Task:  EXTRACT         Status: Started    Time: 2017-05-01 18:53:36.154
-       Rows Processed but NOT Written to Disk: 20000 
-Task:  EXTRACT         Status: Ended      Time: 2017-05-01 18:53:36.660
-Task:  EXTRACT         Status: Ended      Elapsed Time:    00:00:00.506
-
---- 20000 row(s) unloaded.
->>--sh sleep 10;
->>select count(*) from hive.hive.unload_customer_demographics;
-
-(EXPR)              
---------------------
-
-                   0
-
---- 1 row(s) selected.
->>
->>CQD TRAF_UNLOAD_SKIP_WRITING_TO_FILES reset;
-
---- SQL operation complete.
->>
->>
->>
->>
 >>log;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/regress/hive/TEST018
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/TEST018 b/core/sql/regress/hive/TEST018
index 7759805..a5544c1 100644
--- a/core/sql/regress/hive/TEST018
+++ b/core/sql/regress/hive/TEST018
@@ -751,17 +751,4 @@ sh echo "regrhadoop.ksh fs -rm /user/trafodion/hive/exttables/unload_customer_de
 sh regrhadoop.ksh fs -rm /user/trafodion/hive/exttables/unload_customer_demographics/* ;
 log LOG018;
 
-CQD TRAF_UNLOAD_SKIP_WRITING_TO_FILES 'ON';
-UNLOAD  
-WITH PURGEDATA FROM TARGET
-INTO '/user/trafodion/hive/exttables/unload_customer_demographics'
-(select * from trafodion.hbase.customer_demographics_salt) ;
---sh sleep 10;
-select count(*) from hive.hive.unload_customer_demographics;
-
-CQD TRAF_UNLOAD_SKIP_WRITING_TO_FILES reset;
-
-
-
-
 log;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/DefaultConstants.h b/core/sql/sqlcomp/DefaultConstants.h
index 4cf1842..d128356 100644
--- a/core/sql/sqlcomp/DefaultConstants.h
+++ b/core/sql/sqlcomp/DefaultConstants.h
@@ -3609,12 +3609,10 @@ enum DefaultConstants
   ASG_FEATURE,
 
   TRAF_UNLOAD_HDFS_COMPRESS,
-  TRAF_UNLOAD_SKIP_WRITING_TO_FILES,
 
   NCM_IND_JOIN_COST_ADJ_FACTOR,
   NCM_IND_SCAN_COST_ADJ_FACTOR,
   GROUP_BY_PARTIAL_ROOT_THRESHOLD,
-  TRAF_UNLOAD_BYPASS_LIBHDFS,
   TRAF_UNLOAD_DEF_DELIMITER,
   TRAF_UNLOAD_DEF_RECORD_SEPARATOR,
   TRAF_LOAD_FORCE_CIF,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b21f2a94/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index bd90ca0..fc342ba 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -3435,11 +3435,9 @@ XDDkwd__(SUBQUERY_UNNESTING,			"ON"),
   // DTM Transaction Type: MVCC, SSCC
   XDDkwd__(TRAF_TRANS_TYPE,                            "MVCC"),
 
-  DDkwd__(TRAF_UNLOAD_BYPASS_LIBHDFS,                  "ON"),
   DD_____(TRAF_UNLOAD_DEF_DELIMITER,                   "|" ),
   DD_____(TRAF_UNLOAD_DEF_RECORD_SEPARATOR,            "\n" ),
   DDint__(TRAF_UNLOAD_HDFS_COMPRESS,                   "0"),
-  DDkwd__(TRAF_UNLOAD_SKIP_WRITING_TO_FILES,           "OFF"),
   DDkwd__(TRAF_UPSERT_ADJUST_PARAMS,                   "OFF"),
   DDkwd__(TRAF_UPSERT_MODE,                            "MERGE"),
   DDkwd__(TRAF_UPSERT_TO_EFF_TREE,                     "ON"),