Skip to content

feat: add oracle_sql dialect support#5821

Merged
max-sixty merged 5 commits intoPRQL:mainfrom
julien-pinchelimouroux:add-oracle-dialect
Apr 23, 2026
Merged

feat: add oracle_sql dialect support#5821
max-sixty merged 5 commits intoPRQL:mainfrom
julien-pinchelimouroux:add-oracle-dialect

Conversation

@julien-pinchelimouroux
Copy link
Copy Markdown
Contributor

Add basic support for Oracle SQL dialect to force quotes on identifiers.

Copy link
Copy Markdown
Collaborator

@prql-bot prql-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cli::test::get_targets snapshot will fail in CI. #[strum(serialize_all = "lowercase")] on Dialect lowercases variants without adding separators — OracleSql serializes as oraclesql, not oracle_sql. Running prqlc list-targets against this branch locally outputs sql.oraclesql, so the expected line added at cli/test.rs:89 won't match.

That also makes the CLI target name diverge from the Elixir binding atom :oracle_sql.

Two ways to reconcile:

  • Rename the variant OracleSqlOracle (matches the existing Postgres, Snowflake, Redshift convention; CLI target becomes sql.oracle, Elixir atom becomes :oracle). Updates needed in dialect.rs, cli/test.rs, tests/integration/sql.rs, and the Elixir binding's atom + match arm.
  • Keep OracleSql and add #[strum(serialize = "oracle_sql")] on the variant so the user-facing name stays oracle_sql; the snapshot at cli/test.rs:89 then stays correct.

A couple of items missing outside the diff — happy to push a commit for these once the naming question is settled:

  • web/book/src/project/target.md lists supported/unsupported dialects; Oracle isn't in either list.
  • prqlc/bindings/elixir/lib/prql.ex:42-43 docstring enumerates accepted atoms; :oracle_sql is missing there too.

Copy link
Copy Markdown
Collaborator

@prql-bot prql-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rename to Dialect::Oracle is missed in the integration test, breaking the build (test-rust (wasm32...) is already failing on this commit). One inline suggestion below.

Comment thread prqlc/prqlc/tests/integration/sql.rs Outdated
Co-authored-by: prql-bot <107324867+prql-bot@users.noreply.github.com>
@max-sixty
Copy link
Copy Markdown
Member

@prql-bot can you add a short note to the docs etc re having a very early version of Oracle dialect?

Adds a short note next to `sql.oracle` in the dialects list and a
changelog entry, clarifying that the initial Oracle dialect only forces
identifier quoting and most other features fall back to generic SQL.

Requested by @max-sixty in
PRQL#5821 (comment).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@prql-bot
Copy link
Copy Markdown
Collaborator

Added a short note in bef16d4 — the dialects list in web/book/src/project/target.md now calls out that sql.oracle is very early (only forces identifier quoting; most other features fall back to generic SQL), and there's a matching CHANGELOG.md entry under Features.

@max-sixty max-sixty merged commit 88c80bb into PRQL:main Apr 23, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants