Operator: AIJOIN
Description
The AIJOIN operator is a semantic join predicate that evaluates whether two column values match according to a natural-language condition. Both columns must be of SQL type TEXT, and can contain multimodal (text-encoded) content such as images or audio data, in addition to pure text. It is intended for use in WHERE clauses.
Syntax
To integrate the AI join in an SQL query, use the syntax:
AIJOIN(<left_column>, <right_column>, '<join_condition>')
The semantics of the parameters are as follows:
<left_column>: left-side SQL column (TEXT) containing text, images, or audio data.<right_column>: right-side SQL column (TEXT) containing text, images, or audio data.<join_condition>: text describing when two values should match.
The operator returns BOOLEAN for each candidate pair.
Example
The following query joins rows from two product catalogs when the product names refer to the same product (but might be written differently):
SELECT *
FROM ProductDB1 P1, ProductDB2 P2
WHERE AIJOIN(P1.productName, P2.productName, 'this is the same product');