Remove transformer support from SQLTransform and the native interpreter — TASK-40 - #22
Closed
claude-agent-ahrzb[bot] wants to merge 2 commits into
Closed
Remove transformer support from SQLTransform and the native interpreter — TASK-40#22claude-agent-ahrzb[bot] wants to merge 2 commits into
claude-agent-ahrzb[bot] wants to merge 2 commits into
Conversation
… the interpreter — TASK-40
Rips out the {transformer}(col) authoring surface and the opaque callout
machinery behind it, from both engines. v0, so it goes out clean: no
deprecation shim, no compat path.
Python surface:
- delete _transformer_ref.py (is_transformer, _bind_names, _probe,
resolve_transformer_refs) and _transformer_udf.py (the DataFusion
ScalarUDF wrapper)
- _compose.py: drop Ref.is_transformer, the is_transformer branch, and the
transformer-shaped-but-unfitted guard. A sklearn object now falls through
to the existing TypeError, which already names the offending type
- __init__.py: drop _udf_specs, the sqlt/tfm ref split, and the
transformers= kwarg to InferFn
- _batch.py: drop the UDF registration loop
- _codegen/engine.py: drop the __tfm_ UnsupportedInCodegen branch; an
unknown function is now uniformly a ValueError
Native interpreter:
- expr.rs: remove the Expr::Transform variant and its eval arm (GIL attach,
feature reorder, .transform(), .tolist() marshalling)
- lib.rs: remove ResolvedTransformer, read_feature_names_in, the
resolve_transformers tree rewrite, and the transformers ctor param
- types.rs / plan.rs: remove the Expr::Transform arms from infer_type and
validate_expr
- schema.rs: remove arrow_schema_to_ordered_fields (transformer-only caller)
SQLTransform-to-SQLTransform composition is untouched — that is a separate
feature and stays. The README section now documents it instead, with a
runnable example.
Ticket fallout: TASK-3 closed (its ACs describe deleted code), TASK-34
archived (it exists to port this feature to codegen). Both carried standing
pre-authorizations to auto-dispatch devs; closing them retires those, which
is the part that mattered.
cargo check clean, 523 passed / 12 xfailed, ruff clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Closing as obsolete: the SQLTransform line this targets has been reset (#54). The DataFusion native engine, the codegen backend, and the batch transform() path are removed; what remains is the confit-served fit-and-serve path. Nothing here is lost — the branch and its commits stay reachable if this work is ever revived. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
{transformer}(col)authoring surface and the opaque callout machinery behind it, from both the Python front-end and the native Rust interpreter. Closes TASK-40.v0, so this goes out clean — no deprecation shim, no compat path.
−1,464 lines net. The Rust diff adds exactly two lines (a trimmed
pyo3signature and a narrowed import); everything else is deletion.What's gone
Python surface
_transformer_ref.py(is_transformer,_bind_names,_probe,resolve_transformer_refs) and_transformer_udf.py(the DataFusionScalarUDFwrapper)._compose.py— droppedRef.is_transformer, theis_transformerbranch, and the transformer-shaped-but-unfitted guard.__init__.py— dropped_udf_specs, the sqlt/tfm ref split, and thetransformers=kwarg toInferFn._batch.py— dropped the UDF registration loop._codegen/engine.py— dropped the__tfm_UnsupportedInCodegenbranch; an unknown function is now uniformly aValueError.Native interpreter
expr.rs— removed theExpr::Transformvariant and its eval arm (GIL attach, feature reorder,.transform(),.tolist()marshalling).lib.rs— removedResolvedTransformer,read_feature_names_in, theresolve_transformerstree rewrite, and thetransformersconstructor param.types.rs/plan.rs— removed theExpr::Transformarms frominfer_typeandvalidate_expr.schema.rs— removedarrow_schema_to_ordered_fields; its only caller was the transformer path.Five test files deleted, plus the transformer cases in
_compose_test.pyandtest_diff_errors.py.What stays
SQLTransform-to-SQLTransform composition is untouched. That is a separate feature sharing the same t-string entry point, and it keeps working — frozen
{a.transform}refs, bare{a}re-fit refs, and nesting. The README section that documented sklearn refs now documents composition instead, with an example I ran end to end.A fitted sklearn transformer now falls through to the pre-existing
TypeError, which already names the offending type:I deleted the dedicated not-fitted guard rather than repointing it — its message told users to call
.fit(), which no longer helps.Verification
cargo check— clean, zero warnings.uv run pytest— 523 passed, 12 xfailed. The xfails are pre-existing and unrelated.ruff check+ruff format --check— clean; pre-commit hooks passed.transform()→[1.0, 1.0, 1.0, 1.0],infer()→m=1.0(so the native path is genuinely exercised), a bare{t}re-fit ref →[0.4, 0.8, 1.2, 1.6], and a fittedStandardScalerrejected with the expectedTypeError.One thing I deliberately left alone:
cargo fmt --checkreports 11 diffs, all pre-existing (master has 13, in the same files).cargo fmtis not part ofmise run fmt, so the crate was never fmt-clean. Reformatting here would bury the deletion in noise.Ticket fallout — worth a look
Both superseded tickets carried standing pre-authorizations to auto-dispatch devs, which is the part that actually mattered: left open, they would send someone at deleted code.
test_diff_case.pyandtest_case_window_integration.py.Design specs under
docs/superpowers/specsand the backlog docs/decisions/drafts are left as history.🤖 Generated with Claude Code