Skip to content

v1.0.3

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Nov 15:48
· 3 commits to main since this release

Fixes silently wrong results where Oracle operators were not lowered or (+) was dropped.

Three defects changed results without an error, plus three related gaps found while fixing them. Statements that cannot be lowered safely are now rejected.

Changes

Fixed

  • (+) was removed lexically whenever the preceding text contained JOIN ... ON, including inside literals and earlier subqueries, turning an outer join into an inner join. The marker is now handled on the parsed tree only.
  • Division, concatenation, SYSDATE arithmetic and other Oracle operators were not lowered inside IN, BETWEEN, NOT and analytic functions. For example WHERE sal/3 IN (SELECT sal/3 ...) returned no rows, and SUM(n1/2) OVER () used integer division.
  • MOD, CEIL, REPLACE, TRANSLATE and UPPER were lowered only when something else sent the statement to the parser. They are now always lowered (REPLACE(s, 'a', '') returned NULL for every row).
  • Subqueries inside UPDATE SET, UPDATE/DELETE WHERE, MERGE USING and INSERT VALUES were skipped by every rule; they are now lowered like any query block.
  • N'' became the identifier NNULL; it is now NULL.
  • A TIMESTAMP literal with more than six fractional digits could bypass its rejection when nothing else needed the parser.

Compatibility impact

  • A redundant (+) on the optional relation of an ANSI LEFT JOIN is still accepted. Any other (+) in an ANSI ON condition is rejected with OUTER_JOIN_MIXED (Oracle returns ORA-01468 for a marker on the mandatory side).
  • A statement with an Oracle operator under an expression node the rules do not handle (for example COLLATE) is rejected with SCALAR_CONTEXT.
  • Known limitation: REPLACE(column, ...) and MOD(column, ...) in a select list return Oracle's rows, but the JDBC metadata precision differs.

Verification

532 differential tests against Oracle 18c XE 18.4.0.0.0 and 724 Maven tests, all passing, including 16 new cases.

Downloads

Also on Maven Central: io.github.ltslab:orafit-jdbc:1.0.3

Install / Upgrade

Replace the driver JAR. No runtime reinstall is needed. Re-run the analyzer over your SQL: statements that were silently mistranslated may now be rejected.

Full Changelog: v1.0.2...v1.0.3