MINHASH_COMBINE¶
入力 MinHash 状態を単一の MinHash 出力状態に結合します。このMinhash状態を APPROXIMATE_SIMILARITY 関数に入力して、他の MinHash 状態との類似性を推定できます。
これにより、同じテーブルの水平行セットで MINHASH を実行し、各行セットに対して MinHash 状態を生成するユースケースが可能になります。その後、これらの状態を MINHASH_COMBINE を使用して結合し、テーブル全体で MINHASH を1回実行するのと同じ出力状態を生成できます。
MinHash 状態の詳細については、 2つ以上のセットの類似性の推定 をご参照ください。
- こちらもご参照ください。
構文¶
集計関数
ウィンドウ関数
OVER句の詳細については、 ウィンドウ関数の構文と使用法 をご参照ください。
引数¶
stateMINHASH の呼び出しによって生成されたMinHash状態情報を含む式です。入力MinHash状態には、等しい長さの配列が必要です。
使用上の注意¶
例¶
Here is a more extensive example, showing the three related functions
MINHASH, MINHASH_COMBINE and APPROXIMATE_SIMILARITY. This
example creates 3 tables (ta, tb, and tc), two of which (ta and tb) are
similar, and two of which (ta and tc) are completely dissimilar.
値が含まれるテーブルを作成および生成します。
データの初期セットのMinHash情報を計算します。
テーブルのいずれかにデータを追加します。
Demonstrate the MINHASH_COMBINE function:
This query shows the approximate similarity of the two similar tables
(ta and tb):
This query shows the approximate similarity of the two very different tables
(ta and tc):