Skip to content

Conversation

@CarloMariaProietti
Copy link
Contributor

FIXES #1516
Once move.before {} was implemented, I exploited it to implement insert.before{}
maintaining consistency with insert.after {}.
It comes with a test inspired by insert.after{}'s one

public fun <T> InsertClause<T>.before(column: String): DataFrame<T> =
df.add(this.column).move(this.column).before(column)

internal fun <T> InsertClause<T>.beforeImpl(columnPath: ColumnPath): DataFrame<T> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's a DataFrame convention of putting the internal Impl-ementation of API functions under impl/api/<functionName>.kt. I see we missed it for afterImpl, but let's not make it worse with beforeImpl :) Could you move both beforeImpl and afterImpl to impl/api/insert.kt? :)
thanks in advance!

@Jolanrensen
Copy link
Collaborator

The build again fails due to the api dump not being updated. Please follow the contribution guide and make sure build runs successfully before submitting a PR :) that makes it easier for us to review your changes and check it with our CI street.

@Jolanrensen Jolanrensen self-requested a review October 28, 2025 10:42
@Jolanrensen
Copy link
Collaborator

thanks!

@Jolanrensen Jolanrensen merged commit 179595e into Kotlin:master Oct 28, 2025
3 of 4 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.

Add insert.before { }

2 participants