The GitHub Actions job "Docs 404 check (beta)" on 
flink.git/FLINK-40936-variant-function-equality has failed.
Run started by GitHub user raminqaf (triggered by raminqaf).

Head commit for run:
784bb5a89771831352ef940c9a0bf114eb4ab624 / Ramin Gharib <[email protected]>
[FLINK-40936][table] Reject VARIANT elements and keys in functions that compare 
them

Flink compares VARIANT values by their binary encoding, but one value has many 
encodings. So functions that compare array elements or map keys treated equal 
VARIANT values as different and silently returned wrong results.

LogicalTypeChecks.areComparable rejects every type that is not a comparable key 
type, see LogicalTypeChecks.isComparableKeyType. This also covers a structured 
type with a VARIANT attribute. ARRAY_CONTAINS, ARRAY_DISTINCT, ARRAY_POSITION, 
ARRAY_REMOVE, ARRAY_UNION, ARRAY_EXCEPT, ARRAY_INTERSECT, MAP_CONTAINS_KEY and 
MAP_UNION declare in their input type strategy that they compare elements or 
keys, so they reject VARIANT elements and keys during type inference. Their 
runtime already compares through isEqual evaluators, so for other types the 
error only moves from code generation to validation. GREATEST, LEAST, 
MAP_FROM_ENTRIES and Table API comparisons reject VARIANT the same way.

These functions build their equality check again during code generation. So a 
job restored from a compiled plan that calls one of them on VARIANT elements or 
keys now fails when it is executed, before the job is submitted.

The VARIANT section of the data types page lists these functions.

Report URL: https://github.com/apache/flink/actions/runs/37782258573

With regards,
GitHub Actions via GitBox

Reply via email to