Open vcgalpin opened 2 years ago
This isn't tremendously surprising, since orderby is supported only by the flat query policy.
Since temporal queries are using "query nested" only to benefit from record flattening (i.e. nested records) at the moment, a shorter-term workaround would be to augment flat queries with support for record flattening too (this transformation is straightforward and ought to be easy to adapt to deduplication queries too).
I'm not sure what the semantics would be given the temporal data dimension. I think that really we should only allow orderby
on timeslices of temporal tables, i.e.,
query nested { for (x <- vtCurrent(employees)) orderby (x.salary) [x] };
Regardless, this should be caught by a type error rather than a runtime error.
Using the valid-time database from
tests/shredding/validtime.links
, the following error occurs when using the temporal data projection function to select a field for sorting:This also happens with either of the time projection functions: