Skip to content

Make start() / end() callable as boundary functions (reserved-keyword lexer/grammar work) #4

Description

@zzylol

Summary

Bare start() / end() parse-fail (start()invalid promql query), while foo @ start() works. Prometheus exposes start() / end() as functions returning the query range boundaries as scalars.

Current state (verified)

Already documented as deferred in the asap commit c51beaf that added the other experimental functions:

start()/end() are NOT added: start/end are reserved lexer keywords for the @ modifier, so a table entry can't make them callable (needs lexer/grammar work, deferred).

src/parser/function.rs on asap has 0 entries for start / end; GreptimeTeam upstream functions.rs likewise.

Work

  • Let the lexer / grammar treat start / end as callable in function-call position while keeping them valid as @ modifiers (the reserved-keyword collision the commit note describes).
  • Function-table entries returning a scalar.

Corpus impact

6 rejections. Small, but distinct lexer/grammar work — not a table-only addition.

Constraint

All changes on the asap branch; no upstream operations.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions