Skip to content

Commit af84ca3

Browse files
Automated commit of generated code
1 parent 2120a38 commit af84ca3

File tree

12 files changed

+27
-27
lines changed

12 files changed

+27
-27
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/convert.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ public inline fun <T, C, reified R> Convert<T, C>.with(
587587
* df.convert { name }.asFrame { it.add("fullName") { "$firstName $lastName" } }
588588
* ```
589589
*
590-
* @param [expression] The [Data Frame Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenDataFrame.DataFrameExpression] to replace the selected column group with.
590+
* @param [expression] The [DataFrame Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenDataFrame.DataFrameExpression] to replace the selected column group with.
591591
*/
592592
@Refine
593593
@Interpretable("ConvertAsFrame")

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/join.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ public fun <C> ColumnMatch(left: ColumnReference<C>, right: ColumnReference<C>):
168168
public typealias JoinColumnsSelector<A, B> = JoinDsl<A, B>.(ColumnsContainer<A>) -> ColumnsResolver<*>
169169

170170
public enum class JoinType {
171-
Left, // all data from left data frame, nulls for mismatches in right data frame
172-
Right, // all data from right data frame, nulls for mismatches in left data frame
173-
Inner, // only matched data from right and left data frame
174-
Filter, // only matched data from left data frame
175-
Full, // all data from left and from right data frame, nulls for any mismatches
176-
Exclude, // mismatched rows from left data frame
171+
Left, // all data from left dataframe, nulls for mismatches in right dataframe
172+
Right, // all data from right dataframe, nulls for mismatches in left dataframe
173+
Inner, // only matched data from right and left dataframe
174+
Filter, // only matched data from left dataframe
175+
Full, // all data from left and from right dataframe, nulls for any mismatches
176+
Exclude, // mismatched rows from left dataframe
177177
}
178178

179179
internal val JoinType.addNewColumns: Boolean

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,13 +496,13 @@ public inline fun <T, C, R : C?> Update<T, C>.with(crossinline expression: Updat
496496
*
497497
* Updates selected [column group][ColumnGroup] as a [DataFrame] with the given [expression].
498498
*
499-
* Provide a new value for every selected data frame using a [dataframe expression][org.jetbrains.kotlinx.dataframe.DataFrameExpression].
499+
* Provide a new value for every selected dataframe using a [dataframe expression][org.jetbrains.kotlinx.dataframe.DataFrameExpression].
500500
*
501501
* For example:
502502
*
503503
* `df.`[update][update]` { name }.`[asFrame][asFrame]` { `[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { lastName } }`
504504
*
505-
* @param [expression] The [Data Frame Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenDataFrame.DataFrameExpression] to replace the selected column group with.
505+
* @param [expression] The [DataFrame Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenDataFrame.DataFrameExpression] to replace the selected column group with.
506506
*/
507507
public fun <T, C, R> Update<T, DataRow<C>>.asFrame(expression: DataFrameExpression<C, DataFrame<R>>): DataFrame<T> =
508508
asFrameImpl(expression)

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/AccessApi.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package org.jetbrains.kotlinx.dataframe.documentation
33
/**
44
* ## Access APIs
55
*
6-
* By nature, data frames are dynamic objects, column labels depend on the input source and also new columns could be added
6+
* By nature, dataframes are dynamic objects, column labels depend on the input source and also new columns could be added
77
* or deleted while wrangling. Kotlin, in contrast, is a statically typed language and all types are defined and verified
8-
* ahead of execution. That's why creating a flexible, handy, and, at the same time, safe API to a data frame is tricky.
8+
* ahead of execution. That's why creating a flexible, handy, and, at the same time, safe API to a dataframe is tricky.
99
*
1010
* In `Kotlin DataFrame` we provide four different ways to access columns, and, while they're essentially different, they
1111
* look pretty similar in the data wrangling DSL. These include:

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/join.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,34 +105,34 @@ internal fun <A, B> DataFrame<A>.joinImpl(
105105
leftCol.path to allRightJoinColumns[colNumber].path
106106
}.toMap()
107107

108-
// compute pairs of join key to row index from right data frame
108+
// compute pairs of join key to row index from right dataframe
109109
val rightJoinKeyToIndex = other
110110
.indices()
111111
.map { index -> allRightJoinColumns.map { it.data[index] } to index }
112112

113-
// group row indices by key from right data frame
113+
// group row indices by key from right dataframe
114114
val groupedRight = when (joinType) {
115115
JoinType.Exclude -> rightJoinKeyToIndex.associate { it.first to emptyList() }
116116
else -> rightJoinKeyToIndex.groupBy({ it.first }) { it.second }
117117
}
118118

119119
var outputRowsCount = 0
120120

121-
// for every row index from left data frame compute a list of matched indices from right data frame
121+
// for every row index from left dataframe compute a list of matched indices from right dataframe
122122
val leftToRightMapping = indices.map { leftIndex ->
123123
val leftKey = allLeftJoinColumns.map { it.data[leftIndex] }
124124
val rightIndices = groupedRight[leftKey]
125125
outputRowsCount += rightIndices?.size ?: if (joinType.allowRightNulls) 1 else 0
126126
rightIndices
127127
}
128128

129-
// for every row index in right data frame store a flag indicating whether this row was matched by some row in left data frame
129+
// for every row index in right dataframe store a flag indicating whether this row was matched by some row in left dataframe
130130
val rightMatched = BooleanArray(other.nrow) { false }
131131

132-
// number of rows in right data frame that were not matched by any row in left data frame. Used for correct allocation of an output array
132+
// number of rows in right dataframe that were not matched by any row in left dataframe. Used for correct allocation of an output array
133133
var rightUnmatchedCount = other.nrow
134134

135-
// compute matched indices from right data frame and number of rows in output data frame
135+
// compute matched indices from right dataframe and number of rows in output dataframe
136136
if (joinType.allowLeftNulls) {
137137
leftToRightMapping.forEach { rightIndices ->
138138
rightIndices?.forEach { i ->

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/codeGen/ReplCodeGeneratorImpl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ internal class ReplCodeGeneratorImpl : ReplCodeGenerator {
5959
?.takeIf { it.findAnnotation<DataSchema>() != null }
6060
?.let { registeredMarkers[it] ?: MarkersExtractor.get(it) }
6161
if (currentMarker != null) {
62-
// we need to make sure that the property's marker type is open in order to let derived data frames be assignable to it
62+
// we need to make sure that the property's marker type is open in order to let derived dataframes be assignable to it
6363
if (currentMarker.isOpen) {
6464
val columnSchema = currentMarker.schema
65-
// for mutable properties we do strong typing only at the first processing, after that we allow its type to be more general than actual data frame type
65+
// for mutable properties we do strong typing only at the first processing, after that we allow its type to be more general than actual dataframe type
6666
if (wasProcessedBefore || columnSchema == targetSchema) {
67-
// property scheme is valid for current data frame, but we should also check that all compatible open markers are implemented by it
67+
// property scheme is valid for current dataframe, but we should also check that all compatible open markers are implemented by it
6868
val requiredBaseMarkers = registeredMarkers.values.filterRequiredForSchema(columnSchema)
6969
if (requiredBaseMarkers.any() && requiredBaseMarkers.all { currentMarker.implements(it) }) {
7070
return CodeWithTypeCastGenerator.EMPTY

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/codeGen/SchemaReader.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema
1616
import java.net.URL
1717

1818
/**
19-
* Reader that can read a data frame from a URL. It tries to guess the format based on the given [formats] and returns
19+
* Reader that can read a dataframe from a URL. It tries to guess the format based on the given [formats] and returns
2020
* [DfReadResult.Success], or returns [DfReadResult.Error] if it fails.
2121
*/
2222
public val CodeGenerator.Companion.urlDfReader: (url: URL, formats: List<SupportedFormat>) -> DfReadResult

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/string.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ internal fun AnyFrame.renderToString(
3232

3333
// title
3434
if (title) {
35-
sb.appendLine("Data Frame [${size()}]")
35+
sb.appendLine("DataFrame [${size()}]")
3636
sb.appendLine()
3737
}
3838

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/codeGen/CodeGenerationTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class CodeGenerationTests : BaseTest() {
153153
}
154154

155155
@Test
156-
fun `generate marker interface for nested data frame`() {
156+
fun `generate marker interface for nested dataframe`() {
157157
val property = ::df
158158
val grouped = df.move { name and city }.under("nameAndCity")
159159
val generated = ReplCodeGenerator.create().process(grouped, property)

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/codeGen/ShortNamesRenderingTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ internal class ShortNamesRenderingTest : TypeRenderingStrategy by ShortNames {
7777
}
7878

7979
@Test
80-
fun `data frame`() {
80+
fun `dataframe`() {
8181
fields.keys.asClue {
8282
fields["f"]!!.renderAccessorFieldType() shouldBe
8383
"DataFrame<org.jetbrains.kotlinx.dataframe.internal.codeGen.ShortNamesRenderingTest.Marker>"
@@ -125,7 +125,7 @@ internal class ShortNamesRenderingTest : TypeRenderingStrategy by ShortNames {
125125
}
126126

127127
@Test
128-
fun `data frame column`() {
128+
fun `dataframe column`() {
129129
fields.keys.asClue {
130130
fields["f"]!!.renderColumnType() shouldBe
131131
"DataColumn<DataFrame<org.jetbrains.kotlinx.dataframe.internal.codeGen.ShortNamesRenderingTest.Marker>>"

0 commit comments

Comments
 (0)