aokolnychyi commented on code in PR #15359:
URL: https://github.com/apache/iceberg/pull/15359#discussion_r2826060062


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/IcebergSource.java:
##########
@@ -48,19 +48,21 @@
 import org.apache.spark.sql.util.CaseInsensitiveStringMap;
 
 /**
- * The IcebergSource loads/writes tables with format "iceberg". It can load 
paths and tables.
+ * Data source for reading and writing Iceberg tables using the "iceberg" 
format.
  *
- * <p>How paths/tables are loaded when using 
spark.read().format("iceberg").load(table)
+ * <p>The `path` parameter provided by Spark is resolved in the following 
priority order:
  *
- * <p>table = "file:///path/to/table" -&gt; loads a HadoopTable at given path 
table = "tablename"
- * -&gt; loads currentCatalog.currentNamespace.tablename table = 
"catalog.tablename" -&gt; load
- * "tablename" from the specified catalog. table = "namespace.tablename" -&gt; 
load
- * "namespace.tablename" from current catalog table = 
"catalog.namespace.tablename" -&gt;
- * "namespace.tablename" from the specified catalog. table = 
"namespace1.namespace2.tablename" -&gt;
- * load "namespace1.namespace2.tablename" from current catalog
- *
- * <p>The above list is in order of priority. For example: a matching catalog 
will take priority
- * over any namespace resolution.
+ * <ol>
+ *   <li>Rewrite key - If `path` is a key in the table cache, load from the 
rewrite catalog
+ *   <li>Table location - If `path` contains "/", load a table at the 
specified location
+ *   <li>Catalog identifier - Otherwise treat `path` as an identifier and 
resolve as:
+ *       <ul>
+ *         <li>{@code "tbl"} - {@code currentCatalog.currentNamespace.tbl}
+ *         <li>{@code "cat.tbl"} - {@code tbl} from the specified catalog
+ *         <li>{@code "ns.tbl"} - {@code ns.tbl} from the current catalog
+ *         <li>{@code "cat.ns.tbl"} - {@code ns.tbl} from the specified catalog

Review Comment:
   Reworded this piece a bit.



-- 
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]

Reply via email to