malloy
malloy copied to clipboard
Invalid WHERE clause when nesting inside a filtered source
That's my takeaway, anyway - the following
source: state_facts is table('state_facts.parquet') {
where: state !~ r'MN'
query: most_popular is {
project: popular_name
}
query: popular_dashboard is {
nest:
most_popular
}
}
Produces:
Parser Error: syntax error at or near ")"
LINE 10: AND ((group_set NOT IN () OR (group_set IN () AND COALESCE(NOT(REGEXP_MATCHES(state_facts."state", 'MN')),FALSE))))
GROUP BY 1
)
SELECT
MAX(CASE WHEN group_set=0 THEN most_popular__0 END) as "most_popular"
FROM __stage0
...
^
Also ran into the same issue where group_set filters are empty:
group_set NOT IN() OR (group_set IN () AND ...
seems to work if I modify my filter to include those
group_set NOT IN(1) OR (group_set IN (0) AND...