singhpk234 commented on code in PR #13979:
URL: https://github.com/apache/iceberg/pull/13979#discussion_r2328908182
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -167,16 +167,28 @@ protected TableIdentifier buildIdentifier(Identifier
identifier) {
@Override
public Table loadTable(Identifier ident) throws NoSuchTableException {
+ return loadTableViaView(ident, Map.of());
+ }
+
+ @Override
+ public Table loadTableViaView(Identifier ident, Map<String, Object> context)
+ throws NoSuchTableException {
try {
- return load(ident);
+ return load(ident, context);
} catch (org.apache.iceberg.exceptions.NoSuchTableException e) {
throw new NoSuchTableException(ident);
}
}
@Override
public Table loadTable(Identifier ident, String version) throws
NoSuchTableException {
- Table table = loadTable(ident);
+ return loadTableViaView(ident, version, Map.of());
+ }
+
+ @Override
+ public Table loadTableViaView(Identifier ident, String version, Map<String,
Object> context)
Review Comment:
Renamed it to loadTableWithContext where context would be a runtime context,
let me know does is sounds better !
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -167,16 +167,28 @@ protected TableIdentifier buildIdentifier(Identifier
identifier) {
@Override
public Table loadTable(Identifier ident) throws NoSuchTableException {
+ return loadTableViaView(ident, Map.of());
+ }
+
+ @Override
+ public Table loadTableViaView(Identifier ident, Map<String, Object> context)
+ throws NoSuchTableException {
try {
- return load(ident);
+ return load(ident, context);
} catch (org.apache.iceberg.exceptions.NoSuchTableException e) {
throw new NoSuchTableException(ident);
}
}
@Override
public Table loadTable(Identifier ident, String version) throws
NoSuchTableException {
- Table table = loadTable(ident);
+ return loadTableViaView(ident, version, Map.of());
+ }
+
+ @Override
+ public Table loadTableViaView(Identifier ident, String version, Map<String,
Object> context)
Review Comment:
Renamed it to loadTableWithContext where context would be a runtime context,
let me know does is sounds better.
--
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]