This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-03
Channels
- # announcements (17)
- # asami (17)
- # babashka (20)
- # beginners (110)
- # calva (1)
- # cherry (3)
- # cider (1)
- # clj-kondo (21)
- # clj-on-windows (1)
- # cljsrn (5)
- # clojure (142)
- # clojure-austin (1)
- # clojure-europe (72)
- # clojure-france (28)
- # clojure-hungary (2)
- # clojure-nl (2)
- # clojure-norway (38)
- # clojure-poland (2)
- # clojure-uk (3)
- # clojurescript (4)
- # cursive (33)
- # data-science (3)
- # datahike (5)
- # datomic (1)
- # emacs (27)
- # events (3)
- # fulcro (15)
- # graalvm (4)
- # gratitude (2)
- # honeysql (7)
- # humbleui (8)
- # introduce-yourself (11)
- # jobs-discuss (9)
- # lambdaisland (3)
- # lsp (18)
- # malli (62)
- # music (1)
- # nbb (3)
- # off-topic (10)
- # pathom (3)
- # pedestal (6)
- # polylith (5)
- # re-frame (7)
- # releases (2)
- # shadow-cljs (33)
- # sql (1)
- # test-check (23)
- # vim (20)
- # xtdb (9)
I'm testing how to do "https://discuss.xtdb.com/t/handling-potentially-missing-fields/106/2" in order to filter query results by a potentially missing attribute. Based on https://gist.github.com/zeitstein/8ba5c6c05583a75eee234e474e79d0ff, it seems like an absence query using get-attr
performs at least the same as an explicit query. Could somebody sanity check this?
Cool! Thanks for pulling this analysis together https://gist.github.com/zeitstein/8ba5c6c05583a75eee234e474e79d0ff#file-absenceq-clj-L48-L51 I haven't thought about it too deeply, but shouldn't this be inverted, i.e.:
(defn q-explicit2 []
(xt/q (xt/db absnode-explicit)
'{:find [e]
:where [[e :even? true]
(not [e :query? false])]}))
The idea is to have :query? false
for those divisible by 100 in both cases, while the explicit case sets :query? true
for rest and queries for it. I do check whether the results are the same in both cases. (Hopefully I've not completely lost my mind :))
Is this result surprising to you at all? I was under the impression absence queries are a problem. Maybe it's the example.
My brain is pretty fried today. I'll have to have another look tomorrow. > I was under the impression absence queries are a problem IIRC the real performance challenges arise when joining in the presence of multiple potential absences (at least)
Morning all 👋 I see there that there is an experimental listen
function as part of the xtdb api. How good/bad an idea is it to try use this to implement a pub/sub mechanism for clients who want to be updated of changes?
I didn’t even notice the “experimental” in the docstring, I’ve been using it and it works fine
Ah, so the existence of the word "experimental" here is completely untrue. The API is pretty rock solid at this point. Thanks for mentioning it though - I'll make sure we clarify the docstring for the next release! (I've added a note to the project board)