feat: Oracle 18c/19c support (soda-core dialect capability + test infra)#2795
Merged
Conversation
…probes Supporting changes for Oracle 18c/19c compatibility (soda-core side): - SqlDialect.supports_native_boolean() (default True). Data sources whose BOOLEAN cannot round-trip -- Oracle < 23ai stores it as NUMBER, which is indistinguishable from other numerics on read-back -- override to False. - DataSourceTestHelper.select_literal_query() for portable constant SELECTs (Oracle appends FROM DUAL). - TestConnection health-check probe moved into the helper (_connection_test_query) instead of a raw FROM-less "SELECT 1". - Data-type and rows_tested tests made capability/version aware. Behavior for all non-Oracle data sources is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add an Oracle-gated schema-check test asserting a `data_type: boolean` contract passes (pre-23ai stores BOOLEAN as NUMBER; 23ai native). - Route the rows_tested_query `SELECT NULL` case through select_literal_query (adds FROM DUAL on Oracle), consistent with the other constant queries. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Niels-b
force-pushed
the
r-606-oracle-19-support
branch
from
July 15, 2026 15:51
48bd831 to
1503baa
Compare
…call) - test_schema_check.py: use a plain string (not an f-string) for the boolean schema-check contract; it has no replacement fields. - test_connection.py: hoist the connection-probe query into a variable so only execute_query can throw inside the pytest.raises block. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`valid_values: []` / `invalid_values: []` produced a bare boolean literal (AND([LITERAL(True/False)])) used in predicate position. That is valid on sources with a native boolean (Postgres, Oracle 23ai) but not on those without one — on pre-23ai Oracle it renders as `CASE WHEN 1 ...` and raises ORA-00920. Emit a portable always-true / always-false comparison (`1 = 1` / `1 = 0`) instead, which is semantically identical and valid on every dialect. No recorded snapshot exercises this edge case, so existing sources are unaffected. Adds two rendering regression tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
paulteehan
approved these changes
Jul 16, 2026
paulteehan
left a comment
Contributor
There was a problem hiding this comment.
Minor thing that confused me a bit, up to you
see also the requested changes in the other PR, I didn't check if they have interactions here at all, I don't think so? maybe double-check
…fy literal-select Review follow-ups (#2795): - supports_native_boolean() was only ever consumed by test code, so move it off the production SqlDialect onto DataSourceTestHelper (base returns True; the Oracle test helper overrides it). The production dialect keeps its single version gate (OracleSqlDialect._is_pre_23ai). Callers in the test helper and test_soda_data_types updated accordingly. - Add DataSourceTestHelper.build_select_literal_query(type, expr) as the single source of truth for a literal SELECT (Oracle needs FROM DUAL; others accept a bare SELECT). select_literal_query delegates to it and TestConnection._connection_test_query reuses it instead of its own hardcoded Oracle branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
paulteehan
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Oracle 18c/19c support — soda-core side
Part of cross-repo Oracle 18c/19c support. This PR carries the soda-core-side dialect capability and test infrastructure; the Oracle dialect/adapter changes live in the paired soda-extensions PR on the matching
r-606-oracle-19-supportbranch.Why
Oracle < 23ai lacks several SQL features that 23ai added (native
BOOLEAN, multi-rowVALUES,IF [NOT] EXISTS, FROM-lessSELECT, ...). Supporting Oracle 18c/19c requires a small, additive capability hook in the core dialect plus version-aware test helpers.Changes (additive; non-Oracle behavior unchanged)
SqlDialect.supports_native_boolean()— defaultTrue. Data sources whoseBOOLEANcannot round-trip (Oracle < 23ai stores it asNUMBER, indistinguishable from other numerics on read-back) override toFalse.DataSourceTestHelper.select_literal_query()— portable "select a literal" query for tests (Oracle appendsFROM DUAL);get_column_mappings()expectsNUMERICfor the boolean column when the source has no native boolean.TestConnectionhealth-check probe moved into the helper (_connection_test_query) instead of a raw FROM-lessSELECT 1.data_type: booleancontract passes.Validation
Validated against Postgres, Oracle 23ai, and Oracle 18c (18c is a proxy for 19c — same 12.2 kernel family): integration suite, DWH (both transfer modes), and connection/schema/rows_tested tests — all green, no regressions on non-Oracle sources.
🤖 Generated with Claude Code