Skip to content

Conversation

@hvanhovell
Copy link
Contributor

@hvanhovell hvanhovell commented Dec 4, 2024

What changes were proposed in this pull request?

This PR adds support for ConfigEntry to the RuntimeConfig interface. This was removed in #47980.

Why are the changes needed?

This functionality is used a lot by Spark libraries. Removing them caused friction, and adding them does not pollute the RuntimeConfig interface.

Does this PR introduce any user-facing change?

No. This is developer API.

How was this patch tested?

I have added tests cases for Connect and Classic.

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

No.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Thank you for polishing this 😄. I'm wondering what makes you change your mind. As you know, I raised some issues from the original PR, @hvanhovell . Anyway, +1 for this direction.

Removing them caused friction

val conf = newConf()

val entry = SQLConf.FILES_MAX_PARTITION_NUM
assert(conf.get(entry.key) === null)
Copy link
Contributor Author

@hvanhovell hvanhovell Dec 4, 2024

Choose a reason for hiding this comment

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

@HyukjinKwon @cloud-fan this returns null. I was expecting a NoSuchElementException here. IMO this is a bug. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, i think it should. def get[T](entry: ConfigEntry[T]): T isn't an API so I think we should be fine with changing this behaviour too.

@hvanhovell
Copy link
Contributor Author

Merging to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants