Skip to content

Implement nullability over scalars #288

@javihern98

Description

@javihern98

Summary

Currently, the datastructures of some components may differ between semantic execution and full execution.

This is due to how nullability is calculated in operations such as dataset[calc measure := scalar | constant]. This is because of how nullability is calculated in some RoleSetter operators. For example, in the Mesure operator, among the various checks, it is verified that the value of scalar | constant is not None.

if cls.role == Role.IDENTIFIER or operand.value is not None:
     nullable = False

However, in the validate checks, it is always set to None, and in the evaluate checks, a different value can be assigned to the Scalar, causing the nullability to differ between executions.

A nullability must be implemented internally in the Scalars model so that the structure and nullability are carried over correctly.

The nullability of a Scalar input will be taken as True by default, and that of Constants as False (except for explicitly Null Constants).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions