jsingh-yelp commented on code in PR #7576:
URL: https://github.com/apache/paimon/pull/7576#discussion_r3076682324
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lineage/LineageUtils.java:
##########
@@ -60,12 +60,12 @@ private static Map<String, String> buildConfigMap(Table
table) {
}
/**
- * Returns the lineage namespace for a Paimon table. The namespace uses
the {@code paimon://}
- * scheme followed by the table's physical warehouse path, e.g. {@code
- * "paimon://s3://my-bucket/warehouse/mydb.db/mytable"}.
+ * Returns the lineage namespace for a Paimon table. The namespace is the
warehouse path derived
+ * via {@link CatalogUtils#warehouse(String)}, e.g. {@code
"s3://my-bucket/warehouse"} for
+ * object stores or {@code "file:/tmp/warehouse"} for local paths.
*/
public static String getNamespace(Table table) {
- return PAIMON_DATASET_PREFIX + CoreOptions.path(table.options());
+ return
CatalogUtils.warehouse(CoreOptions.path(table.options()).toString());
Review Comment:
@JingsongLi Thanks this is a valid concern.
I was thinking of using the warehouse property from Catalog.options() ([Code
Ref](https://github.com/apache/paimon/blob/master/paimon-api/src/main/java/org/apache/paimon/options/CatalogOptions.java#L31))
directly as the namespace, with a fallback to a constant "paimon" string when
it's not available.
Is this something in line what you had in mind or you were thinking
something else?
--
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]