sdmx-twg / vtl

This repository is used for maintaining the SDMX-VTL specification
11 stars 7 forks source link

General behaviour of ML Operators #355

Closed capacma closed 1 year ago

capacma commented 7 years ago

Issue Description

Harmonise the behaviour of ML Operators

Proposed Solution

See attached document by Vincenzo VTL-ML operators behaviour_2017.05.04.xlsx

capacma commented 7 years ago

OK to delete the operator "as" (alias). However I propose to introduce a similar functionality as part the membership operator: ds1#cmp { as newname } for example: ds1#ref_area as country this is a shortcut equivalent to: ds1#ref_area [rename ref_area to country ]

capacma commented 7 years ago

I propose that the Boolean operators (= <> > < >= <= and or xor not between) eliminate the attributes (no attribute propagation). It would be very strange to define Boolean operators that eliminate the measures of the operands but maintain the attributes (e.g. ds1 > ds2 eliminates the measures of ds1 and ds2 and propagate the attributes of ds1 and ds2). In addition, implementing the propagation of the attributes can be costly. In general there is no interest to propagate the values of the attributes for a Boolean operator: the purpose of those operators is to manage Boolean conditions for filtering the data.

capacma commented 7 years ago

At the meeting in Rome we decided that an operator can be applied only when all the measures of the operands have the type expected by the operator (e.g. ds1 + ds2 is illegal if both ds1 and ds2 have a measure of type string, in addition to other measures of numeric type). If we confirm this decision then in the "input ME matching constraint" we must specify this constraint, e.g. for the addition operator the constraint is "ds1 and ds2 have the same measures and the type of all measures is numeric"

capacma commented 7 years ago

The operator mod has 2 operand datasets (like multiplication and division)

capacma commented 7 years ago

It has been proposed to remove nroot as it is not a SQL standard function

capacma commented 7 years ago

Attached, the standard phrases to describe the behaviour of the ML Operators. VTL-ML.operators.behaviour_2017.05.04 with text.xlsx Last version: VTL-ML.operators.behaviour_2017.05.12 with text.xlsx Latest version (Monday 15 May): VTL-ML.operators.behaviour_2017.05.15 with text.xlsx

vignola commented 7 years ago

I dont see the difference between the operator "alias" and the new operator proposed by Maurizio. The alias operator is applied to a component so can be applied only with the membership operator. Indeed in the example is exactly used as the new functionality proposed by Maurizio.

vignola commented 7 years ago

Hi all, few comments on the document VTL-ML.operators.behaviour_2017.05.15 with text.xlsx comments on behaviour.docx

capacma commented 7 years ago

A few comments Comments to the Excel file operators behaviour.docx

capacma commented 7 years ago

Comments on the syntax or behaviour of some operators. To be used as input for the next teleconference.

Comments operators Thursday 13 July MC.docx

linardian commented 1 year ago

Refers to old version of documentation