Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries inside an inter-fn doesn't resolve a built-in properly #217

Open
JeremS opened this issue Jul 6, 2023 · 1 comment
Open

Queries inside an inter-fn doesn't resolve a built-in properly #217

JeremS opened this issue Jul 6, 2023 · 1 comment

Comments

@JeremS
Copy link

JeremS commented Jul 6, 2023

Hello, I am having a bit of an issue with the declaration of a transaction function. I have something like this:

(di/inter-fn  [db es]
 (let [n (d/q '[:find (max ?n) . 
                :where [?id :picture/number ?n]] db)]))

The problem is that when I use this fn, it is as if the (max ?n) . part of the query is processed just as ?n .

When I eval this declaration I get:

#datalevin/inter-fn (fn
                       [db es]  
                       (clojure.core/let
                        [n     
                         (datalevin.core/q  
                          '[:find
                            (clojure.core/max ?n)
                            .
                            :where
                            [?id :picture/number ?n]]
                          db)]))

The symbol max in the query is qualified to clojure.core/max instead of staying unqualified to get the aggregate behavior.

Cheers,

@huahaiy huahaiy added the bug Something isn't working label Jul 7, 2023
huahaiy added a commit that referenced this issue Aug 16, 2023
@huahaiy huahaiy removed the bug Something isn't working label Aug 16, 2023
@huahaiy
Copy link
Contributor

huahaiy commented Aug 16, 2023

I could not seem to reproduce this. Could you isolate a test case?

huahaiy added a commit that referenced this issue Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants