rdblue commented on a change in pull request #1216:
URL: https://github.com/apache/iceberg/pull/1216#discussion_r476574660
##########
File path: python/iceberg/core/filesystem/filesystem_tables.py
##########
@@ -15,39 +15,39 @@
# specific language governing permissions and limitations
# under the License.
-
-from iceberg.api import Tables
-from iceberg.exceptions import NoSuchTableException
-
from .filesystem_table_operations import FilesystemTableOperations
+from .. import TableOperations
from ..table_metadata import TableMetadata
+from ...api import PartitionSpec, Schema, Table, Tables
+from ...exceptions import NoSuchTableException
class FilesystemTables(Tables):
- def __init__(self, conf=None):
+ def __init__(self: "FilesystemTables", conf: dict = None) -> None:
self.conf = conf if conf is not None else dict()
- def load(self, location):
+ def load(self: "FilesystemTables", table_identifier: str) -> Table:
from ..base_table import BaseTable
- ops = self.new_table_ops(location)
+ ops = self.new_table_ops(table_identifier)
if ops.current() is None:
- raise NoSuchTableException("Table does not exist at location: %s"
% location)
+ raise NoSuchTableException("Table does not exist at location: %s"
% table_identifier)
- return BaseTable(ops, location)
+ return BaseTable(ops, table_identifier)
- def create(self, schema, table_identifier=None, spec=None,
properties=None, location=None):
+ def create(self: "FilesystemTables", schema: Schema, table_identifier:
str, spec: PartitionSpec = None,
+ properties: dict = None, location: str = None) -> Table:
Review comment:
Should we check that `location is None` to ensure that a user doesn't
pass both a table identifier (location) and a different location?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]