jackye1995 commented on a change in pull request #3269:
URL: https://github.com/apache/iceberg/pull/3269#discussion_r726494452
##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -456,10 +466,97 @@ private static void checkNotPathIdentifier(Identifier
identifier, String method)
}
}
- private Table load(Identifier ident) {
- return isPathIdentifier(ident) ?
- tables.load(((PathIdentifier) ident).location()) :
- icebergCatalog.loadTable(buildIdentifier(ident));
+ private Pair<Table, Long> load(Identifier ident) {
+ if (isPathIdentifier(ident)) {
+ return loadFromPathIdentifier((PathIdentifier) ident);
+ }
+
+ try {
+ return Pair.of(icebergCatalog.loadTable(buildIdentifier(ident)), null);
+
+ } catch (org.apache.iceberg.exceptions.NoSuchTableException e) {
+ // if the original load didn't work, the identifier may be extended and
include a snapshot selector
+ TableIdentifier namespaceAsIdent =
buildIdentifier(namespaceToIdentifier(ident.namespace()));
Review comment:
So we are also using `.` as the deliminator for table names, similar to
how system tables are parsed today. However, system table parsing logic is in
core, should we also move this logic to core so all engines obey the same table
name format?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]