-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Labels
Description
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