From 57f98a17c785859f178321e1836010cdd79383ea Mon Sep 17 00:00:00 2001 From: JiaqiYan Date: Thu, 23 Nov 2023 22:21:59 +0800 Subject: [PATCH] Support Oracle noAuditTraditional SQL parse --- .../src/main/antlr4/imports/oracle/DDLStatement.g4 | 10 +++++++++- .../it/parser/src/main/resources/case/ddl/no-audit.xml | 4 ++++ .../src/main/resources/sql/supported/ddl/no-audit.xml | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 index 02cad8304b278..2dd58acd942e5 100644 --- a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 +++ b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 @@ -2304,7 +2304,7 @@ auditUnified : AUDIT (auditPolicyClause | contextClause) ; -noAudit +noAuditUnified : NOAUDIT (noAuditPolicyClause | contextClause) ; @@ -4138,3 +4138,11 @@ createProfile : CREATE MANDATORY? PROFILE profileName LIMIT (resourceParameters | passwordParameters)+ (CONTAINER EQ_ (CURRENT | ALL))? ; +noAudit + : noAuditTraditional | noAuditUnified + ; + +noAuditTraditional + : NOAUDIT (auditOperationClause auditingByClause? | auditSchemaObjectClause | NETWORK | DIRECT_PATH LOAD auditingByClause?) + (WHENEVER NOT? SUCCESSFUL)? (CONTAINER EQ_ (CURRENT | ALL))? + ; diff --git a/test/it/parser/src/main/resources/case/ddl/no-audit.xml b/test/it/parser/src/main/resources/case/ddl/no-audit.xml index 6322c0042a66d..7671949d91dfb 100644 --- a/test/it/parser/src/main/resources/case/ddl/no-audit.xml +++ b/test/it/parser/src/main/resources/case/ddl/no-audit.xml @@ -21,4 +21,8 @@ + + + + diff --git a/test/it/parser/src/main/resources/sql/supported/ddl/no-audit.xml b/test/it/parser/src/main/resources/sql/supported/ddl/no-audit.xml index 218049f246ebe..f517a072361d7 100644 --- a/test/it/parser/src/main/resources/sql/supported/ddl/no-audit.xml +++ b/test/it/parser/src/main/resources/sql/supported/ddl/no-audit.xml @@ -21,4 +21,8 @@ + + + +