Skip to content

Accept Scalars casting inside Sub operator #539

@mla2001

Description

@mla2001

Summary

Adapt the VTL G4 grammar to accept Scalars casting as the right operand of the Sub operator.

Scope

Grammar change

Testing

    script = """
        sc_1 := 1;
        DS_r <- DS_1[sub Id_2 = cast(sc_1, string)];
    """

    data_structures = {
        "datasets": [
            {
                "name": "DS_1",
                "DataStructure": [
                    {"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": False},
                    {"name": "Id_2", "type": "String", "role": "Identifier", "nullable": False},
                    {"name": "Me_1", "type": "Number", "role": "Measure", "nullable": True},
                ],
            }
        ]
    }

    run_result = run(script=script, data_structures=data_structures, datapoints=[])

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions