[SPARK-56387][PYTHON] Refactor ProfileResults to a dict of dict#55251
Open
gaogaotiantian wants to merge 4 commits intoapache:masterfrom
Open
[SPARK-56387][PYTHON] Refactor ProfileResults to a dict of dict#55251gaogaotiantian wants to merge 4 commits intoapache:masterfrom
gaogaotiantian wants to merge 4 commits intoapache:masterfrom
Conversation
dongjoon-hyun
requested changes
Apr 8, 2026
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Please get a JIRA ID and update the PR title before converting to a normal PR from Draft status, @gaogaotiantian .
Contributor
Author
|
Ah, I was a bit distracted yesterday and forgot to put the JIRA ticket to the PR. |
Member
|
Thank you for revising~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Refactor
ProfileResultsto a real dict of dict with proper types.Why are the changes needed?
Currently
ProfileResultshas a zero valueNone, which makes the code unnecessarily complicated - we need to take care ofNoneall the time.{}is a perfect zero value for dict already. The values inProfileResultsis a tuple of perf and memory results, even if they don't exist. They are accessed with index and could beNonetoo. We could just not add it to the dict if it does not exist so we don't need to deal withNoneanymore. We just need to make it a dict.Does this PR introduce any user-facing change?
No. This should be private API.
How was this patch tested?
test_udf_profilerpassed locally.Was this patch authored or co-authored using generative AI tooling?
No.