[Feature] Read blob-view dependency tables through a catalog with X-Paimon-Read-Via
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- authorization, databases
Hướng nghiên cứu
Start in BlobViewLookup::LoadTableDescriptorChunk, which resolves the dependency table, and in ReadContextBuilder::Finish, where the X-Paimon-Read-Via header belongs. The issue also touches CatalogContext, the BLOB_VIEW_UPSTREAM_WAREHOUSE doc comment in include/paimon/, and the GetTableLocation fallback probing. Done means the REST header is emitted with an existing value kept, the dependency is read through its own catalog with a null file system, and the warehouse option is optional with fallback. The payload names no test files.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Search before asking
- I searched in the issues and found nothing similar.
Motivation
Reading a BlobView field resolves the blob table it points at, the dependency table, in BlobViewLookup::LoadTableDescriptorChunk. Today that read borrows the file system of the downstream read and passes it down through CatalogContext, which causes two problems.
The dependency table is authenticated as the downstream table. The file system handed down issues credentials for the table the read started from, not the one about to be read, so a metastore that authorizes per table cannot tell them apart. The Java CatalogEnvironment.dependencyReadContext() instead builds a catalog of its own for the dependency table and, on a REST metastore, sends an X-Paimon-Read-Via header naming the starting table so the server can authorize the dependency through that table's owner. cpp sends no such header.
BLOB_VIEW_UPSTREAM_WAREHOUSE is also mandatory: absent it the read fails with invalid config for blob view. The lookup then probes two candidate paths, <db>.db/<table> and <db>/<table>, and reports Ambiguous table path when both or neither exist, which a metastore-backed catalog resolves by identifier anyway.
Solution
- In
ReadContextBuilder::Finish, when the read goes through a catalog naming a table and the metastore isrest, add aheader.X-Paimon-Read-Viaoption carrying the URL-encoded flat JSON{"database":...,"object":...}of the starting identifier, mirroring the Java serializer. An existing value wins so a chain of views reports its outermost one instead of the innermost, and the object name keeps any branch suffix. - Change
CatalogContextto carry thefs_scheme_to_identifier_mapinstead of aFileSystem, and haveBlobViewLookupcreate a catalog from those options with a null file system so the dependency table is read under its own credentials. Drop the customGetTableLocationfallback probing in favor ofcatalog->GetTableLocation(identifier)plusWithCatalogon the scan and read builders. - Make
BLOB_VIEW_UPSTREAM_WAREHOUSEoptional: absent it, fall back to the warehouse the downstream table itself lives in, stripping its trailing<db>.db/<table>components, which resolves a co-located upstream table.
Anything else?
No storage format or protocol change; the X-Paimon-Read-Via header matches the Java REST protocol. In include/paimon/ only the doc comment of Options::BLOB_VIEW_UPSTREAM_WAREHOUSE changes, but its behavior changes from required to optional-with-fallback.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Ngôn ngữ chính
- C++
- Star
- 66
- Fork
- 33
- Merge trung bình
- 2 ngày 52 phút
- Pull request đã merge (30 ngày)
- 54
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/paimon-cpp
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/paimon-cpp#410 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
apache/paimon-cpp#409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/paimon-cpp#408 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/paimon-cpp#407 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/paimon-cpp#406 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/paimon-cpp
Issue tương tự
-
【问题】在文件树重命名文件,发现无法用鼠标选中一段文字Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
ros-navigation/navigation2#6648 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày