-
Notifications
You must be signed in to change notification settings - Fork 113
Decouple creating source file's handler with resolving as URI in ScanSourceOp #2972
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
50bebcc
add Readonly document and change source op
bobbai00 6ec1fb4
fix more
bobbai00 1013205
fix more
bobbai00 bb60d75
make it work
bobbai00 8b35d90
fmt
bobbai00 4aba441
add type alias
bobbai00 6127e05
Merge branch 'master' into jiadong-refactor-resolve
Yicong-Huang 2c4a9da
some handy changes
Yicong-Huang bb576ff
save working version
bobbai00 4fa96d1
fmt
bobbai00 da882fe
Merge branch 'master' into jiadong-refactor-resolve
bobbai00 e84070b
merge dataset resource
bobbai00 402f413
move open to virtual document
bobbai00 d96f414
Merge branch 'master' into jiadong-refactor-resolve
bobbai00 4d8e72b
fix tests
bobbai00 5fa9ca7
fmt
bobbai00 238b31c
fix naming
bobbai00 ecad8e3
fmt
bobbai00 a6d2cef
fix fmt
bobbai00 f97feb4
Merge branch 'master' into jiadong-refactor-resolve
bobbai00 3cd3051
fix test
bobbai00 5a75f26
fmt
bobbai00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
core/amber/src/main/scala/edu/uci/ics/amber/engine/common/storage/DocumentFactory.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package edu.uci.ics.amber.engine.common.storage | ||
|
|
||
| import edu.uci.ics.texera.workflow.common.storage.FileResolver.DATASET_FILE_URI_SCHEME | ||
|
|
||
| import java.net.URI | ||
|
|
||
| object DocumentFactory { | ||
| def newReadonlyDocument(fileUri: URI): ReadonlyVirtualDocument[_] = { | ||
| fileUri.getScheme match { | ||
| case DATASET_FILE_URI_SCHEME => | ||
| new DatasetFileDocument(fileUri) | ||
|
|
||
| case "file" => | ||
| // For local files, create a ReadonlyLocalFileDocument | ||
| new ReadonlyLocalFileDocument(fileUri) | ||
|
|
||
| case _ => | ||
| throw new UnsupportedOperationException(s"Unsupported URI scheme: ${fileUri.getScheme}") | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.