[Bug]: Configurations.equals is asymmetric for different key sets
メンテナーはふだん 2 日以内に返信
評価
この issue はまだ評価されていません。
説明
What happened?
Configurations.equals() does not compare the number of configuration entries. It only checks whether every entry in the left-hand object exists with the same value in the right-hand object.
As a result, equality is asymmetric:
small.equals(large) = true
large.equals(small) = false
It can also report two objects as equal even though their hash codes differ, violating the Java equals/hashCode contract.
A related problem occurs when comparing byte-array configurations with different keys: otherVal is null, and calling otherVal.getClass() throws a NullPointerException.
Affects Versions
master
What table formats are you seeing the problem on?
Iceberg, Paimon, Mixed-Iceberg, Mixed-Hive
What engines are you seeing the problem on?
No response
How to reproduce
There is no AMS log output because the issue is a deterministic Java equality error. The relevant reproduction output is:
small.equals(large) = true
large.equals(small) = false
small.hashCode() = 97
large.hashCode() = 3
For byte-array values:
java.lang.NullPointerException
at org.apache.amoro.config.Configurations.equals(Configurations.java:670)
Relevant log output
Anything else
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要言語
- Java
- スター
- 1.2k
- フォーク
- 398
- 平均マージ
- 3日 7時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/amoro のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
[Doc]: Clarify that catalog-level table properties should be added via the "Table properties" interface, and the "table." prefix is only required when using the raw "Properties" interface対応中かも @Akeron-Zhu が 8 日前に担当しました。 オープンtype:improvement
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
jules
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
open-learning-exchange/myplanet#18568 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
quarkiverse/quarkus-ironjacamar#264 · コメント 7 件 ·
-
[Bug]: Login shows only "Log-in failed" when Commons answers the login request with an API errorオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
commons-app/apps-android-commons#7295 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
hibernate/hibernate-reactive#4485 ·
メンテナーはふだん 1 日以内に返信