Implementation classes named in table properties are imported and instantiated without a type check

オープン
#3,932 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
security

調査の方向性

pyiceberg/io/init.py の _import_file_io、pyiceberg/table/locations.py の _import_location_provider、pyiceberg/io/pyarrow.py の _import_retry_strategy から始めます。各プロパティがどのように解決され、呼び出されるかを追跡し、その後、インスタンス化の前に FileIO、LocationProvider、または S3RetryStrategy のサブクラスだけが受け入れられることを確認します。3 つすべてのパスで無関係な import 可能クラスが拒否されれば完了です。

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

説明

bug

Three properties name a class that PyIceberg imports and calls:

Property Resolved by Called as
py-io-impl _import_file_io (pyiceberg/io/__init__.py) class_(properties)
write.py-location-provider.impl _import_location_provider (pyiceberg/table/locations.py) class_(table_location, table_properties)
s3.retry-strategy-impl _import_retry_strategy (pyiceberg/io/pyarrow.py) class_()

Each follows the same pattern:

module = importlib.import_module(module_name)
class_ = getattr(module, class_name)
return class_(...)

None of the three checks that the resolved object is the type it is about to be used as — there is no issubclass against FileIO, LocationProvider, or S3RetryStrategy. Any importable dotted name resolves and is called, with the property map passed as an argument in two of the three cases.

All three properties are read from the merged table property map, so their values can originate in a table's metadata rather than in the operator's catalog configuration.


Issue investigation generated via claude, reviewed by Sung, Kevin, Fokko.

主要言語
Python
スター
1.1k
フォーク
589
平均マージ
2日 4時間
マージ済み PR(30日)
72

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

apache/iceberg-python のほかの issue

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

似ている issue

Python の issue をもっと見る

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

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