Skip to content

Conversation

@parmesant
Copy link
Contributor

@parmesant parmesant commented Jan 10, 2025

new API to get the count(*) for the graph query
API - POST /datebin
sample request JSON -
{"stream":"frontend", "startTime":"2025-01-08T10:10:00.000Z","endTime":"2026-01-08T23:20:00.000Z", "numBins":10}
sample response JSON -

{
    "fields": [
        "date_bin_timestamp",
        "log_count"
    ],
    "records": [
        {
            "date_bin_timestamp": "2025-01-08T10:10:00+00:00",
            "log_count": 1250
        }
    ]
}

console sends the number of ticks to show in the graph based on the time range provided by the user
server fetches the stream.json and all manifest.jsons to get the count
avoid datafusion as query demands the count which is available in the catalog

leverage the same flow to get the count(*) queries without filters from query API
eg. select count(*) from frontend or select count(*) as count from frontend

@nikhilsinhaparseable nikhilsinhaparseable changed the title init commit for date_bin query improvement feat: API for date_bin query Jan 14, 2025
@nikhilsinhaparseable nikhilsinhaparseable marked this pull request as ready for review January 14, 2025 12:10
@coveralls
Copy link

coveralls commented Jan 14, 2025

Pull Request Test Coverage Report for Build 12794756596

Details

  • 0 of 215 (0.0%) changed or added relevant lines in 7 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.1%) to 12.775%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/handlers/http/modal/query_server.rs 0 1 0.0%
src/query/stream_schema_provider.rs 0 1 0.0%
src/response.rs 0 2 0.0%
src/cli.rs 0 4 0.0%
src/handlers/http/modal/server.rs 0 5 0.0%
src/handlers/http/query.rs 0 39 0.0%
src/query/mod.rs 0 163 0.0%
Files with Coverage Reduction New Missed Lines %
src/query/mod.rs 1 25.54%
src/handlers/http/query.rs 2 0.0%
Totals Coverage Status
Change from base Build 12787611061: -0.1%
Covered Lines: 2459
Relevant Lines: 19248

💛 - Coveralls

@de-sh
Copy link
Contributor

de-sh commented Jan 15, 2025

Let's work on this after merging #1100?

Copy link
Contributor

@de-sh de-sh left a comment

Choose a reason for hiding this comment

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

Please consider: parmesant#2

@nitisht nitisht merged commit 35efb17 into parseablehq:main Jan 16, 2025
6 checks passed
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.

5 participants