Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

[Feature] Read blob-view dependency tables through a catalog with X-Paimon-Read-Via

Fermée
#426 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

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

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

enhancement

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 is rest, add a header.X-Paimon-Read-Via option 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 CatalogContext to carry the fs_scheme_to_identifier_map instead of a FileSystem, and have BlobViewLookup create a catalog from those options with a null file system so the dependency table is read under its own credentials. Drop the custom GetTableLocation fallback probing in favor of catalog->GetTableLocation(identifier) plus WithCatalog on the scan and read builders.
  • Make BLOB_VIEW_UPSTREAM_WAREHOUSE optional: 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

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/paimon-cpp

Toutes les issues de apache/paimon-cpp

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.