-
-
Notifications
You must be signed in to change notification settings - Fork 873
Description
Search before asking
- I searched the issues and found no similar issues.
What Happened
CREATE OR REPLACE TRIGGER
statement with oracle dialect is unparsable
Expected Behaviour
CREATE OR REPLACE TRIGGER
is parsed correctly for oracle
Observed Behaviour
Unparsable section parsing violation is raised.
==== parsing violations ====
L: 1 | P: 1 | PRS | Line 1, Position 1: Found unparsable section: 'CREATE OR REPLACE
| TRIGGER contract_trigg...'
WARNING: Parsing errors found and dialect is set to 'oracle'. Have you configured your dialect correctly?
Syntax tree:
[L: 1, P: 1] |file:
[L: 1, P: 1] | unparsable: !! Expected: "<AnyNumberOf: [<Ref: 'ExecuteFileSegment'>, <Delimited: [<Ref: 'StatementSegment'>]>]>"
[L: 1, P: 1] | word: 'CREATE'
[L: 1, P: 7] | whitespace: ' '
[L: 1, P: 8] | word: 'OR'
[L: 1, P: 10] | whitespace: ' '
[L: 1, P: 11] | word: 'REPLACE'
...
How to reproduce
Run sqlfluff parse --dialect oracle <filename>
on file with content
CREATE OR REPLACE TRIGGER contract_trigger
BEFORE INSERT OR UPDATE ON contracts
FOR EACH ROW
/
Dialect
oracle
Version
sqlfluff version
3.3.0
python --version
Python 3.13.1
Configuration
No configuration
Are you willing to work on and submit a PR to address the issue?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct