xtdb

Brandon Olivier 2025-05-18T00:06:31.118449Z

I'm having an issue with a basic xtql query, and I'm not sure why. I'm following through the docs to learn xtql, and the parameterized example on that page is working, but my code isn't working.

(xt/q node '(from :users [{:person/email $email}])
        {:args {:email ""}})
I expected this to limit to the user with the email "<mailto:user@email.com|user@email.com>", but it returns all my users.

jarohen 2025-05-19T10:43:49.493159Z

yep, I neglected to include that in the docs, sorry folks 😳 fixed now

πŸ‘πŸ» 1
jarohen 2025-05-18T07:13:32.586949Z

thanks both πŸ™ I didn't manage to repro this locally - what I tried: β€’ docker run on the repro repo didn't have a version specified, so will implicitly be running against latest - I tried it against both latest (beta8) and beta6 explicitly β—¦ beta8 did return all the rows - this is because of the breaking XTQL change in beta8 (updated code to follow) β—¦ beta6 returned 0 rows as expected β€’ migrating the code to beta8 also returned 0 rows @brandon149 could you check your Docker log for the Starting XTDB 2.x @ 2.0.0-beta8 @ 9323479 ... line?

jarohen 2025-05-18T07:14:12.673169Z

seancorfield 2025-05-18T13:29:37.676589Z

> because of the breaking XTQL change in beta8 Ah, I missed that the Clojure API for querying was also affected by this parameter / fn change!

seancorfield 2025-05-18T13:30:33.236339Z

The docs need updating to reflect this, yes?

seancorfield 2025-05-18T01:04:21.061009Z

It looks okay to me. Does it work if you put the string value directly into the query like this:

(xt/q node '(from :users [{:person/email "user@email.com"}]))

bolivier 2025-05-18T01:07:12.510959Z

That works as expected, yes

seancorfield 2025-05-18T01:08:25.422799Z

What version of XTDB are you using?

bolivier 2025-05-18T01:12:50.523279Z

2.0.0-beta6

seancorfield 2025-05-18T01:39:53.631689Z

Hmm, I don't see anything in beta 7 or 8 that would invalidate that so... I don't know what I'm missing there...

bolivier 2025-05-18T01:43:37.209049Z

It’s especially strange to me cause it’s working on the tutorial data.

seancorfield 2025-05-18T01:44:36.808119Z

Ah, so are you getting back docs that have :person/email that doesn't match the args email value? Or docs that don't have :person/email at all?

seancorfield 2025-05-18T01:45:29.502369Z

If you can put together a GitHub repo that is self-contained with instructions on how to repro, that would help...

bolivier 2025-05-18T01:48:31.866689Z

I get all docs back. There is no filtering applied. I’ll put one up once I’m back in front of a computer.

πŸ‘πŸ» 1
Brandon Olivier 2025-05-18T04:26:47.233139Z

This repo should do it https://github.com/bolivier/xtdb-reproduction

Brandon Olivier 2025-05-18T04:31:13.541799Z

The xtql tutorial uses an in-memory db, and that works as expected, but when I replaced it with my running docker instance of xtdb, I see the same bad behavior.