Title: feat(dataframe): expose withColumn and unnestColumns · Issue #41 · apache/datafusion-java · GitHub
Open Graph Title: feat(dataframe): expose withColumn and unnestColumns · Issue #41 · apache/datafusion-java
X Title: feat(dataframe): expose withColumn and unnestColumns · Issue #41 · apache/datafusion-java
Description: Java bindings for Apache DataFusion. Contribute to apache/datafusion-java development by creating an account on GitHub.
Open Graph Description: Java bindings for Apache DataFusion. Contribute to apache/datafusion-java development by creating an account on GitHub.
X Description: Java bindings for Apache DataFusion. Contribute to apache/datafusion-java development by creating an account on GitHub.
Opengraph URL: https://github.com/apache/datafusion-java
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(dataframe): expose withColumn and unnestColumns","articleBody":"### Is your feature request related to a problem or challenge?\n\nThe DataFrame API gained `dropColumns` and `withColumnRenamed` in #30\nbut the most common column-shaping primitive — adding or replacing a\ncolumn with an expression — is still missing. `unnestColumns` for\nstruct / list flattening is in the same family.\n\n### Describe the solution you'd like\n\n- `DataFrame.withColumn(String name, String expr)`. The expression is\n a SQL fragment parsed via DataFusion's `parse_sql_expr`, matching the\n convention already used by `DataFrame.filter(String)`. Behaviour\n mirrors `DataFusion::DataFrame::with_column` — replaces a column of\n the same name in place, otherwise appends.\n- `DataFrame.unnestColumns(String... columns)` and an overload\n accepting an `UnnestOptions` value (preserve-nulls, recursions). Maps\n to `unnest_columns` / `unnest_columns_with_options`.\n- Tests in `DataFrameTransformationsTest` (round-trip on a small\n fixture, schema check, error on unknown column).\n\n### Describe alternatives you've considered\n\n`SELECT a + b AS c, *` via `ctx.sql(...)`. Works for `withColumn`, but\nrequires the DataFrame to be registered as a table first; awkward for\nintermediate transformations.\n\n### Additional context\n\nFollows the same JNI shape as #19's `filter(String)` — `parse_sql_expr`\non the native side, no Java-side `Expr` model required. Keeps this\nissue independent of #N (joins issue) where an `Expr` builder may\neventually be needed.","author":{"url":"https://github.com/andygrove","@type":"Person","name":"andygrove"},"datePublished":"2026-05-13T22:08:21Z","url":"https://github.com/apache/datafusion-java/issues/41"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:4076fb38-343b-8f46-5091-52feb60fcce2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F7C:29272F:2D16B0:3E1AC6:6B046A09 |
| html-safe-nonce | f68d33662a6f174d6d662a6c2b381407d1cdb88433dd515133db8b0a3a9e3dcb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjdDOjI5MjcyRjoyRDE2QjA6M0UxQUM2OjZCMDQ2QTA5IiwidmlzaXRvcl9pZCI6IjE0MjEwODk0Njc1NDQxMzYyMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3aad74410d5a3e60441c856c33c112f6c4c09716ffad92b7fb81c8de5fda59fb |
| hovercard-subject-tag | repository:1237105117 |
| 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/apache/datafusion-java/issues/41 |
| twitter:image | https://opengraph.githubassets.com/96a9f8db42facff54de3dbe79a9a38a40fcabecce639d5cb98fe0209fb6c9e59/apache/datafusion-java |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/96a9f8db42facff54de3dbe79a9a38a40fcabecce639d5cb98fe0209fb6c9e59/apache/datafusion-java |
| og:image:alt | Java bindings for Apache DataFusion. Contribute to apache/datafusion-java development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f |
| turbo-cache-control | no-cache |
| 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