[Bug] RemoteTableQuery keySerializer should not include partition keys

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

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

評価

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

調査の方向性

org.apache.paimon.flink.query.RemoteTableQuery.lookup から開始し、InternalRowSerializer.toBinaryRow の使用箇所を追跡します。パーティションの型とトリミングされたキーの型が異なるパーティション分割された主キー・テーブルに対するリモートルックアップ結合を再現し、その後、シリアライゼーションがパーティションフィールドを読み取らなくなり、ClassCastException が解消されたことを確認します。

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

説明

bug
Search before asking
  • I searched in the issues and found nothing similar.
Paimon version

When doing a lookup join to the remote query service (for primary key tables), we pass the partition keys, a bucket number, and a row to join to the existing table. Right now, serialization of the row fails because the serializer expected by the remote query service client assumes that the row includes partition fields, but we do not pass them (this is the same in LocalTableQuery, not a bug).

Let's change the key serializer here to avoid looking for partition keys.

Compute Engine

Flink

Minimal reproduce step

Use the remote query service to perform a lookup join from a flink row to a paimon table. The table must be partitioned, and the partitioned key and trimmed key must have different types (e.g. int vs. string). I'll include a test case in the PR that trips it up.

What doesn't meet your expectations?
java.lang.ClassCastException: class org.apache.paimon.data.BinaryString cannot be cast to class java.lang.Integer                                                                                   
        at org.apache.paimon.data.GenericRow.getInt(GenericRow.java:152)
        at org.apache.paimon.data.serializer.InternalRowSerializer.toBinaryRow(InternalRowSerializer.java:123)
        at org.apache.paimon.flink.query.RemoteTableQuery.lookup(RemoteTableQuery.java:73)
Anything else?

No response

Are you willing to submit a PR?
  • I'm willing to submit a PR!
主要言語
Java
スター
3.4k
フォーク
1.4k
平均マージ
1日 14時間
マージ済み PR(30日)
468

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

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

はじめの一歩

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

apache/paimon のほかの issue

apache/paimon の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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