Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

View does not expose metadata_location: RestCatalog.load_view discards it from the server's response

オープン 初心者向け
#4,073 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
api, databases

調査の方向性

pyiceberg/catalog/rest/init.py の _response_to_view から始め、_response_to_table および ViewResponse モデルと比較してください。load_view と create_view が REST の metadata-location の値を保持し、結果として得られる View が issue に記載された register_view のユースケース向けにそれを公開していることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

kind:bug
Apache Iceberg version

0.12.0 (latest release)

Please describe the bug 🐞

RestCatalog.load_view (and create_view) parse the server's metadata-location but drop it when building the View, so callers cannot learn where a view's current metadata file is. Tables keep it as Table.metadata_location; views have no equivalent. The behaviour is unchanged on main.

The spec (open-api/rest-catalog-open-api.yaml) requires the field in every view load result:

LoadViewResult:
  required:
    - metadata-location
    - metadata

with the description: "The corresponding file location of view metadata is returned in the metadata-location field. Clients can check whether metadata has changed by comparing metadata locations after the view has been created."

pyiceberg parses it, then discards it (pyiceberg/catalog/rest/__init__.py on main):

class ViewResponse(IcebergBaseModel):
    metadata_location: str | None = Field(alias="metadata-location", default=None)
    metadata: ViewMetadata
    config: Properties = Field(default_factory=dict)

def _response_to_view(self, identifier_tuple, view_response: ViewResponse) -> View:
    return View(
        identifier=identifier_tuple,
        metadata=view_response.metadata,
        config=view_response.config,
    )   # view_response.metadata_location is never passed on

_response_to_table, by contrast, passes metadata_location=table_response.metadata_location to Table.

Why it matters: without it, a client cannot detect changes to a view the way the spec suggests (comparing metadata locations), record where a view's metadata lives, or re-register a view from that file later with register_view.

Expected: View exposes metadata_location, set from the REST response, like Table.metadata_location.

PR #3390 ("REST: Add metadata_location to View, and register_view integration test") addressed this but was closed unmerged. Related umbrella issue: #818.

Willingness to contribute
  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time
主要言語
Python
スター
1.1k
フォーク
606
平均マージ
1日 18時間
マージ済み PR(30日)
87

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iceberg-python のほかの issue

apache/iceberg-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。