-
Notifications
You must be signed in to change notification settings - Fork 78
Lazy Statistics #1656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Lazy Statistics #1656
Conversation
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/columns/ValueColumnImpl.kt
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/columns/ValueColumnImpl.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/aggregation/aggregators/Aggregator.kt
Outdated
Show resolved
Hide resolved
.../src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/aggregation/aggregators/Aggregators.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/columns/ValueColumnImpl.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/columns/ValueColumnImpl.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/columns/ValueColumnImpl.kt
Outdated
Show resolved
Hide resolved
…nts ValueColumnInternal
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/sort.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/columns/ValueColumnImpl.kt
Outdated
Show resolved
Hide resolved
...org/jetbrains/kotlinx/dataframe/impl/aggregation/aggregators/AggregatorAggregationHandler.kt
Outdated
Show resolved
Hide resolved
|
Alright, it seems the implementation is in place. However, we never test the cache is actually being used. For all we know, it's still being recalculated every time. Please add some tests in the statistics tests to verify that the cache is actually being set when a new statistic is calculated. You could also test the retrieving part by saving something wrong into the cache manually and then check if it reappears when the statistic is requested again. (now you can see why it makes sense to have the logic of interacting with the cache inside the ValueColumn instead of on the aggregator side :) Makes it easier to test) |
Yes, much better. Until now I tested the behaviour of cache only by using prints and it seems to work correctly. |
We'll discuss this in the team first and get back to you later, if that's okay |
Yes, of course. |
core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/statistics.kt
Outdated
Show resolved
Hide resolved
|
To be able to close #1492 we also need some test that verify the original issue now works. So please try the example with Also some dataframe-wide statistic function like This actually made me think of something: Try renaming a column that has some statistics cache :) Even though the contents of the column are exactly the same as before, the cache will be gone as a new |
Fixed version of #1636