Skip to content

[SPARK-54464][SQL] Remove duplicate output.reserve calls in assembleVariantBatch - #53170

Closed
Zouxxyy wants to merge 1 commit into
apache:masterfrom
Zouxxyy:master-20251120
Closed

[SPARK-54464][SQL] Remove duplicate output.reserve calls in assembleVariantBatch#53170
Zouxxyy wants to merge 1 commit into
apache:masterfrom
Zouxxyy:master-20251120

Conversation

@Zouxxyy

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Remove duplicate output.reserve calls in assembleVariantBatch

Why are the changes needed?

output.reserve is called twice

Does this PR introduce any user-facing change?

None.

How was this patch tested?

Existing test cases.

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

No

@ZouxxyyZouxxyy changed the title [MINOR][SQL] Remove duplicate output.reserve calls in assembleVariantBatch[MINOR][SQL] Remove duplicate output.reserve calls in assembleVariantBatchNov 22, 2025

@dongjoon-hyundongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for suggestion, but it would be great if you can create a JIRA issue, @Zouxxyy .

Apache Spark comment prefers to use JIRA ID for trace-ability for source code change PR.

@ZouxxyyZouxxyy changed the title [MINOR][SQL] Remove duplicate output.reserve calls in assembleVariantBatch[SPARK-54464][SQL] Remove duplicate output.reserve calls in assembleVariantBatchNov 23, 2025
@Zouxxyy

Copy link
Copy Markdown
ContributorAuthor

Thank you for suggestion, but it would be great if you can create a JIRA issue, @Zouxxyy .

Apache Spark comment prefers to use JIRA ID for trace-ability for source code change PR.

Thanks, updated

@dongjoon-hyun

Copy link
Copy Markdown
Member

Thank you.

@dongjoon-hyun
dongjoon-hyun dismissed their stale reviewNovember 23, 2025 01:57

JIRA ID is attached.

val converterVectors = Array(output)
val converterRow = new GenericInternalRow(1)
output.reset()
output.reserve(input.getElementsAppended)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the removed code, this comes from Apache Spark 4.0.0. cc @chenhao-db , @cloud-fan , @HyukjinKwon

@dongjoon-hyundongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

Merged to master for Apache Spark 4.2.0.

@cloud-fan

Copy link
Copy Markdown
Contributor

late LGTM

huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
…leVariantBatch`
### What changes were proposed in this pull request?
Remove duplicate output.reserve calls in assembleVariantBatch
### Why are the changes needed?
output.reserve is called twice
### Does this PR introduce _any_ user-facing change?
None.
### How was this patch tested?
Existing test cases.
### Was this patch authored or co-authored using generative AI tooling?
No
Closesapache#53170 from Zouxxyy/master-20251120.
Authored-by: zouxxyy <zouxinyu.zxy@alibaba-inc.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Zouxxyy@dongjoon-hyun@cloud-fan