Skip to content

Inline ColumnFilter typealias in public API function signatures - #2003

Open
zaleslaw with Copilot wants to merge 2 commits into
masterfrom
copilot/inline-columnfilter-typealias
Open

Inline ColumnFilter typealias in public API function signatures#2003
zaleslaw with Copilot wants to merge 2 commits into
masterfrom
copilot/inline-columnfilter-typealias

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown

ColumnFilter<T> is a trivial single-use alias for (ColumnWithPath<T>) -> Boolean. IDE autocomplete was showing it as ColumnFilter<*> /* = (ColumnWithPath<*>) -> Boolean */ — noisier than just the expanded type. Aliases where the type parameter appears twice (e.g. RowExpression<T, R>, ColumnsSelector<T, C>) are left intact as they carry structural information.

Changes

  • 12 public API files (cols, colsAtAnyDepth, colsInGroups, colsOf, colsOfKind, all, drop, filter, first, last, single, take): replaced ColumnFilter<C> / ColumnFilter<*> parameter types with (ColumnWithPath<C>) -> Boolean / (ColumnWithPath<*>) -> Boolean in public function signatures only.
  • Internal functions keep using ColumnFilter — the typealias is preserved and internal casts (predicate as ColumnFilter<*>) are unchanged.
  • KDoc references to [ColumnFilter] are retained for documentation.
  • Added import org.jetbrains.kotlinx.dataframe.columns.ColumnWithPath to files that didn't already have it.
  • Generated sources (core/generated-sources/) regenerated via ./gradlew :core:processKDocsMain.

Before:

public fun ColumnsSelectionDsl<*>.last(condition: ColumnFilter<*> = { true }): SingleColumn<*>
// shown in IDE as: condition: ColumnFilter<*> /* = (ColumnWithPath<*>) -> Boolean */

After:

public fun ColumnsSelectionDsl<*>.last(condition: (ColumnWithPath<*>) -> Boolean = { true }): SingleColumn<*>

Copilot AI linked an issue Jul 28, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Inline ColumnFilter typealias in public API Inline ColumnFilter typealias in public API function signatures Jul 28, 2026
Copilot AI requested a review from zaleslaw July 28, 2026 10:59
@Jolanrensen

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as off-topic.

@Jolanrensen

This comment was marked as outdated.

This comment was marked as outdated.

@Jolanrensen

Copy link
Copy Markdown
Collaborator

Copilot made a mess... I'll solve it manually

@Jolanrensen Jolanrensen assigned Jolanrensen and unassigned zaleslaw and Copilot Jul 29, 2026
@Jolanrensen
Jolanrensen force-pushed the copilot/inline-columnfilter-typealias branch from 4bf021c to 8a2c78e Compare July 29, 2026 11:53
@Jolanrensen
Jolanrensen force-pushed the copilot/inline-columnfilter-typealias branch from 8a2c78e to 6e4dc68 Compare July 29, 2026 11:53
@Jolanrensen
Jolanrensen marked this pull request as ready for review July 29, 2026 11:53
@Jolanrensen

Copy link
Copy Markdown
Collaborator

Okay, ColumnFilter is inlined in all public functions now. However, it's still mentioned a lot in KDocs and grammars. What should we do about that? @AndreiKingsley @koperagen

@koperagen

Copy link
Copy Markdown
Collaborator

Okay, ColumnFilter is inlined in all public functions now. However, it's still mentioned a lot in KDocs and grammars. What should we do about that? @AndreiKingsley @koperagen

We can keep them

@Jolanrensen

Copy link
Copy Markdown
Collaborator
image

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.

Inline ColumnFilter typealias in public API

5 participants