hi all. Can someone explain this:
(alet [a (ei/right 1) b (inc a)] a)
2
Why not 1
or #<Right 1>
?But
(alet [a (ei/right 1) b (ei/right 2)] a)
#<Right 1>
I know
because (inc a) is 2, not #<Right 2> and doesn't have context. I remember someone (probably niwinz) already explained this to me
at this moment it seems like inconsistent
and it seems like a bug 😞
this additionally remember me that I should release a new version of cats ASAP
because master comes with many bugfixes
@rm the behavior differs because some different paths are taken for evaluate that
if one expresion depends on other is evaluated differently if the both are just parallel paths
@niwinz: thank you for explanation again, will wait for a new version. But actually it's very rare case that I use something like that, most of the time all results of functions are wrapped already
anyone here that is familiar with suricatta? i'm running into issues while trying to UPDATE ... SET key = NULL
-- apparently, jooq tries to cast the null value to a varchar
so I was thinking that there perhaps was some clojure <-> java incompatibility that jooq uses to test for null ?
I was found the same issue some days ago but I don't k now if I can solve it from suricatta part
i can help you with it, if you want
this is a real issue for me now, so it makes sense for me to spend some time debugging it
any help is very welcome!
apparently (fmt/sql) returns SET foo = NULL, where (fmt/sqlvec) return SET foo = (CAST null AS CHARACTER VARYING)
0.o
seems like a dialect issue..?
yes, probably
the problem goes away when you get rid of the pgsql dialect
hmm, if it works properly with default dialect, but when a connection is used with postgresql dialect it does not works
it seems like a jOOQ bug
i agree with that
i wouldn't expect a bug like this to be in jOOQ, however
it's too major a bug
user=> (fmt/sqlvec (-> (dsl/update :foo) (dsl/set :foo nil)))
["update foo set foo = ?" nil]
user=> (fmt/sqlvec (-> (dsl/update :foo) (dsl/set :foo nil)) {:dialect :postgresql})
["update foo set foo = cast(? as varchar)" nil]
I going to write in the jOOQ mailing list
ok, awesome!
done
I'll notice you on any news on that 😉
awesome! i'll create an issue on the suricatta repo to keep track of this
please!