Title: design: DataFrame joins (join, joinOn) and the Java Expr question · Issue #44 · apache/datafusion-java · GitHub
Open Graph Title: design: DataFrame joins (join, joinOn) and the Java Expr question · Issue #44 · apache/datafusion-java
X Title: design: DataFrame joins (join, joinOn) and the Java Expr question · Issue #44 · apache/datafusion-java
Description: Is your feature request related to a problem or challenge? Joins are the largest missing piece of the DataFrame API, and they force a design decision that the smaller methods have so far avoided: how do we represent DataFusion Expr value...
Open Graph Description: Is your feature request related to a problem or challenge? Joins are the largest missing piece of the DataFrame API, and they force a design decision that the smaller methods have so far avoided: h...
X Description: Is your feature request related to a problem or challenge? Joins are the largest missing piece of the DataFrame API, and they force a design decision that the smaller methods have so far avoided: h...
Opengraph URL: https://github.com/apache/datafusion-java/issues/44
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"design: DataFrame joins (join, joinOn) and the Java Expr question","articleBody":"### Is your feature request related to a problem or challenge?\n\nJoins are the largest missing piece of the DataFrame API, and they\nforce a design decision that the smaller methods have so far avoided:\nhow do we represent DataFusion `Expr` values from Java?\n\nDataFusion's join surface:\n\n- `join(right, JoinType, left_cols, right_cols, filter: Option\u003cExpr>)`\n — equi-join on named columns, optional residual predicate.\n- `join_on(right, JoinType, on: impl IntoIterator\u003cItem = Expr>)` —\n arbitrary join predicates as a list of expressions.\n\n`join` (the column-name form) is buildable today via the SQL-string\npattern (`parse_sql_expr` for the optional filter). `join_on` is not —\nit fundamentally takes `Expr` values.\n\n### Describe the solution you'd like\n\nSplit into two phases.\n\n**Phase 1 — `join` (column-name form).** Ship this first, no `Expr`\nmodel required:\n\n- `DataFrame.join(DataFrame right, JoinType type, String[] leftCols, String[] rightCols)`\n- Overload accepting a `String filter` parsed via `parse_sql_expr` for\n the residual predicate.\n- `JoinType` Java enum mirroring DataFusion's (`INNER`, `LEFT`,\n `RIGHT`, `FULL`, `LEFT_SEMI`, `RIGHT_SEMI`, `LEFT_ANTI`,\n `RIGHT_ANTI`, `LEFT_MARK`).\n\n**Phase 2 — `joinOn` (Expr form).** Requires picking one of:\n\n1. **SQL strings.** `df.joinOn(right, INNER, \"l.a = r.b\", \"l.c > r.d\")`.\n Each predicate parsed via `parse_sql_expr` after both sides are\n stitched into a synthetic schema. Cheapest; no Java-side model.\n2. **Typed `Expr` builder.** Java class hierarchy mirroring DataFusion's\n `Expr` (Column, BinaryExpr, Literal, ScalarUDF…). Discoverable but a\n large, ongoing maintenance surface that has to track DataFusion's\n `Expr` enum.\n3. **Defer.** Keep only `join` (Phase 1) until a concrete user needs\n non-equi joins.\n\nRecommendation: do (1) for symmetry with `filter(String)` and the\nproposed `withColumn(String)` / `sort(String)`. (2) is its own\nmulti-PR effort that the project may or may not want to commit to.\n\n### Describe alternatives you've considered\n\nSQL joins via `ctx.sql(...)`. Works for everything, but requires\nnaming both sides — losing the DataFrame composition story.\n\n### Additional context\n\nFiling this as a **discussion** issue, not an implementation issue.\nPhase 1 (column-name `join`) can be implemented immediately once the\n`JoinType` enum and lifecycle (does the right-hand DataFrame get\nconsumed?) are settled. The Phase 2 decision is the real ask here.\n\nRelated: the right-hand `DataFrame` consume-vs-clone question is\nidentical to the set-operations issue and should be answered the same\nway in both.","author":{"url":"https://github.com/andygrove","@type":"Person","name":"andygrove"},"datePublished":"2026-05-13T22:08:48Z","url":"https://github.com/apache/datafusion-java/issues/44"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e981e24a-9816-7f78-d2f1-701b5ea4a73b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FC8:14AF70:2CD0BB:3D94AC:6B046A0B |
| html-safe-nonce | e862e3d9fa6a1f90560440b9dd58fab0ece7c5e89ab00277c4200edc0153144e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkM4OjE0QUY3MDoyQ0QwQkI6M0Q5NEFDOjZCMDQ2QTBCIiwidmlzaXRvcl9pZCI6Ijg4NzYxMzg4NTc3Nzk5ODA4MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 15902ba75493a7cca692ab9c760433758a35f518e760bf0129d39bc11911c86a |
| hovercard-subject-tag | issue:4441514671 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/datafusion-java/44/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2429b53b5ee62d0c885266f2a93f2598e82cb432e773f758966168c9408f1292/apache/datafusion-java/issues/44 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2429b53b5ee62d0c885266f2a93f2598e82cb432e773f758966168c9408f1292/apache/datafusion-java/issues/44 |
| og:image:alt | Is your feature request related to a problem or challenge? Joins are the largest missing piece of the DataFrame API, and they force a design decision that the smaller methods have so far avoided: h... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andygrove |
| hostname | github.com |
| expected-hostname | github.com |
| None | 83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/datafusion-java git https://github.com/apache/datafusion-java.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 1237105117 |
| octolytics-dimension-repository_nwo | apache/datafusion-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1237105117 |
| octolytics-dimension-repository_network_root_nwo | apache/datafusion-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ca4d07a7cef4e4b75f821dc25e7300d80c1450a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width