I am struggling to understand why this where-in query is failing when there are nulls in the row value expression.
select * from
FOO
where (
EPOCH,
CURRENCY_CODE,
PRICE_PROVIDER_CODE,
MARKET_EXTERNAL_ID)
in (
(1622736580084, 'USD', 'A', null),
(1622736580085, 'USD', 'B', null),
(1622736580086, 'USD', 'C', null)
)
The query is not returning a single record from the below table. I expected each row value expression to match exactly one record. I appears the null spoils the fun and I don't understand why.
EPOCH CURENCY_CODE PRICE_PROVIDER_CODE MARKET_EXTERNAL_ID
------------------------------------------------------------------------
1622736580084 USD A NULL
1622736580085 USD B NULL
1622736580086 USD C NULL
It works as expected for rows that have non-null values in the MARKET_EXTERNAL_ID
field.