I have left and right table, where right table contains nullable fields
I join them with leftJoin_ and try to create filter_ which has such condition:
maybe_ nothing_ nullableFieldFromRightTable rt /=. just_ (val_ 1)
So, if rt is null just return nothing and if rt is not null return nullableFieldFromRightTable which will return nothing or just value
I am using it as beam doen't support to check nested maybes
Then I just check if it is different from just 1
This code compiles but I get invalid result, so, here is why:
CASE
WHEN ((((("t1"."someField1") IS NOT NULL) AND (("t1"."someField2") IS NOT NULL)) AND
(("t1"."nullableFieldFromRightTable") IS NOT NULL)) AND <all_other_fields_from_table> IS NOT NULL)
THEN "t1"."nullableFieldFromRightTable"
ELSE null END) IS DISTINCT FROM 1)
Beam generates strange query which doesn't the meaning of the beam query
I have left and right table, where right table contains nullable fields
I join them with
leftJoin_and try to createfilter_which has such condition:So, if
rtis null just returnnothingand ifrtis not null returnnullableFieldFromRightTablewhich will returnnothingorjust valueI am using it as beam doen't support to check nested maybes
Then I just check if it is different from
just 1This code compiles but I get invalid result, so, here is why:
Beam generates strange query which doesn't the meaning of the beam query