You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/06/16 06:32:24 UTC
[GitHub] [shardingsphere] jingshanglu commented on a change in pull request #6045: Refactor pg grammar file, fix #5802
jingshanglu commented on a change in pull request #6045:
URL: https://github.com/apache/shardingsphere/pull/6045#discussion_r440615230
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
##########
@@ -141,166 +509,836 @@ primaryKey
: PRIMARY? KEY
;
-// TODO comb expr
-expr
- : expr logicalOperator expr
- | notOperator_ expr
- | LP_ expr RP_
- | booleanPrimary
- ;
-
logicalOperator
: OR | OR_ | AND | AND_
;
-notOperator_
- : NOT | NOT_
+comparisonOperator
+ : EQ_ | GTE_ | GT_ | LTE_ | LT_ | NEQ_
;
-booleanPrimary
- : booleanPrimary IS NOT? (TRUE | FALSE | UNKNOWN | NULL)
- | booleanPrimary SAFE_EQ_ predicate
- | booleanPrimary comparisonOperator predicate
- | booleanPrimary comparisonOperator (ALL | ANY) subquery
- | predicate
+
+cursor_name
+ : name
+ ;
+
+a_expr
Review comment:
pg's source code is so named and applied directly, in order to be consistent with the source code. It's just an expression.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org