[Feature] Read blob-view dependency tables through a catalog with X-Paimon-Read-Via
Les mainteneurs répondent en général sous 1 jour
Une pull request liée a déjà été fusionnée.
- #427 par @lucasfang — fusionnée
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- cpp
- Domaine
- authorization, databases
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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!
- Langage dominant
- C++
- Étoiles
- 68
- Forks
- 34
- Merge moyen
- 3 j 18 h
- PR mergées (30 j)
- 44
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/paimon-cpp
-
fix(executor): avoid retaining a callback when lazy worker startup failsPeut-être pris @realAaronWu l’a pris il y a 2 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
apache/paimon-cpp#436 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 8/100
apache/paimon-cpp#435 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
[Feature] Prune manifest partitions before metadata decodingPeut-être pris @gripleaf l’a pris il y a 5 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
apache/paimon-cpp#433 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
apache/paimon-cpp#410 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
apache/paimon-cpp#409 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de apache/paimon-cpp
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
nasa/fprime#6225 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
[Feature]: Windows 语音输入默认关闭Ouverteenhancement source/qq
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
metasequoiaime/msime-windows#1054 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
amnezia-vpn/amnezia-client#3297 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
[安卓Feature]: 数字键盘左侧符号区域大小优化Ouverteenhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
metasequoiaime/msime#8620 ·
Les mainteneurs répondent en général sous 1 jour
-
area/docs type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
ChiR24/Unreal_mcp#679 ·
Les mainteneurs répondent en général sous 1 jour