malloy
malloy copied to clipboard
wrong sorting when nesting views
What happens?
I am nesting two views in query. Each of those views is sorted by date field and when run separately the sorting works fine. The problem is, when nested in a query the sorting is broken (it also happens when only 1 view is nested):
To Reproduce
view: base is { where: order_date >= @2024-07-31 and (product_id = 441 | 493) group_by: order_date flag is 1 aggregate: metric is total_quantity }
view: from_base1 is base -> { group_by: order_date aggregate: total is metric.sum() order_by: order_date asc }
view: from_base2 is base -> { group_by: order_date aggregate: flag.sum() order_by: order_date asc }
view: nested is { where: order_date >= @2024-07-31 and (product_id = 441 | 493) group_by: product_id aggregate: total_quantity nest: from_base1, from_base2 }
OS:
Windows 10
Malloy Client:
VSCode
Malloy Client Version:
v0.3.1727197487 (pre-release)
Database Connection:
DuckDB