lxy-9602 commented on code in PR #427:
URL: https://github.com/apache/paimon-cpp/pull/427#discussion_r4246957708
##########
src/paimon/core/operation/data_evolution_split_read.cpp:
##########
@@ -270,17 +270,25 @@ Result<std::unique_ptr<BatchReader>>
DataEvolutionSplitRead::WrapWithBlobViewRes
if (read_blob_view_fields.empty()) {
return std::move(inner_reader);
}
+ // The explicit upstream warehouse is optional. Absent it, fall back to
the warehouse this
+ // (downstream) table itself lives in, which is where a co-located
upstream table is resolved
+ // from; a metastore-backed catalog resolves the upstream location by
identifier anyway, so the
+ // root is only a hint there. Stripping the trailing
`<database>.db/<table>` (or
+ // `<database>/<table>`) components off this table's path yields that
warehouse.
std::optional<std::string> warehouse_path =
options_.GetBlobViewUpstreamWarehouse();
if (!warehouse_path) {
- return Status::Invalid(
- "invalid config for blob view, supposed to set
BLOB_VIEW_UPSTREAM_WAREHOUSE");
+ warehouse_path =
+
PathUtil::GetParentDirPath(PathUtil::GetParentDirPath(context_->GetPath()));
}
Review Comment:
Can we confirm that this path always has two layers: `<database>.db/<table>`
or `<database>/<table>`?
restcatalog can’t guarantee the physical path parent for `<database>`?
--
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]