Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spark] Only attempt parsing partition path into different types if type inference is enabled #3374

Conversation

amogh-jahagirdar
Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar commented Jul 14, 2024

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

I was looking at this code path for another issue and noticed that when parsing partition values from paths (only used for the write path) without type inference we still attempt to due parsing for date/decima/timestamp types even though it's not required. We can avoid that work with a small refactoring.

How was this patch tested?

This is a refactoring/minor optimization where existing unit tests will exercise this path

Does this PR introduce any user-facing changes?

No

@amogh-jahagirdar amogh-jahagirdar changed the title Spark: Avoid attempt to parsing partition path into different types if type inference is enabled Spark: Avoid attempt to parsing partition path into different types if type inference is disabled Jul 14, 2024
@amogh-jahagirdar amogh-jahagirdar changed the title Spark: Avoid attempt to parsing partition path into different types if type inference is disabled [Spark] Avoid attempt to parsing partition path into different types if type inference is disabled Jul 14, 2024
@amogh-jahagirdar amogh-jahagirdar changed the title [Spark] Avoid attempt to parsing partition path into different types if type inference is disabled [Spark] Avoid attempt to parse partition path into different types if type inference is disabled Jul 14, 2024
@amogh-jahagirdar amogh-jahagirdar changed the title [Spark] Avoid attempt to parse partition path into different types if type inference is disabled [Spark] Only attempt parsing partition path into different types if type inference is enabled Jul 14, 2024
@amogh-jahagirdar amogh-jahagirdar force-pushed the partition-type-inference-cleanup branch from 60d2292 to 327fd9f Compare July 17, 2024 18:15
@amogh-jahagirdar amogh-jahagirdar force-pushed the partition-type-inference-cleanup branch from 327fd9f to 85816d2 Compare July 17, 2024 18:15
@allisonport-db allisonport-db merged commit ef35e67 into delta-io:master Jul 17, 2024
10 checks passed
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.

None yet

3 participants