Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add sqlness tests for some promql function #1838

Merged
merged 8 commits into from
Jun 27, 2023

Conversation

waynexia
Copy link
Member

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Add sqlness tests for

  • stddev
  • stdvar
  • quantile_over_time

Other test are not ported due to

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

waynexia added 5 commits June 26, 2023 17:08
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
-- {test="two samples"} 0
-- {test="three samples"} 0
-- {test="uneven samples"} 0
-- tql eval (60, 60, '1s') quantile_over_time(0, data[1m]);
Copy link
Member Author

Choose a reason for hiding this comment

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

result set is unstable, waiting for CeresDB/sqlness#57

@@ -885,8 +886,8 @@ impl PromPlanner {
ScalarFunc::Udf(PredictLinear::scalar_udf(t_expr))
}
"holt_winters" => {
let sf_exp = match other_input_exprs.get(0) {
Some(DfExpr::Literal(ScalarValue::Float64(Some(sf)))) => *sf,
let sf_exp = match other_input_exprs.pop_front() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for improving it. Looks much better than .get(0) 👍

Copy link
Collaborator

@etolbakov etolbakov left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #1838 (9383168) into develop (313121f) will decrease coverage by 0.31%.
The diff coverage is 56.00%.

@@             Coverage Diff             @@
##           develop    #1838      +/-   ##
===========================================
- Coverage    86.53%   86.23%   -0.31%     
===========================================
  Files          588      588              
  Lines        95684    95724      +40     
===========================================
- Hits         82804    82550     -254     
- Misses       12880    13174     +294     

waynexia added 2 commits June 27, 2023 17:16
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia enabled auto-merge (squash) June 27, 2023 10:19
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Copy link
Contributor

@killme2008 killme2008 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 b737a24 into GreptimeTeam:develop Jun 27, 2023
@waynexia waynexia deleted the tql-sqlness branch June 27, 2023 11:05
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* correct range manipulate exec fmt text

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix partition requirement

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix udf signature

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* finilise

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* ignore unstable ordered result

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* add nan value test

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
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