You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sa...@apache.org on 2018/09/05 20:41:16 UTC

[1/5] trafodion git commit: Changes to update queue sizes and add dynamic queue resizing to some missing operators. (cherry picked from commit f26c0f448a6adf5cdefddc74c4ba840b030e8cf5)

Repository: trafodion
Updated Branches:
  refs/heads/master c7d2301d7 -> e6e8956cf


Changes to update queue sizes and add dynamic queue resizing to some missing operators.
(cherry picked from commit f26c0f448a6adf5cdefddc74c4ba840b030e8cf5)

Conflicts:

	core/sql/generator/Generator.cpp
	core/sql/generator/Generator.h
	core/sql/sqlcomp/nadefaults.cpp


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

Branch: refs/heads/master
Commit: a111065fc659d1b82233cd78607820f3a8bd74c6
Parents: 1650c78
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Wed Aug 29 04:33:10 2018 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Wed Aug 29 04:33:10 2018 +0000

----------------------------------------------------------------------
 core/sql/executor/ExSequence.cpp    | 38 +++++++++++++++--------------
 core/sql/executor/ExSequence.h      |  6 +++--
 core/sql/executor/ExTranspose.cpp   | 39 ++++++++++++++----------------
 core/sql/executor/ExTranspose.h     |  6 +++--
 core/sql/executor/ex_union.cpp      | 41 +++++++++++++++++---------------
 core/sql/executor/ex_union.h        |  7 ++++--
 core/sql/generator/GenRelUpdate.cpp |  2 ++
 core/sql/generator/Generator.cpp    | 19 +++++++++++++--
 core/sql/generator/Generator.h      | 24 +++++++++++++++++++
 core/sql/optimizer/Inlining.cpp     | 26 ++++++++++----------
 core/sql/sqlcomp/DefaultConstants.h |  3 +--
 core/sql/sqlcomp/nadefaults.cpp     | 24 +++++++++----------
 12 files changed, 143 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/executor/ExSequence.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExSequence.cpp b/core/sql/executor/ExSequence.cpp
index 327fb96..bc29779 100644
--- a/core/sql/executor/ExSequence.cpp
+++ b/core/sql/executor/ExSequence.cpp
@@ -289,22 +289,8 @@ ExSequenceTcb::ExSequenceTcb (const ExSequenceTdb &  myTdb,
   qchild_  = child_tcb.getParentQueue(); 
 
   // Allocate the queue to communicate with parent
-  qparent_.down = new(space) ex_queue(ex_queue::DOWN_QUEUE,
-    myTdb.initialQueueSizeDown_,
-    myTdb.criDescDown_,
-    space);
-
-  // Allocate the private state in each entry of the down queue
-  ExSequencePrivateState *p 
-    = new(space) ExSequencePrivateState(this);
-  qparent_.down->allocatePstate(p, this);
-  delete p;
-
-  qparent_.up = new(space) ex_queue(ex_queue::UP_QUEUE,
-    myTdb.initialQueueSizeUp_,
-    myTdb.criDescUp_,
-    space);
-
+ 
+ allocateParentQueues(qparent_,TRUE);
   // Intialized processedInputs_ to the next request to process
   processedInputs_ = qparent_.down->getTailIndex();
 
@@ -375,6 +361,8 @@ void ExSequenceTcb::registerSubtasks()
       ex_assert( clusterDb_ , "Unlimited following and no clusterDb_") ;
       clusterDb_->ioEventHandler_ = ioEventHandler_ ;
     }
+    // the parent queues will be resizable, so register a resize subtask.
+    registerResizeSubtasks();
 };
 
 // Free Resources
@@ -1510,7 +1498,7 @@ void ExSequenceTcb::updateDiagsArea(  ExeErrorCode rc_)
 // Constructor and destructor private state
 //
 ExSequencePrivateState::ExSequencePrivateState
-(const ExSequenceTcb *  tcb)
+()
 {
   matchCount_ = 0;
   step_ = ExSequenceTcb::ExSeq_EMPTY;
@@ -1524,5 +1512,19 @@ ex_tcb_private_state * ExSequencePrivateState::allocate_new
 (const ex_tcb *tcb)
 {
   return new(((ex_tcb*)tcb)->getSpace()) 
-    ExSequencePrivateState((ExSequenceTcb*) tcb);
+    ExSequencePrivateState();
 };
+
+
+////////////////////////////////////////////////////////////////////////
+// Redefine virtual method allocatePstates, to be used by dynamic queue
+// resizing, as well as the initial queue construction.
+////////////////////////////////////////////////////////////////////////
+ex_tcb_private_state * ExSequenceTcb::allocatePstates(
+     Lng32 &numElems,      // inout, desired/actual elements
+     Lng32 &pstateLength)  // out, length of one element
+{
+  PstateAllocator<ExSequencePrivateState> pa;
+
+  return pa.allocatePstates(this, numElems, pstateLength);
+}

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/executor/ExSequence.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExSequence.h b/core/sql/executor/ExSequence.h
index daf324f..dec0069 100644
--- a/core/sql/executor/ExSequence.h
+++ b/core/sql/executor/ExSequence.h
@@ -204,7 +204,9 @@ public:
   
   virtual Int32 numChildren() const;
   virtual const ex_tcb* getChild(Int32 pos) const;
-
+  virtual ex_tcb_private_state * allocatePstates(
+       Lng32 &numElems,      // inout, desired/actual elements
+       Lng32 &pstateLength); // out, length of one element
 private:
   const ex_tcb * childTcb_;
   
@@ -361,7 +363,7 @@ class ExSequencePrivateState : public ex_tcb_private_state
   friend class ExSequenceTcb;
 
 public:
-  ExSequencePrivateState(const ExSequenceTcb * tcb);
+  ExSequencePrivateState();
   ex_tcb_private_state * allocate_new(const ex_tcb * tcb);
   ~ExSequencePrivateState();
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/executor/ExTranspose.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExTranspose.cpp b/core/sql/executor/ExTranspose.cpp
index ae2d2ff..2545462 100644
--- a/core/sql/executor/ExTranspose.cpp
+++ b/core/sql/executor/ExTranspose.cpp
@@ -124,30 +124,13 @@ ExTransposeTcb::ExTransposeTcb(const ExTransposeTdb &transTdbLocal,
   childQueue_.down->allocateAtps(glob->getSpace());
   
   // Allocate the queue to communicate with parent
-  // (Child allocates queue to communicate with Child)
-  //
-  qParent_.down = new(space) ex_queue(ex_queue::DOWN_QUEUE,
-				      transTdb().queueSizeDown_,
-				      transTdb().criDescDown_,
-				      space);
-
-  // Allocate the private state in each entry of the down queue
-  //
-  ExTransposePrivateState privateState(this);
-  qParent_.down->allocatePstate(&privateState, this);
-
-
+ 
+  allocateParentQueues(qParent_,TRUE);
   // Initialize processedInputs_ to refer to the queue entry
   // which will be used next.
   //
   processedInputs_ = qParent_.down->getHeadIndex();
   
-  // Allocate a queue to communicate with the parent node.
-  //
-  qParent_.up = new(space) ex_queue(ex_queue::UP_QUEUE,
-				    transTdb().queueSizeUp_,
-				    transTdb().criDescUp_,
-				    space);
 
   // fixup all expressions expressions
   //
@@ -238,6 +221,8 @@ void ExTransposeTcb::registerSubtasks()
   // (had returned WORK_OK).
   //
   sched->registerInsertSubtask(sWorkUp, this, childQueue_.up);
+ // the parent queues will be resizable, so register a resize subtask.
+  registerResizeSubtasks();
 }
 
 // ExTransposeTcb::start() ------------------------------------------
@@ -628,7 +613,7 @@ ExTransposeTcb::processError()
 
 // Constructor and destructor for ExTransposePrivateState
 //
-ExTransposePrivateState::ExTransposePrivateState(const ExTransposeTcb *) 
+ExTransposePrivateState::ExTransposePrivateState() 
 {
   init();
 }
@@ -656,6 +641,18 @@ ex_tcb_private_state *
 ExTransposePrivateState::allocate_new(const ex_tcb *tcb)
 {
   return new(((ex_tcb *)tcb)->getSpace())
-    ExTransposePrivateState((ExTransposeTcb *)tcb);
+    ExTransposePrivateState();
 }
 
+////////////////////////////////////////////////////////////////////////
+// Redefine virtual method allocatePstates, to be used by dynamic queue
+// resizing, as well as the initial queue construction.
+////////////////////////////////////////////////////////////////////////
+ex_tcb_private_state * ExTransposeTcb::allocatePstates(
+     Lng32 &numElems,      // inout, desired/actual elements
+     Lng32 &pstateLength)  // out, length of one element
+{
+  PstateAllocator<ExTransposePrivateState> pa;
+
+  return pa.allocatePstates(this, numElems, pstateLength);
+}

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/executor/ExTranspose.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExTranspose.h b/core/sql/executor/ExTranspose.h
index a2a537a..b574d15 100644
--- a/core/sql/executor/ExTranspose.h
+++ b/core/sql/executor/ExTranspose.h
@@ -267,7 +267,9 @@ public:
     if(pos == 0) return childTcb_;
     return NULL;
   }
-
+  virtual ex_tcb_private_state * allocatePstates(
+       Lng32 &numElems,      // inout, desired/actual elements
+       Lng32 &pstateLength); // out, length of one element
 protected:
   
   // The child TCB of this Transpose node.
@@ -329,7 +331,7 @@ class ExTransposePrivateState : public ex_tcb_private_state
 
 public:
 
-  ExTransposePrivateState(const ExTransposeTcb * tcb); 
+  ExTransposePrivateState(); 
 
   ex_tcb_private_state * allocate_new(const ex_tcb * tcb);
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/executor/ex_union.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ex_union.cpp b/core/sql/executor/ex_union.cpp
index 74a3f4d..1cfe82d 100644
--- a/core/sql/executor/ex_union.cpp
+++ b/core/sql/executor/ex_union.cpp
@@ -135,22 +135,10 @@ ex_union_tcb::ex_union_tcb(const ex_union_tdb &  union_tdb,  //
   ex_cri_desc * to_parent_cri;
   to_parent_cri = childQueues_[0].up->getCriDesc();
   
-  // Allocate the queue to communicate with parent
-  qparent.down = new(space) ex_queue(ex_queue::DOWN_QUEUE,
-				     union_tdb.queueSizeDown_,
-				     union_tdb.criDescDown_,
-				     space);
+  
+  allocateParentQueues(qparent,TRUE);
 
-  // Allocate the private state in each entry of the down queue
-  ex_union_private_state p(this);
-  qparent.down->allocatePstate(&p, this);
   processedInputs_ = qparent.down->getHeadIndex();
-
-  qparent.up = new(space) ex_queue(ex_queue::UP_QUEUE,
-				   union_tdb.queueSizeUp_,
-				   union_tdb.criDescUp_,
-				   space);
-
   // fixup left expression
   if (moveExpr(0))
     (void) moveExpr(0)->fixup(0, getExpressionMode(), this,
@@ -207,7 +195,6 @@ void ex_union_tcb::registerSubtasks()
   sched->registerInsertSubtask(sWorkDown, this, qparent.down,"DN");
   sched->registerUnblockSubtask(sWorkDown, this, childQueues_[0].down);
   sched->registerUnblockSubtask(sWorkDown, this, childQueues_[1].down);
-
   // cancellations are handled by the complaints department
   sched->registerCancelSubtask(sCancel, this, qparent.down,"CN");
 
@@ -215,6 +202,8 @@ void ex_union_tcb::registerSubtasks()
   sched->registerUnblockSubtask(sWorkUp, this, qparent.up,"UP");
   sched->registerInsertSubtask(sWorkUp, this, childQueues_[0].up);
   sched->registerInsertSubtask(sWorkUp, this, childQueues_[1].up);
+  // the parent queues will be resizable, so register a resize subtask.
+  registerResizeSubtasks();
 }
 
 ///////////////////////////////////////////////////////////
@@ -1120,7 +1109,8 @@ void ex_o_union_tcb::registerSubtasks()
   sched->registerUnblockSubtask(sWorkUp, this, qparent.up,"UP");
   sched->registerInsertSubtask(sWorkUp, this, childQueues_[0].up);
   sched->registerInsertSubtask(sWorkUp, this, childQueues_[1].up);
-
+  // the parent queues will be resizable, so register a resize subtask.
+  registerResizeSubtasks();
 } // ex_o_union_tcb::registerSubtasks
 
 //////////////////////////////////////////////////////////////
@@ -1233,7 +1223,8 @@ void ex_c_union_tcb::registerSubtasks()
     sched->registerInsertSubtask(sWorkUp, this, childQueues_[i].up);
 
   workUpEvent_ = sched->registerNonQueueSubtask(sWorkUp, this);
-
+  // the parent queues will be resizable, so register a resize subtask.
+  registerResizeSubtasks();
 } // ex_union_tcb::registerSubtasks()
 
 ExWorkProcRetcode ex_c_union_tcb::condWorkDown()
@@ -1581,7 +1572,7 @@ void ex_c_union_tcb::processEODErrorOrWarning(NABoolean isWarning)
 
 // Constructor and destructor for union_private_state
 //
-ex_union_private_state::ex_union_private_state(const ex_union_tcb *) 
+ex_union_private_state::ex_union_private_state() 
 {
   init();
 }
@@ -1601,6 +1592,18 @@ ex_union_private_state::~ex_union_private_state()
 
 ex_tcb_private_state * ex_union_private_state::allocate_new(const ex_tcb *tcb)
 {
-  return new(((ex_tcb *)tcb)->getSpace()) ex_union_private_state((ex_union_tcb *) tcb);
+  return new(((ex_tcb *)tcb)->getSpace()) ex_union_private_state();
 }
 
+////////////////////////////////////////////////////////////////////////
+// Redefine virtual method allocatePstates, to be used by dynamic queue
+// resizing, as well as the initial queue construction.
+////////////////////////////////////////////////////////////////////////
+ex_tcb_private_state * ex_union_tcb::allocatePstates(
+     Lng32 &numElems,      // inout, desired/actual elements
+     Lng32 &pstateLength)  // out, length of one element
+{
+  PstateAllocator<ex_union_private_state> pa;
+
+  return pa.allocatePstates(this, numElems, pstateLength);
+}

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/executor/ex_union.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ex_union.h b/core/sql/executor/ex_union.h
index 279ff07..557d560 100644
--- a/core/sql/executor/ex_union.h
+++ b/core/sql/executor/ex_union.h
@@ -195,6 +195,9 @@ virtual const ex_tcb* getChild(Int32 pos) const
   virtual Int32 numChildren() const { return union_tdb().numChildren(); }
 //  virtual const ex_tcb* getChild(int pos) const;
   virtual Int32 hasNoOutputs() const {return FALSE;};
+  virtual ex_tcb_private_state * allocatePstates(
+       Lng32 &numElems,      // inout, desired/actual elements
+       Lng32 &pstateLength); // out, length of one element
 protected:
 
   const ex_tcb       *tcbLeft_;      // left tcb
@@ -386,8 +389,8 @@ class ex_union_private_state : public ex_tcb_private_state
   void           init();        // initialize state
 
 public:
-
-  ex_union_private_state(const ex_union_tcb * tcb); //constructor
+  
+  ex_union_private_state(); //constructor
   ex_tcb_private_state * allocate_new(const ex_tcb * tcb);
   ~ex_union_private_state();  // destructor
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/generator/GenRelUpdate.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelUpdate.cpp b/core/sql/generator/GenRelUpdate.cpp
index b8ae57f..b571125 100644
--- a/core/sql/generator/GenRelUpdate.cpp
+++ b/core/sql/generator/GenRelUpdate.cpp
@@ -2926,6 +2926,8 @@ short HbaseInsert::codeGen(Generator *generator)
 	  // operator. On seeing that, executor will flush the buffers.
 	  generator->setVSBBInsert(TRUE);
 	}
+      if (xformedEffUpsert())
+        generator->setEffTreeUpsert(TRUE);
 
       //setting parametes for hbase bulk load integration
       hbasescan_tdb->setIsTrafodionLoadPrep(this->getIsTrafLoadPrep());

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/generator/Generator.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/Generator.cpp b/core/sql/generator/Generator.cpp
index d9e736a..4cbb8bf 100644
--- a/core/sql/generator/Generator.cpp
+++ b/core/sql/generator/Generator.cpp
@@ -312,7 +312,22 @@ void Generator::initTdbFields(ComTdb *tdb)
       dynQueueSizeValuesAreValid_ = TRUE;
     }
 
-  if (getRightSideOfOnlj() && makeOnljRightQueuesBig_)
+  if  (ActiveSchemaDB()->getDefaults().getToken(DYN_QUEUE_RESIZE_OVERRIDE) == DF_ON)
+    {
+      tdb->setQueueResizeParams(tdb->getMaxQueueSizeDown(), tdb->getMaxQueueSizeUp(),
+                                queueResizeLimit_,queueResizeFactor_);
+    }
+  //Typically the sequence operaotr may have to deal with a large numer of rows when 
+  //it's part of the IM tree that performs elimination of dups. 
+  if ((tdb->getNodeType() == ComTdb::ex_SEQUENCE_FUNCTION) && isEffTreeUpsert())
+    {
+     tdb->setQueueResizeParams(tdb->getMaxQueueSizeDown(), tdb->getMaxQueueSizeUp(),
+                                queueResizeLimit_,queueResizeFactor_); 
+    }
+   // Make the size of the upQ of ONLJ the same as that of the upQ
+   // of the right child. 
+   if ((tdb->getNodeType() == ComTdb::ex_ONLJ || getRightSideOfOnlj()) 
+        && makeOnljRightQueuesBig_)
     {
       tdb->setQueueResizeParams(onljRightSideDownQueue_,
 			        onljRightSideUpQueue_,
@@ -343,7 +358,7 @@ void Generator::initTdbFields(ComTdb *tdb)
                               queueResizeLimit_,
                               queueResizeFactor_);
   }
-
+ 
   tdb->setTdbId(getAndIncTdbId());
 
   tdb->setPlanVersion(ComVersion_GetCurrentPlanVersion());

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/generator/Generator.h
----------------------------------------------------------------------
diff --git a/core/sql/generator/Generator.h b/core/sql/generator/Generator.h
index 2c0ac9e..1c778e3 100644
--- a/core/sql/generator/Generator.h
+++ b/core/sql/generator/Generator.h
@@ -247,6 +247,8 @@ class Generator : public NABasicObject
     // If Hive tables are accessed at runtime
     , HIVE_ACCESS              = 0x00000400
     , CONTAINS_FAST_EXTRACT    = 0x00000800
+    , EFF_TREE_UPSERT          = 0x00001000
+
   };
  
   // Each operator node receives some tupps in its input atp and
@@ -1297,6 +1299,28 @@ public:
       flags2_ &= ~RI_INLINING_FOR_TRAF_IUD ;
   }
 
+
+  NABoolean isMinmaxOptWithRangeOfValues() {
+   
+     return (flags2_ & MINMAX_WITH_RANGE_OF_VALUES ) != 0;
+  }
+
+  void setMinmaxOptWithRangeOfValues(NABoolean v)
+  {
+    v ? flags2_ |= MINMAX_WITH_RANGE_OF_VALUES:
+      flags2_ &= ~MINMAX_WITH_RANGE_OF_VALUES;
+  }
+NABoolean isEffTreeUpsert() {
+   
+     return (flags2_ & EFF_TREE_UPSERT ) != 0;
+  }
+
+  void setEffTreeUpsert(NABoolean v)
+  {
+    v ? flags2_ |= EFF_TREE_UPSERT:
+      flags2_ &= ~EFF_TREE_UPSERT;
+  }
+
   inline Int64 getPlanId();
   inline Lng32 getExplainNodeId() const;
   inline Lng32 getNextExplainNodeId();

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/optimizer/Inlining.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/Inlining.cpp b/core/sql/optimizer/Inlining.cpp
index e93e33b..89b0d50 100644
--- a/core/sql/optimizer/Inlining.cpp
+++ b/core/sql/optimizer/Inlining.cpp
@@ -2165,19 +2165,21 @@ RelExpr *GenericUpdate::createIMNodes(BindWA *bindWA,
     // are flowing to this update node.
     // This is also the case when updates are being driven 
     // by rowsets.
-    // The fix is to unconditionally block the ordered union
+    // Changing this code that  unconditionally blocked the ordered union
     // to handle all cases of IM updates.
-    // Note that this may cause performance issues. Improving
-    // the performance is an RFE at the moment. 
-    //if (this->getInliningInfo().isInActionOfRowTrigger() ||
-    //   bindWA->getHostArraysArea())
-    //{
-       ((Union *)indexOp)->setBlockedUnion();
-    //}
-    //else
-    //{
-    //   ((Union *)indexOp)->setOrderedUnion();
-    //}
+    //We can use the ordered union in the case where we have the sequence operator 
+    // in the tree on the left side to remove duplicates before it flows to the 
+    // IM tree. This is to improve performance.
+    // 
+    if (this->getInliningInfo().isInActionOfRowTrigger() ||
+        (bindWA->getHostArraysArea() && !isEffUpsert))
+    {
+      ((Union *)indexOp)->setBlockedUnion();
+    }
+    else
+    {
+      ((Union *)indexOp)->setOrderedUnion();
+    }
 
     // Add a root just to be consistent, so all returns from this method
     // are topped with a RelRoot.

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/DefaultConstants.h b/core/sql/sqlcomp/DefaultConstants.h
index 2098024..290205f 100644
--- a/core/sql/sqlcomp/DefaultConstants.h
+++ b/core/sql/sqlcomp/DefaultConstants.h
@@ -383,7 +383,7 @@ enum DefaultConstants
   DYN_QUEUE_RESIZE_INIT_DOWN,
   DYN_QUEUE_RESIZE_INIT_UP,
   DYN_QUEUE_RESIZE_LIMIT,
-
+  DYN_QUEUE_RESIZE_OVERRIDE,
   // -------------------------------------------------------------------------
   // Enable 'ON' or disable 'OFF' considering hash joins of any form
   // -------------------------------------------------------------------------
@@ -2115,7 +2115,6 @@ enum DefaultConstants
   GEN_ONLJ_SET_QUEUE_RIGHT,
   GEN_ONLJ_SET_QUEUE_LEFT,
 
-
   
   SORT_REC_THRESHOLD,
   SORT_MERGE_BUFFER_UNIT_56KB,

http://git-wip-us.apache.org/repos/asf/trafodion/blob/a111065f/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index e56efa5..b5aea4a 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -1119,6 +1119,7 @@ SDDui___(CYCLIC_ESP_PLACEMENT,                  "1"),
   DDui2__(DYN_QUEUE_RESIZE_INIT_DOWN,		"4"),
   DDui2__(DYN_QUEUE_RESIZE_INIT_UP,		"4"),
   DDui1__(DYN_QUEUE_RESIZE_LIMIT,		"9"),
+  DDkwd__(DYN_QUEUE_RESIZE_OVERRIDE,             "OFF"),
 
   DDkwd__(EID_SPACE_USAGE_OPT,			"OFF"),
 
@@ -1319,7 +1320,7 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
   DDui1__(GEN_MJ_BUFFER_SIZE,			"32768"),
   DDui1__(GEN_MJ_NUM_BUFFERS,			"1"),
   DDui1__(GEN_MJ_SIZE_DOWN,			"2"),
-  DDui1__(GEN_MJ_SIZE_UP,			"1024"),
+  DDui1__(GEN_MJ_SIZE_UP,			"2048"),
   DDui1__(GEN_ONLJ_BUFFER_SIZE,			"5120"),
   DDui1__(GEN_ONLJ_LEFT_CHILD_QUEUE_DOWN,       "4"),
   DDui1__(GEN_ONLJ_LEFT_CHILD_QUEUE_UP,         "2048"),
@@ -1328,7 +1329,7 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
   DDui1__(GEN_ONLJ_RIGHT_SIDE_QUEUE_UP,         "2048"),
   DDkwd__(GEN_ONLJ_SET_QUEUE_LEFT,              "ON"),
   DDkwd__(GEN_ONLJ_SET_QUEUE_RIGHT,             "ON"),
-  DDui1__(GEN_ONLJ_SIZE_DOWN,			"2048"),
+  DDui1__(GEN_ONLJ_SIZE_DOWN,			"8"),
   DDui1__(GEN_ONLJ_SIZE_UP,			"2048"),
   DDipcBu(GEN_PA_BUFFER_SIZE,			"31000"),
   DDui1__(GEN_PA_NUM_BUFFERS,			"5"),
@@ -1338,10 +1339,10 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
   DDui1__(GEN_PROBE_CACHE_SIZE_UP,              "2048"),
   DDui1__(GEN_SAMPLE_SIZE_DOWN,			"16"),
   DDui1__(GEN_SAMPLE_SIZE_UP,			"16"),
-  DDui1__(GEN_SEQFUNC_BUFFER_SIZE,		"5120"),
-  DDui1__(GEN_SEQFUNC_NUM_BUFFERS,		"5"),
-  DDui1__(GEN_SEQFUNC_SIZE_DOWN,		"16"),
-  DDui1__(GEN_SEQFUNC_SIZE_UP,			"16"),
+  DDui1__(GEN_SEQFUNC_BUFFER_SIZE,		"10240"),
+  DDui1__(GEN_SEQFUNC_NUM_BUFFERS,		"10"),
+  DDui1__(GEN_SEQFUNC_SIZE_DOWN,		"512"),
+  DDui1__(GEN_SEQFUNC_SIZE_UP,			"2048"),
   DDui1__(GEN_SGBY_BUFFER_SIZE,			"5120"),
   DDui1__(GEN_SGBY_NUM_BUFFERS,			"5"),
   DDui1__(GEN_SGBY_SIZE_DOWN,			"2048"),
@@ -1360,7 +1361,7 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
   DDui1__(GEN_SORT_MAX_BUFFER_SIZE,		"5242880"),
   DDui1__(GEN_SORT_MAX_NUM_BUFFERS,             "160"),
   DDui1__(GEN_SORT_NUM_BUFFERS,			"2"),
-  DDui1__(GEN_SORT_SIZE_DOWN,			"2"),
+  DDui1__(GEN_SORT_SIZE_DOWN,			"8"),
   DDui1__(GEN_SORT_SIZE_UP,			"1024"),
   DDkwd__(GEN_SORT_TOPN,		        "ON"),
   DDui1__(GEN_SORT_TOPN_THRESHOLD,              "10000"),
@@ -1381,8 +1382,8 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
   DDui1__(GEN_TRAN_SIZE_UP,			"4"),
   DDui1__(GEN_TRSP_BUFFER_SIZE,			"10240"),
   DDui1__(GEN_TRSP_NUM_BUFFERS,			"5"),
-  DDui1__(GEN_TRSP_SIZE_DOWN,			"16"),
-  DDui1__(GEN_TRSP_SIZE_UP,			"16"),
+  DDui1__(GEN_TRSP_SIZE_DOWN,			"2048"),
+  DDui1__(GEN_TRSP_SIZE_UP,			"2048"),
   DDui1__(GEN_TUPL_BUFFER_SIZE,			"1024"),
   DDui1__(GEN_TUPL_NUM_BUFFERS,			"4"),
   DDui1__(GEN_TUPL_SIZE_DOWN,			"2048"),
@@ -1403,9 +1404,8 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
 
   DDui1__(GEN_UN_BUFFER_SIZE,			"10240"),
   DDui1__(GEN_UN_NUM_BUFFERS,			"5"),
-  DDui1__(GEN_UN_SIZE_DOWN,			"8"),
-  DDui1__(GEN_UN_SIZE_UP,			"16"),
-
+  DDui1__(GEN_UN_SIZE_DOWN,			"2048"),
+  DDui1__(GEN_UN_SIZE_UP,			"2048"),
 
 
   // When less or equal to this CQD (5000 rows by default), a partial root 


[4/5] trafodion git commit: known diff for AQR issue with hive timestamp mismatch.

Posted by sa...@apache.org.
known diff for AQR issue with hive timestamp mismatch.


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

Branch: refs/heads/master
Commit: f85ccaac2962e821e73fd4e9b6bd03a4f74dc33a
Parents: 776a02b
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Tue Sep 4 06:29:04 2018 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Tue Sep 4 06:29:04 2018 +0000

----------------------------------------------------------------------
 core/sql/regress/hive/DIFF005.KNOWN | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/f85ccaac/core/sql/regress/hive/DIFF005.KNOWN
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/DIFF005.KNOWN b/core/sql/regress/hive/DIFF005.KNOWN
new file mode 100644
index 0000000..126b422
--- /dev/null
+++ b/core/sql/regress/hive/DIFF005.KNOWN
@@ -0,0 +1,5 @@
+1138,1141d1137
+< *** WARNING[8597] Statement was automatically retried 1 time(s). Delay before each retry was 0 seconds. See next entry for the error that caused this retry.
+< 
+< Warning 8436 or 8577 removed
+< 


[5/5] trafodion git commit: Merge remote branch 'origin/pr/1708/head' into merge_1708

Posted by sa...@apache.org.
Merge remote branch 'origin/pr/1708/head' into merge_1708


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

Branch: refs/heads/master
Commit: e6e8956cfff449841f007f3365b60ac079967244
Parents: c7d2301 f85ccaa
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Wed Sep 5 20:40:38 2018 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Wed Sep 5 20:40:38 2018 +0000

----------------------------------------------------------------------
 core/sql/executor/ExSequence.cpp         | 38 +++++++++++++------------
 core/sql/executor/ExSequence.h           |  6 ++--
 core/sql/executor/ExTranspose.cpp        | 39 ++++++++++++-------------
 core/sql/executor/ExTranspose.h          |  6 ++--
 core/sql/executor/ex_union.cpp           | 41 ++++++++++++++-------------
 core/sql/executor/ex_union.h             |  7 +++--
 core/sql/generator/GenRelUpdate.cpp      |  2 ++
 core/sql/generator/Generator.cpp         | 19 +++++++++++--
 core/sql/generator/Generator.h           | 15 ++++++++++
 core/sql/optimizer/Inlining.cpp          | 26 +++++++++--------
 core/sql/regress/executor/EXPECTED015.SB | 20 ++++++-------
 core/sql/regress/hive/DIFF005.KNOWN      |  5 ++++
 core/sql/sqlcomp/DefaultConstants.h      |  3 +-
 core/sql/sqlcomp/nadefaults.cpp          | 24 ++++++++--------
 14 files changed, 149 insertions(+), 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/e6e8956c/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/e6e8956c/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------


[2/5] trafodion git commit: Fix to remove minmax unused methods.

Posted by sa...@apache.org.
Fix to remove minmax unused methods.


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

Branch: refs/heads/master
Commit: 45207a0579cd863757a0cbd3c7bdc0b25da6442e
Parents: a111065
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Thu Aug 30 21:49:54 2018 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Thu Aug 30 21:49:54 2018 +0000

----------------------------------------------------------------------
 core/sql/generator/Generator.h | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/45207a05/core/sql/generator/Generator.h
----------------------------------------------------------------------
diff --git a/core/sql/generator/Generator.h b/core/sql/generator/Generator.h
index 1c778e3..862199a 100644
--- a/core/sql/generator/Generator.h
+++ b/core/sql/generator/Generator.h
@@ -1300,16 +1300,7 @@ public:
   }
 
 
-  NABoolean isMinmaxOptWithRangeOfValues() {
-   
-     return (flags2_ & MINMAX_WITH_RANGE_OF_VALUES ) != 0;
-  }
-
-  void setMinmaxOptWithRangeOfValues(NABoolean v)
-  {
-    v ? flags2_ |= MINMAX_WITH_RANGE_OF_VALUES:
-      flags2_ &= ~MINMAX_WITH_RANGE_OF_VALUES;
-  }
+  
 NABoolean isEffTreeUpsert() {
    
      return (flags2_ & EFF_TREE_UPSERT ) != 0;


[3/5] trafodion git commit: Regression expected file fix

Posted by sa...@apache.org.
Regression expected file fix


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

Branch: refs/heads/master
Commit: 776a02b75444cb881360e159251c3d4b3237a1fe
Parents: 45207a0
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Fri Aug 31 05:25:38 2018 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Fri Aug 31 05:25:38 2018 +0000

----------------------------------------------------------------------
 core/sql/regress/executor/EXPECTED015.SB | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/776a02b7/core/sql/regress/executor/EXPECTED015.SB
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED015.SB b/core/sql/regress/executor/EXPECTED015.SB
index a7df8af..1c1dc16 100755
--- a/core/sql/regress/executor/EXPECTED015.SB
+++ b/core/sql/regress/executor/EXPECTED015.SB
@@ -2098,10 +2098,10 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 15   .    16   root                            x                     4.00E+000
 7    14   15   nested_join                                           4.00E+000
 10   13   14   merge_union                                           4.00E+000
-11   12   13   blocked_union                                         2.00E+000
+11   12   13   ordered_union                                         2.00E+000
 .    .    12   trafodion_insert                T015T16I2             1.00E+000
 .    .    11   trafodion_vsbb_delet            T015T16I2             1.00E+000
-8    9    10   blocked_union                                         2.00E+000
+8    9    10   ordered_union                                         2.00E+000
 .    .    9    trafodion_insert                T015T16I1             1.00E+000
 .    .    8    trafodion_vsbb_delet            T015T16I1             1.00E+000
 5    6    7    nested_join                                           1.00E+000
@@ -2269,14 +2269,14 @@ TENT  TEXT  TEST
 >>-- should fail, constraint violation
 >>merge into t015tc1 on a='FIVE' when matched then update set c= 'BALD';
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_454758687_3491 on table TRAFODION.SCH.T015TC1.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_971855625_5413 on table TRAFODION.SCH.T015TC1.
 
 --- 0 row(s) updated.
 >>
 >>-- should fail, constraint violation
 >>merge into t015tc1 on a = 'TENT' when matched then update set b = 'ACID';
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_318658687_3491 on table TRAFODION.SCH.T015TC1.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_216755625_5413 on table TRAFODION.SCH.T015TC1.
 
 --- 0 row(s) updated.
 >>
@@ -2300,7 +2300,7 @@ TENT  TEXT  TEST
 >>merge into t015tc1 on a = 'NOSH' when matched then update set b = 'GOOD'
 +>  when not matched then insert values ('GOOD','GOOD','BOMB');
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_454758687_3491 on table TRAFODION.SCH.T015TC1.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_971855625_5413 on table TRAFODION.SCH.T015TC1.
 
 --- 0 row(s) updated.
 >>
@@ -2325,21 +2325,21 @@ TENT  TEXT  TEST
 >>-- should fail because of constraint on C
 >>insert into t015tc1 values ('ACID','TEST','ACID');
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_454758687_3491 on table TRAFODION.SCH.T015TC1.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_971855625_5413 on table TRAFODION.SCH.T015TC1.
 
 --- 0 row(s) inserted.
 >>
 >>-- should fail because of constraint on B
 >>insert into t015tc1 values ('ACID','ACID','TEST');
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_318658687_3491 on table TRAFODION.SCH.T015TC1.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_216755625_5413 on table TRAFODION.SCH.T015TC1.
 
 --- 0 row(s) inserted.
 >>
 >>-- should fail because of constraint on B
 >>update t015tc1 set a = 'COOL', b = 'ACID' where a = 'TENT';
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_318658687_3491 on table TRAFODION.SCH.T015TC1.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC1_216755625_5413 on table TRAFODION.SCH.T015TC1.
 
 --- 0 row(s) updated.
 >>
@@ -2358,14 +2358,14 @@ TENT  TEXT  TEST
 >>-- should fail because of constraint on A
 >>insert into t015tc2 values ('NUMB','NUMB','NUMB');
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC2_289858687_3491 on table TRAFODION.SCH.T015TC2.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC2_724165625_5413 on table TRAFODION.SCH.T015TC2.
 
 --- 0 row(s) inserted.
 >>
 >>-- should fail because of constraint on A
 >>update t015tc2 set a = 'NUMB', b = 'OKAY' where a = 'TENT';
 
-*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC2_289858687_3491 on table TRAFODION.SCH.T015TC2.
+*** ERROR[8101] The operation is prevented by check constraint TRAFODION.SCH.T015TC2_724165625_5413 on table TRAFODION.SCH.T015TC2.
 
 --- 0 row(s) updated.
 >>