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: add aggregateGroupByDuration API #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

taisuke-j
Copy link
Contributor

Summary

Following #157, I have made a similar addition for aggregateGroupByDuration.

Difference between Duration and Period classes in Java:

  • Duration: A fixed length of time (daylight savings effects are ignored)
  • Period: Date-based amount of time (days, weeks, months and years)

AGGREGATE SAMPLE GROUP DATA BY DURATION button: Added the "AGGREGATE SAMPLE GROUP DATA BY DURATION" button, as shown below, to test the aggregateGroupByDuration API.

image

Log after AGGREGATE SAMPLE GROUP DATA BY DURATION button is pressed

# timeRangeSlicer.duration: DAYS
# timeRangeSlicer.length: 2

Aggregated Group by Duration:  {
  "result": [
    {
      "endTime": "2024-10-06T15:00:00Z",
      "startTime": "2024-10-04T15:00:00Z",
      "zoneOffset": "+09:00",
      "result": {
        "dataOrigins": [],
        "COUNT_TOTAL": 3000
      }
    },
    {
      "endTime": "2024-10-08T15:00:00Z",
      "startTime": "2024-10-06T15:00:00Z",
      "zoneOffset": "+09:00",
      "result": {
        "dataOrigins": [],
        "COUNT_TOTAL": 7000
      }
    },
    {
      "endTime": "2024-10-10T15:00:00Z",
      "startTime": "2024-10-08T15:00:00Z",
      "zoneOffset": "+09:00",
      "result": {
        "dataOrigins": [],
        "COUNT_TOTAL": 11000
      }
    },
    {
      "endTime": "2024-10-12T14:57:39.714Z",
      "startTime": "2024-10-10T15:00:00Z",
      "zoneOffset": "+09:00",
      "result": {
        "dataOrigins": [],
        "COUNT_TOTAL": 7000
      }
    }
  ]
}

@taisuke-j
Copy link
Contributor Author

@matinzd This one is almost the same as #157.

@Gytjarek
Copy link

@matinzd Hey! Is there any chance you could merge this soon?

period: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
duration: number;
length: number;
Copy link
Owner

Choose a reason for hiding this comment

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

This will cause a breaking change. Can you update the related documentations as well as readme?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will handle it soon 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matinzd Documentation should be covered by this one: #172

as well as readme

You want a section for breaking changes on the main README?

Copy link
Owner

Choose a reason for hiding this comment

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

Hmm ...
I can arrange that. Let's merge this.

Copy link
Owner

@matinzd matinzd left a comment

Choose a reason for hiding this comment

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

All looks fine! I will do a manual testing soon and will merge it.
Can you update the related documentation pages accordingly and also update README about the breaking change?

@matinzd
Copy link
Owner

matinzd commented Oct 24, 2024

Thank you for your contribution 🌸

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