Open NicoLaval opened 1 month ago
This issue is related to the membership operator (#). The reference manual explains the behaviour in the following part (p. 56):
The membership operator returns a Data Set having the same Identifier Components of ds and a single Measure. If comp is a Measure in ds, then comp is maintained in the result while all other Measures are dropped. If comp is an Identifier or an Attribute Component in ds, then all the existing Measures of ds are dropped in the result and a new Measure is added. A default conventional name is assigned to the new Measure depending on its type: for example num_var if the Measure is numeric, string_var if it is string and so on (the default name can be renamed through the rename operator if needed).
When ds1
is
id_1 | id_2 | val |
---|---|---|
IDENTIFIER | IDENTIFIER | MEASURE |
INTEGER | INTEGER | INTEGER |
1 | 2 | 3 |
4 | 5 | 6 |
The result of ds2 := ds1#id_2;
should be out of my point of view
id_1 | id_2 | num_var |
---|---|---|
IDENTIFIER | IDENTIFIER | MEASURE |
INTEGER | INTEGER | INTEGER |
1 | 2 | 2 |
4 | 5 | 5 |
Another example for this is the BdI testcase "general/membership_1".
In trevas currently the following error is raised:
@noahboerger you reported
when a dataset is project to a part of its key the operation fails in Trevas because of a duplicate key column
.Could you provide an example please?