Skip to content

Conversation

@Taylor-lagrange
Copy link

@Taylor-lagrange Taylor-lagrange commented Nov 29, 2023

Interval Support

The Interval expr can follow after RANGE and ALIGN keyword. Must use parentheses in interval, otherwise it will cause syntax conflicts

Case like:

SELECT 
    rate(a) RANGE (INTERVAL '1 year 2 hours 3 minutes') 
FROM 
    t 
    ALIGN (INTERVAL '1 year 2 hours 3 minutes')
FILL NULL;

ALIGN TO support

Support ALIGN TO sub clause, user cam use ALIGN TO to align to the time they want

SELECT rate(a) RANGE '6m' FROM t ALIGN '1h' TO '2021-07-01 00:00:00' by (a, b) FILL NULL;

Rewrite format

Rewrite format now be change to range_fn(func, range, fill, byc, [byv], align, to)

@coveralls
Copy link

coveralls commented Nov 29, 2023

Pull Request Test Coverage Report for Build 7029778735

  • 30 of 33 (90.91%) changed or added relevant lines in 3 files are covered.
  • 74 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 83.208%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/mod.rs 27 30 90.0%
Files with Coverage Reduction New Missed Lines %
src/lib.rs 4 11.15%
src/tokenizer.rs 10 86.43%
src/parser/mod.rs 60 80.17%
Totals Coverage Status
Change from base Build 6765669304: -0.02%
Covered Lines: 16610
Relevant Lines: 19962

💛 - Coveralls

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@waynexia waynexia merged commit 6a93567 into GreptimeTeam:v0.38.x Nov 29, 2023
@Taylor-lagrange Taylor-lagrange deleted the feat-range-align branch November 29, 2023 08: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.

3 participants