From 6b91ab0590796c775910cfaf6b468ef6a7939a80 Mon Sep 17 00:00:00 2001 From: vasilevskyy Date: Thu, 12 Sep 2024 11:37:34 +0300 Subject: [PATCH] Add new rule for predicate, correct rule for Table - checkConstraintDefinition --- .../firebird/src/main/antlr4/imports/firebird/BaseRule.g4 | 5 +---- .../src/main/antlr4/imports/firebird/DDLStatement.g4 | 2 +- .../src/main/antlr4/imports/firebird/FirebirdKeyword.g4 | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/BaseRule.g4 b/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/BaseRule.g4 index 26179efc0ee22..2474c05c47a10 100644 --- a/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/BaseRule.g4 +++ b/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/BaseRule.g4 @@ -112,10 +112,6 @@ tableName : (owner DOT_)? name ; -packageName - : identifier - ; - parameterName : identifier ; @@ -254,6 +250,7 @@ predicate | bitExpr NOT? STARTING WITH? bitExpr | bitExpr IS NOT? DISTINCT FROM bitExpr | bitExpr IS NOT? NULL + | bitExpr NOT? SIMILAR TO bitExpr (ESCAPE bitExpr)? | bitExpr ; diff --git a/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/DDLStatement.g4 b/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/DDLStatement.g4 index 0bb3fd5487f85..6b8df8f548ceb 100644 --- a/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/DDLStatement.g4 +++ b/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/DDLStatement.g4 @@ -262,7 +262,7 @@ dataTypeOption ; checkConstraintDefinition - : (CONSTRAINT ignoredIdentifier?)? CHECK expr + : (CONSTRAINT ignoredIdentifier?)? checkClause ; referenceDefinition diff --git a/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/FirebirdKeyword.g4 b/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/FirebirdKeyword.g4 index 05a9ab9bb6b98..e3acb2fa83d2b 100644 --- a/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/FirebirdKeyword.g4 +++ b/parser/sql/dialect/firebird/src/main/antlr4/imports/firebird/FirebirdKeyword.g4 @@ -973,4 +973,8 @@ DATABASE COMMENT : C O M M E N T + ; + +SIMILAR + : S I M I L A R ; \ No newline at end of file