Skip to content

docs(sql): cover SAMPLE BY FILL fast-path syntax and limitations#426

Draft
jovfer wants to merge 1 commit intomainfrom
sm_fill_prev_fast_path
Draft

docs(sql): cover SAMPLE BY FILL fast-path syntax and limitations#426
jovfer wants to merge 1 commit intomainfrom
sm_fill_prev_fast_path

Conversation

@jovfer
Copy link
Copy Markdown
Contributor

@jovfer jovfer commented May 1, 2026

Summary

Refresh the SAMPLE BY FILL documentation to reflect what the fast-path implementation in questdb/questdb#6946 now accepts.

  • query/sql/sample-by.md
    • Add PREV(col) to the FILL options table and list its constraints (type match, no broadcast, no SYMBOL).
    • Replace the outdated "fill strategies cannot be combined" rule with the actual FILL(NONE) rule.
    • Rewrite FROM-TO Limitations: drop "not compatible with FILL(PREV)" and "does not consider OFFSET"; document that keyed FROM-TO works when bounds are constants and is rejected for bind variables, function calls, or arithmetic expressions.
  • cookbook/sql/time-series/fill-keyed-arbitrary-interval.md
    • Scope the recipe to the bind-variable / function-bound case, since constant-bound keyed FROM-TO is now supported natively.
  • cookbook/sql/time-series/fill-from-one-column.md
    • Replace the "imagine this SQL was valid" framing with the actual FILL(PREV(col)) syntax. Keep the window-function rewrite as the flexible alternative (e.g. flagging filled rows).

Test plan

  • Read the rendered pages locally and confirm the new restrictions and examples line up with the behaviour exercised by the FILL test suite.
  • Spot-check the linked anchors (#from-to, #fill-options) still resolve.

Update the SAMPLE BY reference and the related cookbook recipes to
match what the FILL fast path now accepts:

- sample-by.md: list PREV(col) in the FILL options table, replace the
  outdated "fill strategies cannot be combined" rule with the actual
  PREV(col) and FILL(NONE) constraints, and rewrite the FROM-TO
  Limitations to drop "not compatible with FILL(PREV)" and "does not
  consider OFFSET". Note that keyed FROM-TO is supported when FROM/TO
  are constants and is rejected for bind-variable / function /
  arithmetic bounds.
- fill-keyed-arbitrary-interval.md: scope the recipe to the
  bind-variable / function-bound case, since constant-bound keyed
  FROM-TO works natively.
- fill-from-one-column.md: replace the "imagine this SQL was valid"
  framing with the actual FILL(PREV(col)) syntax and keep the window-
  function rewrite as the more flexible alternative for cases such as
  flagging filled rows.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🚀 Build success!

Latest successful preview: https://preview-426--questdb-documentation.netlify.app/docs/

Commit SHA: e225e23

📦 Build generates a preview & updates link on each commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant