kunwp1 commented on code in PR #9417:
URL: https://github.com/apache/texera/pull/9417#discussion_r4592233500


##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/dataset/utils/DatasetStatisticsUtils.scala:
##########
@@ -66,10 +55,6 @@ object DatasetStatisticsUtils {
   }
 
   def getUserCreatedDatasets(uid: Integer): List[DatasetQuota] = {
-    val datasetList = getUserCreatedDatasetList(uid)
-    datasetList.map { dataset =>
-      val size = 0 // we disabled the size calculation due to the switch of 
dataset implementation
-      dataset.copy(size = size)
-    }
+    getUserCreatedDatasetList(uid)

Review Comment:
   Now that the map is gone, this only forwards to the private 
`getUserCreatedDatasetList`. Making that one public under this name drops a 
layer, and its comment ("a list of dataset ids") is off anyway. The removed 
note on why `size` is 0 would be worth keeping next to `size = 0`, since the 
quota page still sums that field:
   
   ```scala
     // this function returns the datasets that belong to the user
     def getUserCreatedDatasets(uid: Integer): List[DatasetQuota] = {
       ...
             // we disabled the size calculation due to the switch of dataset 
implementation
             size = 0
   ```



##########
amber/src/main/scala/org/apache/texera/amber/engine/architecture/coordinator/promisehandlers/PauseHandler.scala:
##########
@@ -55,9 +51,6 @@ trait PauseHandler {
           .flatMap(_.getAllOperatorExecutions)
           .map {
             case (physicalOpId, opExecution) =>

Review Comment:
   With the buffer gone, `physicalOpId` is unused here too (`case (_, 
opExecution) =>`), and the "current input tuple" in the comment at line 67 
refers to the same removed feature, so it could just say "get the stats from 
the worker".



##########
amber/src/test/scala/org/apache/texera/web/resource/dashboard/user/dataset/utils/DatasetStatisticsUtilsSpec.scala:
##########
@@ -112,33 +112,6 @@ class DatasetStatisticsUtilsSpec extends AnyFlatSpec with 
BeforeAndAfterAll with
     insertDataset(otherUid, now())
   }

Review Comment:
   `seedTwoOwners()` has no callers now, since the two removed count tests were 
its only users. Its doc and the "neither query" comment at line 131 also still 
describe the count query, so the helper can go and that comment can say "the 
query".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to