andygrove opened a new pull request, #1585: URL: https://github.com/apache/datafusion-ballista/pull/1585
## Summary `DistributedDataFrame.collect()`, `show()`, `count()`, `to_pandas()` and other execution methods were running locally in the client process instead of on the Ballista cluster. **Root cause:** PR #1513 (jupyter notebook support) changed `DistributedDataFrame` from `metaclass=RedefiningDataFrameMeta` to `metaclass=type`. `RedefiningDataFrameMeta` was responsible for wrapping execution methods to route through `_to_internal_df()` before executing. With plain `metaclass=type`, those methods were inherited directly from DataFusion's `DataFrame` and ran locally. Only `write_csv` and `write_parquet` were manually re-added as overrides, so writes worked but reads did not. **Fix:** - Add `EXECUTION_METHODS` list to `RedefiningDataFrameMeta` covering `collect`, `collect_partitioned`, `show`, `count`, `to_arrow_table`, `to_pandas`, `to_polars`, `write_json` - In `__new__`, wrap each of those methods to call `_to_internal_df()` first — skipping any method already explicitly overridden on the subclass (e.g. `write_parquet`) - Switch `DistributedDataFrame` back to `metaclass=RedefiningDataFrameMeta` Fixes #1582 ## Test plan - [ ] `df.collect()` executes on the cluster (verify executor logs show activity) - [ ] `df.show()` executes on the cluster - [ ] `df.to_pandas()` executes on the cluster - [ ] `df.write_parquet()` still works (explicit override not clobbered by metaclass) - [ ] Existing Python tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
