Skip to content

Confusing error when an incorrect sample by time unit is specified #5602

@kafka1991

Description

@kafka1991

To reproduce

admin=> select timestamp,symbol, avg(price)  from trades sample by 1min;
ERROR:  Invalid unit: n

'1min' should be '1m' here

log

2025-04-17T10:05:38.142517Z E i.q.g.e.QueryProgress err [id=-1, sql=`select timestamp,symbol, avg(price)  from trades sample by 1min;`, principal=admin, cache=false, jit=true, time=1749000, msg=Invalid unit: n, errno=0, pos=-1]
2025-04-17T10:05:38.143018Z E i.q.c.p.m.PGConnectionContextModern failed to parse message [err: ``]

QuestDB version:

master

OS, in case of Docker specify Docker and the Host OS:

macos

File System, in case of Docker specify Host File System:

Apfs

Full Name:

Victor

Affiliation:

Victor

Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?

  • Yes, I have

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIncorrect or unexpected behaviorGood first issueA great place to get familiar with the codebaseSQLIssues or changes relating to SQL execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions