-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Kernel] Resolve path given to Table.forPath
using TableClient
APIs
#2064
Conversation
kernel/kernel-defaults/src/test/scala/io/delta/kernel/defaults/utils/TestUtils.scala
Outdated
Show resolved
Hide resolved
8fc0f47
to
4f73539
Compare
...l/kernel-defaults/src/main/java/io/delta/kernel/defaults/client/DefaultFileSystemClient.java
Show resolved
Hide resolved
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.
Can we test the check in SnapshotManager? Like
- create Table.forPath(...)
- delete that directory
- call getLatestSnapshot()
This is also coincidentally one of the tests I saw in the standalone suites that I noted down to copy over.
@@ -68,6 +68,11 @@ trait TestUtils extends Assertions { | |||
} | |||
} | |||
|
|||
def latestSnapshot(path: String): Snapshot = { |
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.
@scottsand-db didn't we discuss explicitly not using this as a test API?
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.
i revert my opinion; im fine with this; thanks!
Standalone test is here https://github.com/delta-io/delta/blob/master/connectors/standalone/src/test/scala/io/delta/standalone/internal/DeltaLogSuite.scala#L159 if that helps |
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.
LGTM
Which Delta project/connector is this regarding?
Description
Currently, we expect the path given to
Table.forPath()
to be fully qualified. This enforces an unnecessary burden on the connector to add the necessary schema or authority etc. Instead, add aFileSystemClient.resolvePath
API and use it to resolve the path to a fully qualified path fromTable.forPath()
.How was this patch tested?
Existing tests (deleted the
file:
prefix added to tests tables in the path) and a couple of new tests around missing table paths.