-
Notifications
You must be signed in to change notification settings - Fork 228
The count
function needs s"*"
for the argument in current dev version
#2717
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
Comments
count
function needs s"*"
for the argumentcount
function needs s"*"
for the argument in current dev version
While working on the compiler, I had to change the rule which triggers the
For the sake of language design this should not matter, but it lead me to the following question: How does the This was my justification for making them have a parameter. This is obviously a bit inconvenient, so how could we design the language to work around this? To have the arguments as they were before, but don't use the "pull from the relation" bullshit justification? I've hoped to find a quick fix, but then I found the similar issue of #2723 and wanted to clear that first, so the two do not get mixed up. |
Yes, I think we can think about it as one of:
Is this a big problem, though? Is your point that it introduces a completely new type for just a couple of functions? For the types, I was thinking the type is |
You mean like this? from a = albums
aggregate {count a} The problem is that this does not make any sense: let x = row_number ... while this is completely fine: let x = sum [1, 2, -6, 45] So my question is: how do we want to describe the difference between these two functions? My solution was to say "there is no difference, rank requires a column too". let x = row_number [1, -2, 5]
assert x == [1, 2, 3] |
Yes!
My mental model is that they have the relation as a parameter:
...so indeed Does that make sense? |
Makes sense, I fully agree. Now, we just need a way to reference current relation in all contexts (without using |
Since this is seemingly related to the larger issue #2723, can we mark it as a known issue to Changelog, etc. and remove it from the 0.9 milestone and do a 0.9 release? I believe that the syntax changes between the last release and the development version are currently causing confusion for new users, so I wonder if it might be worthwhile to expedite the 0.9 release, even if there are some flaws. (Of course, if we could solve these issues right away, that would be great.) |
What happened?
From #2710 (comment), related to #2713
We are currently using workarounds in the following following locations:
prql/README.md
Line 34 in 69571f1
prql/web/website/content/_index.md
Line 26 in 69571f1
prql/prql-compiler/examples/compile-files/queries/variables.prql
Line 16 in 69571f1
PRQL input
SQL output
Expected SQL output
MVCE confirmation
Anything else?
No response
The text was updated successfully, but these errors were encountered: