Skip to content

Conversation

@johanl-db
Copy link
Contributor

What changes were proposed in this pull request?

Compute the schema of the data without partition columns only once in FileSourceStrategy.

Why are the changes needed?

In FileSourceStrategy, the schema of the data excluding partition columns is computed 2 times in a slightly different way, using an AttributeSet (partitionSet) and using the attributes directly (partitionColumns)
These don't have the exact same semantics, AttributeSet will only use expression ids for comparison while comparing with the actual attributes will use the name, type, nullability and metadata. We want to use the former here.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests

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

No

@github-actions github-actions bot added the SQL label May 16, 2024
@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 57948c8 May 16, 2024
vkorukanti pushed a commit to vkorukanti/spark that referenced this pull request Jul 25, 2024
…columns in FileSourceStrategy

Compute the schema of the data without partition columns only once in FileSourceStrategy.

In FileSourceStrategy, the schema of the data excluding partition columns is computed 2 times in a slightly different way, using an AttributeSet (`partitionSet`) and using the attributes directly (`partitionColumns`)
These don't have the exact same semantics, AttributeSet will only use expression ids for comparison while comparing with the actual attributes will use the name, type, nullability and metadata. We want to use the former here.

No

Existing tests

No

Closes apache#46619 from johanl-db/reuse-schema-without-partition-columns.

Authored-by: Johan Lasperas <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free to 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.

2 participants