Skip to content

Commit

Permalink
Merge pull request #1746 from reebhub/RDoc-2570_StatefulTimestampValue
Browse files Browse the repository at this point in the history
Clarify that an incremental time series' Get results include unique values
  • Loading branch information
ppekrol authored Feb 6, 2024
2 parents aff274a + e1b7f0c commit c9bf214
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ In LINQ, aggregations are performed using the `GroupBy()` method. It takes
the time period over which to aggregate, either in the form of a `string`, or
as an `Action<ITimePeriodBuilder>`.

{CODE GroupBy@DocumentExtensions\TimeSeries\Querying\AggregationAndProjections.cs /}
{CODE GroupBy_Switch@DocumentExtensions\TimeSeries\Querying\AggregationAndProjections.cs /}

The `ITimePeriodBuilder` class just contains one property for each of the time
period units from milliseconds to years.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ public class TimeSeriesRangeResult
public DateTime From, To;
public TimeSeriesEntry[] Entries;

// The actual number of values
// The number of unique values
public long? TotalResults;

{CODE-BLOCK/}
{CODE-BLOCK:csharp}
{CODE-BLOCK/}

{CODE-BLOCK:csharp}
public class TimeSeriesEntry
{
public DateTime Timestamp { get; set; }
Expand All @@ -62,16 +63,17 @@ public class TimeSeriesEntry

// The nodes distribution per each entry
public Dictionary<string, double[]> NodeValues { get; set; }
{CODE-BLOCK/}

{NOTE: }

* Requesting a time series that doesn't exist will return `null`.
* Requesting an entries range that doesn't exist will return a `TimeSeriesRangeResult` object
with an empty `Entries` property.

{NOTE/}

{CODE-BLOCK/}

* `TimeSeriesRangeResult.TotalResults` will contain the number of **unique** values.
If the time series contains entries with multiple values (remember
that since this is an incremental time series this means duplications
of the same number at the same timestamp) all values will be aggregated
in `TotalResults` to a single unique value.
* Requesting a time series that doesn't exist will return `null`.
* Requesting an entries range that doesn't exist will return a `TimeSeriesRangeResult` object
with an empty `Entries` property.

* **Exceptions**
Exceptions are not generated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ public class TimeSeriesRangeResult
public DateTime From, To;
public TimeSeriesEntry[] Entries;

// The actual number of values
// The number of unique values
public long? TotalResults;

{CODE-BLOCK/}
{CODE-BLOCK:csharp}
{CODE-BLOCK/}

{CODE-BLOCK:csharp}
public class TimeSeriesEntry
{
public DateTime Timestamp { get; set; }
Expand All @@ -62,15 +63,16 @@ public class TimeSeriesEntry

// The nodes distribution per each entry
public Dictionary<string, double[]> NodeValues { get; set; }
{CODE-BLOCK/}

{NOTE: }

* Requesting a time series that doesn't exist will return `null`.
* Requesting an entries range that doesn't exist will return a `TimeSeriesRangeResult` object
with an empty `Entries` property.

{NOTE/}
{CODE-BLOCK/}

* `TimeSeriesRangeResult.TotalResults` will contain the number of **unique** values.
If the time series contains entries with multiple values (remember
that since this is an incremental time series this means duplications
of the same number at the same timestamp) all values will be aggregated
in `TotalResults` to a single unique value.
* Requesting a time series that doesn't exist will return `null`.
* Requesting an entries range that doesn't exist will return a `TimeSeriesRangeResult` object
with an empty `Entries` property.

* **Exceptions**
Exceptions are not generated.
Expand Down

0 comments on commit c9bf214

Please sign in to comment.