teragrep / pth_10

Data Processing Language (DPL) translator for Apache Spark
GNU Affero General Public License v3.0
0 stars 2 forks source link

Using timechart span with months results in 30 day windows #260

Open 51-code opened 3 months ago

51-code commented 3 months ago

Describe the bug

timechart span=1month count is implemented so that it operates on 30 day windows, not on the actual months. Same applies for any number of months (e.g. 2month = 60day).

Expected behavior

For months, the span should operate on the actual months. For a single month span (span=1month) the time value in a row should be the month (and the year) as a number. If the span is for multiple months, the time value should be the starting month of a given window.

The most recent data might not fit to the number of months provided, so the last window can have less months.

How to reproduce

Run the query above.

Screenshots

Software version

pth_10 version: 5.3.0-4-g618d4a95 pth_03 version: 5.11.0

Desktop (please complete the following information if relevant):

Additional context

If Spark doesn't support this, a custom aggregator is needed.