Skip to content

[SPARK-58557][ML] Reuse ML vector data type singleton - #57757

Open
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:ml_reuse_type
Open

[SPARK-58557][ML] Reuse ML vector data type singleton#57757
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:ml_reuse_type

Conversation

@zhengruifeng

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This draft reuses SQLDataTypes.VectorType instead of creating equivalent VectorUDT instances throughout the ML implementation.

Why are the changes needed?

VectorUDT is stateless. Reusing the canonical ML vector data type avoids repeated equivalent allocations and keeps schema checks and output schemas consistent.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

build/sbt mllib/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)

@zhengruifeng zhengruifeng changed the title [WIP][MLLIB] Reuse ML vector data type [WIP][ML] Reuse ML vector data type Aug 4, 2026
@zhengruifeng zhengruifeng changed the title [WIP][ML] Reuse ML vector data type [WIP][MLLIB] Reuse ML vector data type singleton Aug 4, 2026
@zhengruifeng zhengruifeng changed the title [WIP][MLLIB] Reuse ML vector data type singleton [WIP][ML] Reuse ML vector data type singleton Aug 4, 2026
@zhengruifeng zhengruifeng changed the title [WIP][ML] Reuse ML vector data type singleton [SPARK-58557][ML] Reuse ML vector data type singleton Aug 4, 2026
@zhengruifeng
zhengruifeng marked this pull request as ready for review August 4, 2026 12:56
@uros-b

uros-b commented Aug 4, 2026

Copy link
Copy Markdown
Member

Thank you @zhengruifeng and @HyukjinKwon!

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.

3 participants