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

feat: treat all number types as field candidates #3670

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Apr 8, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Queries like count(count(metric)) would generate a result in non-float64 type. In strict Prometheus Compatible mode (via Prometheus HTTP API) this would turn into an error. This patch adds a cast logic to extend the possible field types.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 8, 2024
@waynexia waynexia enabled auto-merge April 8, 2024 12:41
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.85%. Comparing base (c93b76a) to head (1aacdd8).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3670      +/-   ##
==========================================
- Coverage   85.13%   84.85%   -0.29%     
==========================================
  Files         943      949       +6     
  Lines      157092   158558    +1466     
==========================================
+ Hits       133746   134542     +796     
- Misses      23346    24016     +670     

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 added this pull request to the merge queue Apr 9, 2024
Merged via the queue into GreptimeTeam:main with commit 50bea2f Apr 9, 2024
19 checks passed
@waynexia waynexia deleted the wild-field-type branch April 9, 2024 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants