Skip to content

DataScalarColumn.values should be Array<number | null> #1322

Closed
@ikonst

Description

@ikonst

Describe the bug

v2.DataScalarColumn.items type should be values: Array<number | null> (currently: values?: Array<number>).

Example

I'm querying with datadog.v2.MetricsApi.queryScalarData with 2 queries (in body.data.attributs.queries):

  1. sum:my_metric{tag:a} by {group_tag}
  2. sum:my_metric{tag:b} by {group_tag}

then assigning the result into:

const [colGroup, colA, colB] = response.data!.attributes!.columns as [
  datadog.v2.GroupScalarColumn,
  datadog.v2.DataScalarColumn,
  datadog.v2.DataScalarColumn,
];

In some of the "rows" (for some group_tags), there's zero tag:as, which makes colA[i] === null but the type annotation does not document that.

Versions:

  • @datadog/datadog-api-client: 1.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions