Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Transpiler misses Oracle (+) operator essentially converting all outer joins to inner joins #1424

Open
1 task done
Tagar opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working transpile/legacy related to prototype implementation in sqlglot

Comments

@Tagar
Copy link

Tagar commented Jan 22, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Category of Bug / Issue

TranspileParserError

Current Behavior

[BUG]: Transpiler misses Oracle (+) operator essentially converting all outer joins to inner joins.

Oracle supports two ways to notate outer joins -

  • Oracle-specific with the (+) operator -- example
           FROM WEB_STAGE.WCS_CATGROUP a,
                WEB_STAGE.WCS_CATGRPDESC b,
                WEB_STAGE.WCS_CATTOGRP c,
                ecom_dim.webstore d
          WHERE     A.CATGROUP_ID = b.catgroup_id(+)
                AND a.catgroup_id = C.CATGROUP_ID(+)
                AND A.MEMBER_ID = d.wcs_member_id(+)
  • and another is the ANSI compliant.

Remorph just skips the (+) for Oracle queries so essentially Oracle converts all outer joins to inner joins when this Oracle specific outer join notation is used.

Trent Shapiro @ Databricks ran into this in a PS project and can provide more details.

Expected Behavior

converted query has explicit OUTER join clause

Steps To Reproduce

No response

Relevant log output or Exception details

Sample Query

Operating System

macOS

Version

latest via Databricks CLI

@Tagar Tagar added the bug Something isn't working label Jan 22, 2025
@sundarshankar89 sundarshankar89 added the transpile/legacy related to prototype implementation in sqlglot label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transpile/legacy related to prototype implementation in sqlglot
Projects
None yet
Development

No branches or pull requests

2 participants