trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lium...@apache.org
Subject [1/5] incubator-trafodion git commit: [TRAFODION-2353] add Regexp support, iteration 1, changes in compiler
Date Fri, 25 Nov 2016 13:34:17 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 70980957c -> f1238e00f


[TRAFODION-2353] add Regexp support, iteration 1, changes in compiler


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

Branch: refs/heads/master
Commit: 05e19f260db4bb36700d0163d5121ad2fa2aff7c
Parents: 34772bc
Author: Liu Ming <ovis_poly@sina.com>
Authored: Wed Nov 16 02:52:33 2016 -0500
Committer: Liu Ming <ovis_poly@sina.com>
Committed: Wed Nov 16 02:52:33 2016 -0500

----------------------------------------------------------------------
 core/sql/bin/SqlciErrors.txt        |   1 +
 core/sql/common/OperTypeEnum.h      |   4 ++
 core/sql/generator/GenItemFunc.cpp  |   4 +-
 core/sql/optimizer/BindItemExpr.cpp |  14 +++--
 core/sql/optimizer/ItemCache.cpp    |   4 +-
 core/sql/optimizer/ItemExpr.cpp     |  46 ++++++++++++--
 core/sql/optimizer/ItemFunc.h       | 104 ++++++++++++++++++++++++++-----
 core/sql/optimizer/NormItemExpr.cpp |   2 +-
 core/sql/optimizer/SynthType.cpp    |   2 +-
 core/sql/parser/ParKeyWords.cpp     |   1 +
 core/sql/parser/sqlparser.y         |   7 +++
 11 files changed, 160 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/bin/SqlciErrors.txt
----------------------------------------------------------------------
diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt
index e4dda67..3a178d3 100644
--- a/core/sql/bin/SqlciErrors.txt
+++ b/core/sql/bin/SqlciErrors.txt
@@ -1378,6 +1378,7 @@ $1~String1 --------------------------------
 4384 ZZZZZ 99999 BEGINNER MINOR DBADMIN GROUP BY ROLLUP clause not allowed for this statement.
Reason: $0~String0
 4390 ZZZZZ 99999 BEGINNER MAJOR DBADMIN The OLAP History row size exceeds the limit of $0~Int0
bytes
 4391 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Paramaters and outer references in the PARTITION
BY or ORDER BY clause of a window function are not supported.
+4392 ZZZZZ 99999 BEGINNER MAJOR DBADMIN The REGEXP predicate only supports the default collating
sequence.
 4400 ZZZZZ 99999 BEGINNER MAJOR LOGONLY Internal error
 4401 ZZZZZ 99999 BEGINNER MAJOR LOGONLY No Privileged Segment
 4402 ZZZZZ 99999 BEGINNER MAJOR LOGONLY Program file not authorized

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/common/OperTypeEnum.h
----------------------------------------------------------------------
diff --git a/core/sql/common/OperTypeEnum.h b/core/sql/common/OperTypeEnum.h
index 6d925ad..33f018b 100644
--- a/core/sql/common/OperTypeEnum.h
+++ b/core/sql/common/OperTypeEnum.h
@@ -470,6 +470,10 @@ enum OperatorTypeEnum {
                         ITM_OLAP_LEAD = 2176,
                         ITM_OLAP_LAG = 2177,
 
+                        // Regular Expression
+                        ITM_PATTERNMATCHINGFUNCTION = 2178,
+                        ITM_REGEXP = 2179,
+
                         // numeric functions
                         ITM_ABS = 2200,
                         ITM_CEIL = 2201,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/generator/GenItemFunc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenItemFunc.cpp b/core/sql/generator/GenItemFunc.cpp
index 77d9913..3992389 100644
--- a/core/sql/generator/GenItemFunc.cpp
+++ b/core/sql/generator/GenItemFunc.cpp
@@ -89,7 +89,9 @@ short BuiltinFunction::codeGen(Generator * generator)
 						       attr, space);
       }
     break;
-    
+    case ITM_REGEXP:
+//TODO
+    break; 
     case ITM_LIKE:
       {
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/BindItemExpr.cpp b/core/sql/optimizer/BindItemExpr.cpp
index d145a18..2241600 100644
--- a/core/sql/optimizer/BindItemExpr.cpp
+++ b/core/sql/optimizer/BindItemExpr.cpp
@@ -6355,7 +6355,7 @@ ItemExpr *Cast::bindNode(BindWA *bindWA)
 // member functions for class Like
 // -----------------------------------------------------------------------
 
-ItemExpr *Like::bindNode(BindWA *bindWA)
+ItemExpr *PatternMatchingFunction::bindNode(BindWA *bindWA)
 {
   if (nodeIsBound())
     return getValueId().getItemExpr();
@@ -6438,9 +6438,9 @@ ItemExpr *Like::bindNode(BindWA *bindWA)
 
   return applyBeginEndKeys(bindWA, boundExpr, bindWA->wHeap());
 
-} // Like::bindNode()
+} // PatternMatchingFunction::bindNode()
 
-NABoolean Like::beginEndKeysApplied(CollHeap *heap)
+NABoolean PatternMatchingFunction::beginEndKeysApplied(CollHeap *heap)
 {
   // Called by optimizer, long after binding (thus bindNode has already
   // called the common method applyBeginEndKeys and done the appropriate
@@ -6451,7 +6451,13 @@ NABoolean Like::beginEndKeysApplied(CollHeap *heap)
 
   return beginEndKeysApplied_;
 
-} // Like::beginEndKeysApplied()
+} // PatternMatchingFunction::beginEndKeysApplied()
+
+ItemExpr *Regexp::applyBeginEndKeys(BindWA *bindWA, ItemExpr *boundExpr,
+				  CollHeap *heap)
+{
+  return boundExpr;
+}
 
 ItemExpr *Like::applyBeginEndKeys(BindWA *bindWA, ItemExpr *boundExpr,
 				  CollHeap *heap)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/optimizer/ItemCache.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ItemCache.cpp b/core/sql/optimizer/ItemCache.cpp
index 703f9f8..4639e2d 100644
--- a/core/sql/optimizer/ItemCache.cpp
+++ b/core/sql/optimizer/ItemCache.cpp
@@ -1201,7 +1201,7 @@ void ItemList::parameterizeMe(CacheWA& cwa, BindWA& bindWA,
ExprValueId& child,
 }
 
 // append an ascii-version of LIKE into cachewa.qryText_
-void Like::generateCacheKey(CacheWA& cwa) const
+void PatternMatchingFunction::generateCacheKey(CacheWA& cwa) const
 {
   // we are deliberately excluding from cachekey the data members: 
   // numberOfNonWildcardChars_, patternAStringLiteral_, 
@@ -1212,7 +1212,7 @@ void Like::generateCacheKey(CacheWA& cwa) const
 }
 
 // change literals of a cacheable query into ConstantParameters 
-ItemExpr* Like::normalizeForCache(CacheWA& cwa, BindWA& bindWA)
+ItemExpr* PatternMatchingFunction::normalizeForCache(CacheWA& cwa, BindWA& bindWA)
 {
   if (nodeIsNormalizedForCache()) { 
     return this; 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/optimizer/ItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ItemExpr.cpp b/core/sql/optimizer/ItemExpr.cpp
index aa0b722..53d0f5f 100644
--- a/core/sql/optimizer/ItemExpr.cpp
+++ b/core/sql/optimizer/ItemExpr.cpp
@@ -7922,10 +7922,46 @@ ItemExpr * InverseOrder::removeInverseOrder()
 }
 
 // -----------------------------------------------------------------------
+// member functions for PatternMatchingFunction.
+// -----------------------------------------------------------------------
+PatternMatchingFunction::~PatternMatchingFunction() {}
+
+// -----------------------------------------------------------------------
 // member functions for Like
 // -----------------------------------------------------------------------
 Like::~Like() {}
 
+Regexp::~Regexp() {}
+
+
+ItemExpr * Regexp::copyTopNode(ItemExpr *derivedNode, CollHeap* outHeap)
+{
+  ItemExpr *result = NULL;
+
+  if (derivedNode == NULL)
+    {
+      switch (getArity())
+	{
+	case 2:
+	  result = new (outHeap) Regexp(child(0), child(1),
+	    numberOfNonWildcardChars_,
+	    bytesInNonWildcardChars_,
+	    patternAStringLiteral_,
+	    oldDefaultSelForLikeWildCardUsed_,
+	    beginEndKeysApplied_);
+	  break;
+	default:
+	  CMPASSERT(0 == 1);
+	  break;
+	}
+    }
+  else
+    result = derivedNode;
+
+  return BuiltinFunction::copyTopNode(result, outHeap);
+
+} // Regexp::copyTopNode()
+
 ItemExpr * Like::copyTopNode(ItemExpr *derivedNode, CollHeap* outHeap)
 {
   ItemExpr *result = NULL;
@@ -7962,7 +7998,7 @@ ItemExpr * Like::copyTopNode(ItemExpr *derivedNode, CollHeap* outHeap)
 
 } // Like::copyTopNode()
 
-double Like::defaultSel()
+double PatternMatchingFunction::defaultSel()
 {
   // if begin and end keys have been applied to this expression, then this means
   // that the original LIKE predicate was something like a%b. This was transformed
@@ -7984,7 +8020,7 @@ double Like::defaultSel()
   return computeSelForNonWildcardChars(); ;
 }
 
-void Like::setNumberOfNonWildcardChars(const LikePatternString &pattern)
+void PatternMatchingFunction::setNumberOfNonWildcardChars(const LikePatternString &pattern)
 {
   Int32 count = 0;
   Int32 byteCnt = 0;
@@ -8010,7 +8046,7 @@ void Like::setNumberOfNonWildcardChars(const LikePatternString &pattern)
   bytesInNonWildcardChars_  = byteCnt ;
 }
 
-double Like::computeSelForNonWildcardChars()
+double PatternMatchingFunction::computeSelForNonWildcardChars()
 {
 
   // get the default selectivity for like predicate
@@ -8056,7 +8092,7 @@ double Like::computeSelForNonWildcardChars()
   return defaultSelectivity;
 }
 
-NABoolean Like::hasEquivalentProperties(ItemExpr * other)
+NABoolean PatternMatchingFunction::hasEquivalentProperties(ItemExpr * other)
 {
   if (other == NULL)
     return FALSE;
@@ -8075,7 +8111,7 @@ NABoolean Like::hasEquivalentProperties(ItemExpr * other)
 
 }
 
-void Like::unparse(NAString &result,
+void PatternMatchingFunction::unparse(NAString &result,
 		   PhaseEnum phase,
 		   UnparseFormatEnum form,
 		   TableDesc* tabId) const

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/optimizer/ItemFunc.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ItemFunc.h b/core/sql/optimizer/ItemFunc.h
index 7493134..8bde61a 100644
--- a/core/sql/optimizer/ItemFunc.h
+++ b/core/sql/optimizer/ItemFunc.h
@@ -1254,11 +1254,12 @@ private:
 
 }; // class CharFunc
 
-class Like : public CacheableBuiltinFunction
+
+class PatternMatchingFunction : public CacheableBuiltinFunction
 {
 public:
-  Like(ItemExpr *matchValue, ItemExpr *pattern)
-  : CacheableBuiltinFunction(ITM_LIKE, 2, matchValue, pattern),
+  PatternMatchingFunction(OperatorTypeEnum optype, ItemExpr *matchValue, ItemExpr *pattern)
+  : CacheableBuiltinFunction(optype, 2, matchValue, pattern),
    numberOfNonWildcardChars_(-1), patternAStringLiteral_(FALSE),
    bytesInNonWildcardChars_(-1),
    oldDefaultSelForLikeWildCardUsed_(FALSE), beginEndKeysApplied_(FALSE)
@@ -1267,8 +1268,8 @@ public:
     setCollation(CharInfo::DefaultCollation);
   }
 
-  Like(ItemExpr *matchValue, ItemExpr *pattern, ItemExpr *escapeChar)
-  : CacheableBuiltinFunction(ITM_LIKE, 3, matchValue, pattern, escapeChar),
+  PatternMatchingFunction(OperatorTypeEnum optype, ItemExpr *matchValue, ItemExpr *pattern,
ItemExpr *escapeChar)
+  : CacheableBuiltinFunction(optype, 3, matchValue, pattern, escapeChar),
    numberOfNonWildcardChars_(-1), patternAStringLiteral_(FALSE),
    bytesInNonWildcardChars_(-1),
    oldDefaultSelForLikeWildCardUsed_(FALSE), beginEndKeysApplied_(FALSE)
@@ -1277,10 +1278,10 @@ public:
     setCollation(CharInfo::DefaultCollation);
   }
 
-  Like(ItemExpr *matchValue, ItemExpr *pattern, Int32 numNonWild, Int32 bytesInNonWild,
+  PatternMatchingFunction(OperatorTypeEnum optype,ItemExpr *matchValue, ItemExpr *pattern,
Int32 numNonWild, Int32 bytesInNonWild,
     NABoolean stringPattern, NABoolean oldDefaultUsed, 
     NABoolean beginEndKeysApplied)
-  : CacheableBuiltinFunction(ITM_LIKE, 2, matchValue, pattern),
+  : CacheableBuiltinFunction(optype, 2, matchValue, pattern),
    numberOfNonWildcardChars_(numNonWild), 
    bytesInNonWildcardChars_(bytesInNonWild),
    patternAStringLiteral_(stringPattern),
@@ -1291,10 +1292,10 @@ public:
     setCollation(CharInfo::DefaultCollation);
   }
 
-  Like(ItemExpr *matchValue, ItemExpr *pattern, ItemExpr *escapeChar,  
+  PatternMatchingFunction(OperatorTypeEnum optype,ItemExpr *matchValue, ItemExpr *pattern,
ItemExpr *escapeChar,  
     Int32 numNonWild, Int32 bytesInNonWild,NABoolean stringPattern, NABoolean oldDefaultUsed,
     NABoolean beginEndKeysApplied)
-  : CacheableBuiltinFunction(ITM_LIKE, 3, matchValue, pattern, escapeChar),
+  : CacheableBuiltinFunction(optype, 3, matchValue, pattern, escapeChar),
    numberOfNonWildcardChars_(numNonWild), 
    bytesInNonWildcardChars_(bytesInNonWild),
    patternAStringLiteral_(stringPattern),
@@ -1306,15 +1307,15 @@ public:
   }
 
   // virtual destructor
-  virtual ~Like();
+  virtual ~PatternMatchingFunction();
 
   // a virtual function for performing name binding within the query tree
   virtual ItemExpr * bindNode(BindWA *bindWA);
 
-  // change only constant matchValue of a LIKE into ConstantParameter
+  // change only constant matchValue of a PatternMatchingFunction into ConstantParameter
   virtual ItemExpr* normalizeForCache(CacheWA& cwa, BindWA& bindWA);
 
-  // append an ascii-version of LIKE into cachewa.qryText_
+  // append an ascii-version of PatternMatchingFunction into cachewa.qryText_
   virtual void generateCacheKey(CacheWA& cwa) const;
 
   // a virtual function for type propagating the node
@@ -1323,7 +1324,7 @@ public:
   NABoolean isRelaxCharTypeMatchRulesPossible() {return TRUE;};
 
   virtual ItemExpr * copyTopNode(ItemExpr *derivedNode = NULL,
-				 CollHeap* outHeap = 0);
+				 CollHeap* outHeap = 0) { return NULL; }
 
   // predicateEliminatesNullAugmentedRows() determines whether the
   // the predicate is capable of discarding null augmented rows 
@@ -1368,8 +1369,9 @@ public:
      UnparseFormatEnum form = USER_FORMAT,
      TableDesc * tabId = NULL) const;
 
-private:
-  ItemExpr *applyBeginEndKeys(BindWA *bindWA, ItemExpr *boundExpr, CollHeap *h);
+
+  virtual ItemExpr *applyBeginEndKeys(BindWA *bindWA, ItemExpr *boundExpr, CollHeap *h) {
return NULL; }
+protected:
   void setNumberOfNonWildcardChars(const LikePatternString &pattern);
 
   Int32 numberOfNonWildcardChars_;
@@ -1382,9 +1384,81 @@ private:
   NABoolean beginEndKeysApplied_;
 
   CharInfo::Collation collation_;
+  
+}; // class PatternMatchingFunction
+
 
+class Like : public PatternMatchingFunction
+{
+public:
+  Like(ItemExpr *matchValue, ItemExpr *pattern)
+  : PatternMatchingFunction(ITM_LIKE, matchValue, pattern)
+  { 
+    allowsSQLnullArg() = FALSE;
+    setCollation(CharInfo::DefaultCollation);
+  }
+
+  Like(ItemExpr *matchValue, ItemExpr *pattern, ItemExpr *escapeChar)
+  : PatternMatchingFunction(ITM_LIKE, matchValue, pattern, escapeChar)
+  { 
+    allowsSQLnullArg() = FALSE; 
+    setCollation(CharInfo::DefaultCollation);
+  }
+
+  Like(ItemExpr *matchValue, ItemExpr *pattern, Int32 numNonWild, Int32 bytesInNonWild,
+    NABoolean stringPattern, NABoolean oldDefaultUsed, 
+    NABoolean beginEndKeysApplied)
+  : PatternMatchingFunction(ITM_LIKE, matchValue, pattern,numNonWild,bytesInNonWild,
+     stringPattern,oldDefaultUsed, beginEndKeysApplied)
+  { 
+    allowsSQLnullArg() = FALSE;
+    setCollation(CharInfo::DefaultCollation);
+  }
+
+  Like(ItemExpr *matchValue, ItemExpr *pattern, ItemExpr *escapeChar,  
+    Int32 numNonWild, Int32 bytesInNonWild,NABoolean stringPattern, NABoolean oldDefaultUsed,
+    NABoolean beginEndKeysApplied)
+  : PatternMatchingFunction(ITM_LIKE, matchValue, pattern, escapeChar,numNonWild,bytesInNonWild,
+     stringPattern,oldDefaultUsed,beginEndKeysApplied) 
+  { 
+    allowsSQLnullArg() = FALSE; 
+    setCollation(CharInfo::DefaultCollation);
+  }
+
+  // virtual destructor
+  virtual ~Like();
+  ItemExpr *applyBeginEndKeys(BindWA *bindWA, ItemExpr *boundExpr, CollHeap *h);
+  ItemExpr * copyTopNode(ItemExpr *derivedNode = NULL,
+				 CollHeap* outHeap = 0);
 }; // class Like
 
+class Regexp : public PatternMatchingFunction
+{
+public:
+  Regexp(ItemExpr *matchValue, ItemExpr *pattern)
+  : PatternMatchingFunction(ITM_REGEXP, matchValue, pattern)
+  { 
+    allowsSQLnullArg() = FALSE;
+    setCollation(CharInfo::DefaultCollation);
+  }
+
+  Regexp(ItemExpr *matchValue, ItemExpr *pattern, Int32 numNonWild, Int32 bytesInNonWild,
+    NABoolean stringPattern, NABoolean oldDefaultUsed, 
+    NABoolean beginEndKeysApplied)
+  : PatternMatchingFunction(ITM_REGEXP, matchValue, pattern,numNonWild,bytesInNonWild,
+     stringPattern,oldDefaultUsed, beginEndKeysApplied)
+  { 
+    allowsSQLnullArg() = FALSE;
+    setCollation(CharInfo::DefaultCollation);
+  }
+
+  // virtual destructor
+  virtual ~Regexp();
+  ItemExpr *applyBeginEndKeys(BindWA *bindWA, ItemExpr *boundExpr, CollHeap *h);
+  ItemExpr * copyTopNode(ItemExpr *derivedNode = NULL,
+				 CollHeap* outHeap = 0);
+}; // class Regexp
+ 
 class NoOp : public BuiltinFunction
 {
   // Does nothing. An ItemExpr place holder. Used by

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/optimizer/NormItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NormItemExpr.cpp b/core/sql/optimizer/NormItemExpr.cpp
index a911744..08e5d30 100644
--- a/core/sql/optimizer/NormItemExpr.cpp
+++ b/core/sql/optimizer/NormItemExpr.cpp
@@ -2735,7 +2735,7 @@ DisjunctArray * BiRelat::mdamTreeWalk()
 // The following method determines whether a predicate is capable of
 // discarding null augmented rows produced by a left join.
 // -----------------------------------------------------------------------
-NABoolean Like::predicateEliminatesNullAugmentedRows(NormWA & normWARef,
+NABoolean PatternMatchingFunction::predicateEliminatesNullAugmentedRows(NormWA & normWARef,
                                             ValueIdSet & outerReferences)
 {
   NABoolean returnValue = FALSE;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/optimizer/SynthType.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/SynthType.cpp b/core/sql/optimizer/SynthType.cpp
index 8c78d85..14d8f06 100644
--- a/core/sql/optimizer/SynthType.cpp
+++ b/core/sql/optimizer/SynthType.cpp
@@ -4344,7 +4344,7 @@ const NAType *InverseOrder::synthesizeType()
 // member functions for class Like
 // -----------------------------------------------------------------------
 
-const NAType *Like::synthesizeType()
+const NAType *PatternMatchingFunction::synthesizeType()
 {
   //
   // Type cast any params.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/parser/ParKeyWords.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/ParKeyWords.cpp b/core/sql/parser/ParKeyWords.cpp
index 0cb1aec..f09a893 100644
--- a/core/sql/parser/ParKeyWords.cpp
+++ b/core/sql/parser/ParKeyWords.cpp
@@ -866,6 +866,7 @@ ParKeyWord ParKeyWords::keyWords_[] = {
   ParKeyWord("REFERENCES",         TOK_REFERENCES,  ANS_|RESWORD_),
   ParKeyWord("REFERENCING",        TOK_REFERENCING, ANS_|RESWORD_|NONRESTOKEN_),
   ParKeyWord("REFRESH",            TOK_REFRESH,     FLAGSNONE_),
+  ParKeyWord("REGEXP",             TOK_REGEXP,      NONRESTOKEN_),
   ParKeyWord("REGION",             TOK_REGION,      NONRESTOKEN_),
   ParKeyWord("REGISTER",           TOK_REGISTER,    NONRESTOKEN_),
   ParKeyWord("REINITIALIZE",       TOK_REINITIALIZE, FIRST_|NONRESTOKEN_),

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/05e19f26/core/sql/parser/sqlparser.y
----------------------------------------------------------------------
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index f1cbee2..f8c9456 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -1360,6 +1360,7 @@ static void enableMakeQuotedStringISO88591Mechanism()
 %token <tokval> TOK_RANGELOG			/* MV */
 %token <tokval> TOK_REBUILD
 %token <tokval> TOK_REFERENCES
+%token <tokval> TOK_REGEXP
 %token <tokval> TOK_REGION
 %token <tokval> TOK_REGISTER            /* Tandem extension */
 %token <tokval> TOK_UNREGISTER          /* Tandem extension */
@@ -19060,6 +19061,11 @@ like_predicate : value_expression not_like value_expression
 				  if ($2 == TOK_NOT)
 				    $$ = new (PARSERHEAP()) UnLogic(ITM_NOT,$$);
 				}
+              | value_expression TOK_REGEXP value_expression
+                                {
+                                  //TODO
+                                  YYERROR;
+                                } 
 
 /* type item */
 exists_predicate : TOK_EXISTS rel_subquery
@@ -33406,6 +33412,7 @@ nonreserved_word :      TOK_ABORT
                       | TOK_MV_TABLE  
 		      | TOK_MVSTATUS	// MV
 		      | TOK_MVS_UMD //
+		      | TOK_REGEXP  
 		      | TOK_REMOVE //
 		      | TOK_OPENBLOWNAWAY //
 		      | TOK_REDEFTIME	// Y_TEST


Mime
View raw message