Skip to content

OPL / query-engine virtual values column for NumberDataPoint #4521

Open

Description

@albertlockett

OTel's NumberDataPoint type have a value field which is a oneof of ether f64 or i64 type.

https://github.com/open-telemetry/opentelemetry-proto/blob/6c9dd787c3c5a5dae7d18ece0927581d5687f9c0/opentelemetry/proto/metrics/v1/metrics.proto#L410-L415

However in OTAP, this is represented by two arrays, one called value_double and the other value_in t and the convention is that if value_double is null for some row then it must be an int value.

| int_value | Int64 | - | No | - | - | Integer value |
| double_value | Float64 | - | No | - | - | Double value |

In #4500 we added the capability to assign the value of these fields, but it's a bit awkward for users who want to assign the integer value because they need to do:

set int_value = 5, double_value = null

It would be nice if we provided a virtual value column on this type that could, based on the result of the expression, determine which column is supposed to be assigned (and assign the other column to null, e.g. dropping it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions