Skip to content

[WIP][ML] Avoid duplicate StringIndexer skip lookups - #57761

Draft
zhengruifeng wants to merge 5 commits into
apache:masterfrom
zhengruifeng:string-indexer-skip-single-lookup-dev3
Draft

[WIP][ML] Avoid duplicate StringIndexer skip lookups#57761
zhengruifeng wants to merge 5 commits into
apache:masterfrom
zhengruifeng:string-indexer-skip-single-lookup-dev3

Conversation

@zhengruifeng

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This draft changes the StringIndexerModel handleInvalid = "skip" path to produce a nullable index in the existing indexing UDF, then drop rows with null generated indexes. It removes the separate membership-filter UDF.

Why are the changes needed?

Previously, every valid label was probed once by OpenHashMap.contains during filtering and again by OpenHashMap.get during indexing. The new plan evaluates one lookup per input label while preserving the existing skip behavior.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added multi-column coverage for unseen and null labels with handleInvalid = "skip". build/sbt mllib/Test/compile completed successfully. The test suite was not run.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Codex (GPT-5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant