Package-level declarations

Types

Link copied to clipboard
internal class AddDataRowImpl<T>(index: Int, owner: DataFrame<T>, container: List<*>) : DataRowImpl<T> , AddDataRow<T>
Link copied to clipboard
internal class ColumnAccessorImpl<T>(val path: ColumnPath) : ColumnAccessor<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
internal class ColumnGroupWithPathImpl<T>(val column: ColumnGroup<T>, val path: ColumnPath) : ColumnGroupImpl<T> , ColumnWithPath<DataRow<T>>
Link copied to clipboard
internal class ColumnListImpl<C>(val columns: List<ColumnsResolver<C>>) : ColumnSet<C> , ColumnsList<C>
Link copied to clipboard
interface ColumnsList<C> : ColumnSet<C>
Link copied to clipboard

This contains implementations for both transform and transformSingle and can be passed around.

Link copied to clipboard
internal interface ColumnWithParent<out C> : ColumnReference<C>
Link copied to clipboard
internal class ComputedColumnReference<R>(val name: String, val type: KType, val infer: Infer, val compute: RowExpression<Any?, R>) : ColumnReference<R>
Link copied to clipboard
internal interface DataColumnGroup<out T> : ColumnGroup<T> , DataColumn<DataRow<T>>
Link copied to clipboard
internal abstract class DataColumnImpl<T>(val values: List<T>, val name: String, val type: KType, distinct: Lazy<Set<T>>? = null) : DataColumn<T> , DataColumnInternal<T>
Link copied to clipboard
internal interface DataColumnInternal<T> : DataColumn<T>
Link copied to clipboard
internal class DistinctColumnSet<T>(val src: ColumnsResolver<T>) : ColumnSet<T>
Link copied to clipboard
internal interface ForceResolvedColumn<T> : DataColumn<T>
Link copied to clipboard
internal open class FrameColumnImpl<T>(name: String, values: List<DataFrame<T>>, columnSchema: Lazy<DataFrameSchema>? = null, distinct: Lazy<Set<DataFrame<T>>>? = null) : DataColumnImpl<DataFrame<T>> , FrameColumn<T>
Link copied to clipboard
Link copied to clipboard
internal class FrameColumnWithPathImpl<T>(val data: FrameColumn<T>, val path: ColumnPath) : ColumnWithPath<DataFrame<T>> , FrameColumn<T>
Link copied to clipboard
internal class RenamedColumnReference<C>(val source: ColumnReference<C>, val name: String) : ColumnReference<C>
Link copied to clipboard
internal class RenamedSingleColumn<C>(val source: SingleColumn<C>, val name: String) : SingleColumn<C>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
internal value class StatisticResult(val value: Any?)
Link copied to clipboard
internal interface TransformableColumnSet<out C> : ColumnSet<C>

This type of ColumnsResolver can be transformed before being resolved.

Link copied to clipboard
internal interface TransformableSingleColumn<out C> : SingleColumn<C>

This type of SingleColumn can be transformed before being resolved.

Link copied to clipboard
internal open class ValueColumnImpl<T>(values: List<T>, name: String, type: KType, val defaultValue: T? = null, distinct: Lazy<Set<T>>? = null, statisticsCache: MutableMap<String, MutableMap<Map<String, Any>, StatisticResult>> = mutableMapOf()) : DataColumnImpl<T> , ValueColumn<T> , ValueColumnInternal<T>
Link copied to clipboard
internal interface ValueColumnInternal<T> : ValueColumn<T>
Link copied to clipboard
Link copied to clipboard
internal class ValueColumnWithPathImpl<T>(val data: ValueColumn<T>, val path: ColumnPath) : ColumnWithPath<T> , ValueColumnInternal<T>

Properties

Link copied to clipboard
internal val anyRowType: KType

Functions

Link copied to clipboard
internal fun <T> BaseColumn<T>.addParent(parent: ColumnGroup<*>): DataColumn<T>
Link copied to clipboard
Link copied to clipboard
internal fun <T> BaseColumn<T>.addPath(): ColumnWithPath<T>
internal fun <T> BaseColumn<T>.addPath(path: ColumnPath): ColumnWithPath<T>
Link copied to clipboard

Returns a new list of column paths, except the ones inside columns. NOTE: The structure is not kept the same; if a column is removed, its parent will be removed as well, and all its siblings will be lifted out of the group. This also happens if a column is "removed" that does not exist in this.

Link copied to clipboard
internal fun List<ColumnWithPath<*>>.allColumnsExceptKeepingStructure(columns: Set<ColumnWithPath<*>>, removeEmptyGroups: Boolean = true): List<ColumnWithPath<*>>

Returns a new list of column paths, except the ones inside columns. NOTE: ColumnGroups are adapted to keep their structure. If a column inside a column group is excepted, it will be removed from the group. Empty groups will be removed if removeEmptyGroups== true

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
internal fun <T> DataColumn<T>.asValueColumn(): ValueColumn<T>
Link copied to clipboard
internal fun <T> AnyCol.asValues(): ValueColumn<T>
Link copied to clipboard
internal fun <C> TransformableColumnSet<C>.atAnyDepthImpl(includeGroups: Boolean = true, includeTopLevel: Boolean = true): ColumnSet<C>

AtAnyDepth implementation for TransformableColumnSet. This converts a TransformableColumnSet into a ColumnSet by redirecting ColumnSet.resolve to TransformableColumnSet.transformResolve with a correctly configured AtAnyDepthTransformer.

internal fun <C> TransformableSingleColumn<C>.atAnyDepthImpl(includeGroups: Boolean = true, includeTopLevel: Boolean = true): SingleColumn<C>

AtAnyDepth implementation for TransformableSingleColumn. This converts a TransformableSingleColumn into a SingleColumn by redirecting SingleColumn.resolveSingle to TransformableSingleColumn.transformResolveSingle with a correctly configured AtAnyDepthTransformer.

Link copied to clipboard
Link copied to clipboard
internal fun <T> BaseColumn<T>.checkEquals(other: Any?): Boolean
Link copied to clipboard
internal fun <T, R> computeValues(df: DataFrame<T>, expression: AddExpression<T, R>): Pair<Boolean, List<R>>
Link copied to clipboard
internal fun <T> createColumnGuessingType(values: Iterable<T>, suggestedType: TypeSuggestion = TypeSuggestion.Infer, defaultValue: T? = null, nullable: Boolean? = null, listifyValues: Boolean = false, allColsMakesColGroup: Boolean = false, unifyNumbers: Boolean = false): DataColumn<T>
internal fun <T> createColumnGuessingType(name: String, values: Iterable<T>, suggestedType: TypeSuggestion = TypeSuggestion.Infer, defaultValue: T? = null, nullable: Boolean? = null, listifyValues: Boolean = false, allColsMakesColGroup: Boolean = false, unifyNumbers: Boolean = false): DataColumn<T>

Creates a new column by doing type inference on the given values and some conversions to unify the values if necessary.

Link copied to clipboard
internal inline fun <C> createColumnSet(crossinline resolver: (context: ColumnResolutionContext) -> List<ColumnWithPath<C>>): ColumnSet<C>
Link copied to clipboard
internal fun <R> createComputedColumnReference(name: String, type: KType, infer: Infer, compute: RowExpression<Any?, R>): ColumnReference<R>
Link copied to clipboard
Link copied to clipboard
internal fun ColumnPath.depth(): Int
Link copied to clipboard
Link copied to clipboard
internal fun ColumnsResolver<*>.flattenRecursively(includeGroups: Boolean = true, includeTopLevel: Boolean = true): ColumnsResolver<*>

Flattens a ColumnsResolver recursively.

Link copied to clipboard
internal fun <T : AnyCol> T.forceResolve(): T
Link copied to clipboard
internal fun <T> ColumnsResolver<T>.getAt(index: Int): SingleColumn<T>
Link copied to clipboard
internal fun <T> ColumnSet<T>.getAtOrNull(index: Int): SingleColumn<T>
Link copied to clipboard
internal fun ColumnSet<*>.getChildrenAt(index: Int): ColumnSet<*>
Link copied to clipboard
Link copied to clipboard
internal fun AnyCol.getHashCode(): Int
Link copied to clipboard
internal fun <T> AnyCol.grouped(): ColumnGroup<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
internal fun <T, R> ColumnsContainer<T>.newColumn(type: KType, name: String = "", infer: Infer = Infer.Nulls, expression: AddExpression<T, R>): DataColumn<R>
Link copied to clipboard
Link copied to clipboard
internal fun <A> ColumnAccessor<A>.onResolve(check: (ColumnWithPath<*>?) -> Unit): ColumnAccessor<A>

Helper function to perform runtime checks on a ColumnAccessor.

internal fun <A> ColumnSet<A>.onResolve(check: (List<ColumnWithPath<A>>) -> Unit): ColumnSet<A>

internal fun <A> SingleColumn<A>.onResolve(check: (ColumnWithPath<A>?) -> Unit): SingleColumn<A>

Helper function to perform runtime checks on a SingleColumn.

Link copied to clipboard
internal fun <C> SingleColumn<C>.renamedColumn(newName: String): SingleColumn<C>
Link copied to clipboard
internal fun <C> ColumnsResolver<C>.resolve(df: DataFrame<*>, unresolvedColumnsPolicy: UnresolvedColumnsPolicy = UnresolvedColumnsPolicy.Fail): List<ColumnWithPath<C>>
Link copied to clipboard
internal fun <C> SingleColumn<C>.resolveSingle(df: DataFrame<*>, unresolvedColumnsPolicy: UnresolvedColumnsPolicy = UnresolvedColumnsPolicy.Fail): ColumnWithPath<C>?
Link copied to clipboard

Simplifies structure by removing columns that are already present in column groups in this.

Link copied to clipboard

Converts this ColumnsResolver to a SingleColumn. resolveSingle will return the single column of this if there is only one, else it will throw an exception: In case of an empty ColumnsResolver, a NoSuchElementException will be thrown. In case of more than one column, an IllegalArgumentException will be thrown. If the result is used as a ColumnSet, null will be converted to an empty list.

Link copied to clipboard

Converts this ColumnsResolver to a SingleColumn. resolveSingle will return the single column of this if there is only one, else it will return null. If the result used as a ColumnSet, null will be converted to an empty list.

Link copied to clipboard

Same as singleOrNullImpl, however, it passes any ColumnsResolverTransformer back to this if it is supplied.

Link copied to clipboard

Same as singleImpl, however, it passes any ColumnsResolverTransformer back to this if it is supplied.

Link copied to clipboard
internal fun KType.toColumnKind(): ColumnKind

Retrieves the correct ColumnKind based on the type of the values in the column.

Link copied to clipboard
internal fun <T, C> ColumnsSelector<T, C>.toColumnSet(): ColumnSet<C>
@JvmName(name = "toColumnSetForPivot")
internal fun <T, C> PivotColumnsSelector<T, C>.toColumnSet(): ColumnSet<C>
@JvmName(name = "toColumnSetForSort")
internal fun <T, C> SortColumnsSelector<T, C>.toColumnSet(): ColumnSet<C>
internal inline fun <TD, T : DataFrame<TD>, C> Selector<T, ColumnsResolver<C>>.toColumnSet(crossinline createReceiver: (ColumnResolutionContext) -> T): ColumnSet<C>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
internal inline fun <A, B> ColumnsResolver<A>.transform(crossinline converter: (List<ColumnWithPath<A>>) -> List<ColumnWithPath<B>>): TransformableColumnSet<B>

Applies a transformation on this by converting its List<ColumnWithPath<A>] to List<ColumnWithPath<B>] using converter.

Link copied to clipboard
internal fun <A, B> SingleColumn<A>.transformSingle(converter: (ColumnWithPath<A>) -> List<ColumnWithPath<B>>): ColumnSet<B>

Applies a transformation on this SingleColumn by converting its single ColumnWithPath<A> to List<ColumnWithPath<B>] using converter. Since converter allows you to return multiple columns, the result is turned into a ColumnSet<B>.

Link copied to clipboard

Applies a transformation on this SingleColumn by converting its single ColumnWithPath<A> to List<ColumnWithPath<B>] using converter but also providing the ColumnResolutionContext to the converter.

Link copied to clipboard

Applies a transformation on this by converting its List<ColumnWithPath<A>] to List<ColumnWithPath<B>] using converter, but also providing the ColumnResolutionContext to the converter.

Link copied to clipboard
internal fun AnyBaseCol.unbox(): AnyCol
Link copied to clipboard
internal fun <T> ColumnGroup<*>.withDf(newDf: DataFrame<T>): ColumnGroup<T>