Closed lloydtabb closed 2 years ago
OK, what things are legal in project ...
1) project: [ exisitingFieldName, newName is Expression ]
Anything else which is legal. or which should be illegal?
Removed "do not allow any measures in project" and now
query: a -> { aggregate: f is count() } -> { project: f2 is f + 1 }
compiles without error
exploreName->{
project: [
measureName, // pretty sure this is legal
newM is measureName * 2, // lloyd seems to indicate this is also legal
avgM is ANY_AGGREGATE_FUNCT(), // this is non-sensical and illegal, right?
]
Not entirely sure how I make "avgM" error, that might be some work.
Your example says 'measureName', but I think you mean 'dimensionName'. Right?
In your example
query: a -> { aggregate: f is count() } -> { project: f2 is f + 1 }
f is the output name of a measure calculation in the first segment f is a dimension in the second segment (as is f2)
I'm curious how come you think f is a measure in the second segment. If you are asking malloy_query
for the output structure, it will tell you it is a dimension...
ok, project: []
lists need to be like group_by -- scalars and scalar defs only
I believe this is now (ea8d294c5b7759693293a93d63674e78adcc4528) as fixed as it is going to be. project:
is a little bit picky about what goes in there, but it could be more picky and when that comes up, we'll file a new bug
This fails to compile. Changing
project
togroup_by
works.This also fails. Might be the same thing. Changing 'project' to 'group_by' allows these to compile.