-
Notifications
You must be signed in to change notification settings - Fork 172
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
Use case class ParsedDeltaSharingTablePath as return type for parsePath #388
Changes from all commits
c6ad2bd
1e2a113
28030a1
d438096
ecec5b1
67f62eb
ffd8ea0
83d5444
773d262
34798ff
3c787ce
fad72fb
aa62bc9
a076f16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,12 @@ trait DeltaSharingClient { | |
def getProfileProvider: DeltaSharingProfileProvider = null | ||
} | ||
|
||
case class ParsedDeltaSharingTablePath( | ||
profileFile: String, | ||
share: String, | ||
schema: String, | ||
table: String) | ||
|
||
private[sharing] trait PaginationResponse { | ||
def nextPageToken: Option[String] | ||
} | ||
|
@@ -841,7 +847,7 @@ object DeltaSharingRestClient extends Logging { | |
* Parse the user provided path `profile_file#share.schema.share` to | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated. |
||
* `(profile_file, share, schema, share)`. | ||
*/ | ||
def parsePath(path: String): (String, String, String, String) = { | ||
def parsePath(path: String): ParsedDeltaSharingTablePath = { | ||
val shapeIndex = path.lastIndexOf('#') | ||
if (shapeIndex < 0) { | ||
throw new IllegalArgumentException(s"path $path is not valid") | ||
|
@@ -855,7 +861,12 @@ object DeltaSharingRestClient extends Logging { | |
tableSplits(1).isEmpty || tableSplits(2).isEmpty) { | ||
throw new IllegalArgumentException(s"path $path is not valid") | ||
} | ||
(profileFile, tableSplits(0), tableSplits(1), tableSplits(2)) | ||
ParsedDeltaSharingTablePath( | ||
profileFile = profileFile, | ||
share = tableSplits(0), | ||
schema = tableSplits(1), | ||
table = tableSplits(2) | ||
) | ||
} | ||
|
||
def apply( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ private[sharing] class DeltaSharingFileSystem extends FileSystem { | |
|
||
override def getUri(): URI = URI.create(s"$SCHEME:///") | ||
|
||
// delta-sharing:/// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is not clear. Consider expanding on it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated. |
||
override def open(f: Path, bufferSize: Int): FSDataInputStream = { | ||
val path = DeltaSharingFileSystem.decode(f) | ||
val fetcher = | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider documenting this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chakankardb added in another PR.