You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 FROM1)
Beam generates strange query which doesn't the meaning of the beam query
The text was updated successfully, but these errors were encountered:
Can you explain how this differs from what you expected? Is it that maybe_ takes the "just" case only if all columns from rt are non-null? This does seem to cause confusion, for example see #442.
Is it that maybe_ takes the "just" case only if all columns from rt are non-null?
Yes, I already checked that the root of the problem is in SQL but not in beam. But it will be useful to see it in documentation. I just catched this issue easily because it quickly ruined my project and I knew where to search. But it may cause really big problems for somebody.
Or maybe it is possible to create a new method like strictMaybe of something like this that will return True if at least one element in joined table is not null. Yes it will not work for tables with all nullable columns and I am not sure that it is possible to solve it somehow but it is still better than nothing.
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
rt
is null just returnnothing
and ifrt
is not null returnnullableFieldFromRightTable
which will returnnothing
orjust 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:
Beam generates strange query which doesn't the meaning of the beam query
The text was updated successfully, but these errors were encountered: