prql
prql copied to clipboard
Support Oracle's SQL dialect
I did a double take when I saw the list of supported (/to-be-supported) SQL dialects.
A quick search for "database market share" will take you to multiple sources which confirm that not only is Oracle the most-used database, it has 100+ times the user base of some of the to-be-supported databases.
Am I missing something?
We inherit this from sqlparser-rs, this isn't meant as a normative statement!
Note that the generic dialect will work for most things; this is only needed for dialect-specific SQL.
Please feel free to open an issue there if Oracle would be helpful.
Thanks @Barney-x1
I don't really understand the dependency. Surely sqlparser-rs consumes SQL, whereas PRQL generates it?
sqlparser-rs also creates it! We convert into their ast at https://github.com/prql/prql/blob/0.2.6/prql-compiler/src/sql/translator.rs#L52 and then it writes it out. Does that make sense?
@Barney-x1 I'm not too familiar with Oracle dialect. Can you outline the key differences? Which quotes does it use for strings? Does it use TOP or LIMIT?
Because code produced by prql-compiler uses just a subset of SQL, it is very likely that it will work out of the box, if Oracle's SQL is compliant with ISO/IEC 9075.
Just to be clear, is the dialect called PL/SQL or is it just an extension?
I'll close this for the moment, given it relies on a feature upstream. Feel free to reopen if there's something we can do from here.
To reiterate, this is not a normative statement about Oracle. And because the vast majority of PL/SQL overlaps with standard SQL, it's very possible to use PRQL with an Oracle database already.