FiloDB icon indicating copy to clipboard operation
FiloDB copied to clipboard

fix(query) extend @modifier to longtime and multi-partition queries.

Open yu-shipit opened this issue 6 months ago • 0 comments

Pull Request checklist

  • [x] The commit(s) message(s) follows the contribution guidelines ?
  • [x] Tests for the changes have been added (for bug fixes / features) ?
  • [ ] Docs have been added / updated (for bug fixes / features) ?

Current behavior : @modidier does not work for multi-partition and longtime planner

New behavior : @modidier supports for multi-partition and longtime planner Consider a query like (foo @end()) unless last_over_time(foo[1h]) The previous plan would be like

-StitchExec
--Unless
---foo@end()  @P1-downsample. // do not have the data
---last_over_time(foo[1h])   @P1-downsample
--Unless
---foo@end()  @P1-raw
---last_over_time(foo[1h])    @P1-raw
--Unless
---foo@end()  @P2-raw

The new plan would be like

-Unless
--RepeatedTransformer
---foo@end()  @P2-raw
-StitchExec
---last_over_time(foo[1h])   @P1-downsample
---last_over_time(foo[1h])    @P1-raw
---last_over_time(foo[1h])    @P2-raw

Caveat! Window that spans multi-clusters may not work. For example, these may not work.

last_over_time(foo[7d])
(foo @end()) unless last_over_time(foo[7d])

BREAKING CHANGES

If this PR contains a breaking change, please describe the impact and migration path for existing applications. If not please remove this section.

Breaking changes may include:

  • Any schema changes to any Cassandra tables
  • The serialized format for Dataset and Column (see .toString methods)
  • Over the wire formats for Akka messages / case classes
  • Changes to the HTTP public API
  • Changes to query parsing / PromQL parsing

Other information:

yu-shipit avatar Aug 19 '24 20:08 yu-shipit