Skip to content

Document that BETWEEN only takes timestamps and integers - #642

Merged
javier merged 1 commit into
mainfrom
jv/between-timestamp-only
Nov 13, 2026
Merged

javier merged 1 commit into
mainfrom
jv/between-timestamp-only

Conversation

@javier

@javier javier commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

The BETWEEN sections show only timestamp examples and never say the operator is limited to them, so price BETWEEN 10 AND 100 on a DOUBLE column looks valid but fails with there is no matching operator `between` with the argument type: DOUBLE.

What the server does

The only implementation is BetweenTimestampFunctionFactory, with signature between(NNN). Integer columns convert to timestamps implicitly, so they work; other types don't. Checked on QuestDB 10.2.0:

Column type BETWEEN 2 AND 5
INT, LONG, TIMESTAMP, TIMESTAMP_NS ✅
DOUBLE, FLOAT ❌ no matching operator `between` with the argument type: DOUBLE
DECIMAL ❌ same, DECIMAL(10,2)
VARCHAR ❌ same, VARCHAR

Changes

  • query/sql/where.md: after the timestamp examples, a note that BETWEEN is a timestamp operator that also accepts integer columns, plus a numeric range example using >= and <=.
  • query/operators/date-time.md: the same rule in one sentence in the BETWEEN ... AND intro.

@github-actions

Copy link
Copy Markdown

🚀 Build success!

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

Commit SHA: eb1ad88

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

@javier
javier merged commit d2f9c4d into main Nov 13, 2026
3 checks passed
@javier
javier deleted the jv/between-timestamp-only branch November 13, 2026 16:25
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