trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [2/5] trafodion git commit: fix yacc conflicts
Date Thu, 05 Jul 2018 22:26:00 GMT
fix yacc conflicts


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

Branch: refs/heads/master
Commit: fc8873cae019fc4f2125da9779687ebdd31a5964
Parents: b90abce
Author: kakaxi3019 <jupiter3019@163.com>
Authored: Tue Jun 26 13:53:15 2018 +0800
Committer: kakaxi3019 <jupiter3019@163.com>
Committed: Tue Jun 26 13:53:15 2018 +0800

----------------------------------------------------------------------
 core/sql/parser/sqlparser.y          | 9 ++++++++-
 core/sql/regress/seabase/EXPECTED030 | 4 +++-
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/fc8873ca/core/sql/parser/sqlparser.y
----------------------------------------------------------------------
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index 4dbb8a0..002d719 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -67,6 +67,7 @@
 // This solves the problem because bison does not have to reduce after reading TOK_DROP.
Rather,
 // after reading TOK_DROP TOK_TABLE, it can lookahead at the next token to decide what to
do.
 
+
 #include "Platform.h"				// must be the first #include
 //debug yacc
 #define YY_LOG_FILE "yylog"
@@ -2047,6 +2048,7 @@ static void enableMakeQuotedStringISO88591Mechanism()
 %type <intervalQualifier>	end_field
 %type <intervalQualifier>       fraction_only_interval
 %type <datetimeField>		non_second_datetime_field
+%type <datetimeField>		new_non_second_datetime_field
 %type <datetimeField>		datetime_field
 %type <datetimeQualifier>       datetime_qualifier           //For MP Datetime
 %type <datetimeQualifier>       datetime_start_field         //For MP Datetime
@@ -12486,7 +12488,8 @@ non_second_datetime_field : TOK_YEAR
                           {
                             $$ = REC_DATE_MINUTE;
                           }
-                          | TOK_CENTURY
+new_non_second_datetime_field:
+                          TOK_CENTURY
                           {
                             $$ = REC_DATE_CENTURY;
                           }
@@ -12524,6 +12527,10 @@ datetime_field : non_second_datetime_field
                {
                  $$ = $1;
                }
+               | new_non_second_datetime_field
+               {
+                 $$ = $1;
+               }
                | TOK_SECOND
                {
                  $$ = REC_DATE_SECOND;

http://git-wip-us.apache.org/repos/asf/trafodion/blob/fc8873ca/core/sql/regress/seabase/EXPECTED030
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/EXPECTED030 b/core/sql/regress/seabase/EXPECTED030
index 003b615..dc03a1e 100644
--- a/core/sql/regress/seabase/EXPECTED030
+++ b/core/sql/regress/seabase/EXPECTED030
@@ -554,7 +554,7 @@ March 01, 2016, 10:11
 (EXPR)
 ------
 
-	 1
+     1
 
 --- 1 row(s) selected.
 >>select extract(epoch from timestamp '2000-12-30 20:38:40.12') from (values(1)) as
t(a);
@@ -577,6 +577,7 @@ March 01, 2016, 10:11
 
 (EXPR)
 ------
+
    172
 
 --- 1 row(s) selected.
@@ -584,6 +585,7 @@ March 01, 2016, 10:11
 
 (EXPR)
 ------
+
      3
 
 --- 1 row(s) selected.


Mime
View raw message