trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/3] trafodion git commit: fix [trafodion-2988] prepare query returns 2006 internal error
Date Thu, 15 Mar 2018 16:46:03 GMT
Repository: trafodion
Updated Branches:
  refs/heads/master 7b5902fbe -> 7eb3ea39b


fix [trafodion-2988] prepare query returns 2006 internal error


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

Branch: refs/heads/master
Commit: 7f7ba504b8c1bac741642fe42d37ba3754adf896
Parents: dd301dc
Author: kakaxi3019 <jupiter3019@163.com>
Authored: Wed Mar 14 01:44:29 2018 +0000
Committer: kakaxi3019 <jupiter3019@163.com>
Committed: Wed Mar 14 01:44:29 2018 +0000

----------------------------------------------------------------------
 core/sql/optimizer/mdam.cpp | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/7f7ba504/core/sql/optimizer/mdam.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/mdam.cpp b/core/sql/optimizer/mdam.cpp
index 4570fc9..b33f00a 100644
--- a/core/sql/optimizer/mdam.cpp
+++ b/core/sql/optimizer/mdam.cpp
@@ -2002,7 +2002,8 @@ void Disjuncts::computeCommonPredicates()
 	      inVidset.next(predId);
 	      inVidset.advance(predId) )
 	 {
-            if(predId.getItemExpr()->getOperatorType() == ITM_RANGE_SPEC_FUNC )
+            //TRAFODION-2988
+            /*if(predId.getItemExpr()->getOperatorType() == ITM_RANGE_SPEC_FUNC )
             {
 	       if(predId.getItemExpr()->child(1)->getOperatorType() == ITM_AND ){
 	          predId.getItemExpr()->child(1)->convertToValueIdSet(parsedVs, NULL, ITM_AND,
FALSE);
@@ -2013,7 +2014,26 @@ void Disjuncts::computeCommonPredicates()
 	       outVidset += predId.getItemExpr()->child(1)->castToItemExpr()->getValueId();
    
            }
 	   else
-	     outVidset +=predId;
+	     outVidset +=predId;*/
+           if( ITM_RANGE_SPEC_FUNC == predId.getItemExpr()->getOperatorType() )
+           {   
+               if( ITM_AND == predId.getItemExpr()->child(1)->getOperatorType() )
+               {   
+                   predId.getItemExpr()->child(1)->convertToValueIdSet(parsedVs, NULL,
ITM_AND, FALSE);
+                   outVidset +=parsedVs;
+               }
+               else if( ITM_OR == predId.getItemExpr()->child(1)->getOperatorType()
)
+               {   
+                   outVidset +=predId;
+               }
+               else
+               {   
+                   outVidset += predId.getItemExpr()->child(1)->castToItemExpr()->getValueId();
+               }
+           }
+           else
+               outVidset +=predId;
+           //TRAFODION-2988 
 	 parsedVs.clear();
 	}
 


Mime
View raw message