aglinxinyuan opened a new issue, #7035:
URL: https://github.com/apache/texera/issues/7035

   ### Task Summary
   
   `DatasetFileNode` has two tree builders. Only one of them is reachable.
   
   | Builder | Callers |
   | --- | --- |
   | `fromLakeFSRepositoryCommittedObjects` | live — used by the dataset REST 
resources |
   | `fromPhysicalFileNodes` (+ its private helper `addNodeToTree`) | none 
outside `DatasetFileNodeSpec` |
   
   The dead builder converts a `PhysicalFileNode` tree (the pre-LakeFS, 
local-JGit representation) into a `DatasetFileNode` tree. Since dataset storage 
moved to LakeFS, nothing produces that input in production any more.
   
   The two builders also share ~24 lines of byte-identical 
owner/dataset/version scaffolding and two byte-identical local `sortChildren` 
definitions, so removing the dead one removes the duplication as a side effect 
rather than requiring a refactor.
   
   Removing it also drops file-service's only compile-time dependency on 
`org.apache.texera.amber.core.storage.util.dataset.PhysicalFileNode`, which is 
the precondition for a follow-up: after this lands, `PhysicalFileNode` plus 
`JGitVersionControl.getRootFileNodeOfCommit` / `createOrGetNode` / 
`ensureParentChildLink` and 
`GitVersionControlLocalFileStorage.retrieveRootFileNodesOfVersion` have no 
non-test caller anywhere either. That chain spans `common/workflow-core` and 
the amber test tree, so it is worth handling as its own change rather than 
bundling it here.
   
   −141 lines in file-service, no behaviour change.
   
   ### Task Type
   
   - [x] Refactor / Cleanup
   


-- 
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