[Feature] Read blob-view dependency tables through a catalog with X-Paimon-Read-Via
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- cpp
- Domínio
- authorization, databases
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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!
- Linguagem predominante
- C++
- Estrelas
- 66
- Forks
- 33
- Merge médio
- 2d 52min
- PRs com merge (30d)
- 54
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/paimon-cpp
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
apache/paimon-cpp#410 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
apache/paimon-cpp#409 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
apache/paimon-cpp#408 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
apache/paimon-cpp#407 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
apache/paimon-cpp#406 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de apache/paimon-cpp
Issues semelhantes
-
ai_p2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ClickHouse/ClickHouse#125522 ·
Mantenedores costumam responder em até 1 dia
-
[BUG] rpicam-still loops forever with "ERROR: Device timeout detected, attempting a restart!!!"Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
raspberrypi/rpicam-apps#934 ·
-
[BUG] The priority slider's keyboard-hints tooltip shows on the 'Default' label, not the sliderAbertaagent:WSL bug linux LOW ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
Mantenedores costumam responder em até 1 dia
-
Branch-3.3.5a
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
TrinityCore/TrinityCore#32060 ·
Mantenedores costumam responder em até 3 dias
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
open-telemetry/opentelemetry-cpp#4697 ·
Mantenedores costumam responder em até 1 dia