← unary_plus operator page · numeric/unary_plus/ds/manual_ex_1
pandas ✅ · DuckDB ✅
+ on a dataset with a Number measure and an Integer measure.
Unary plus, Example 1, output verbatim: "The operator + returns the operand unchanged."
both measures come back unchanged and keep their types: Me_1 (Number) 1.0, 2.3 and 3.2, Me_2 (Integer) 5, 10 and 12.
DS_r := + DS_1;
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 1.0 | 5 |
| 10 | B | 2.3 | 10 |
| 11 | A | 3.2 | 12 |
{
"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},
{"name": "Me_2", "type": "Integer", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 1.0 | 5 |
| 10 | B | 2.3 | 10 |
| 11 | A | 3.2 | 12 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "Me_1", "type": "Number", "role": "Measure"},
{"name": "Me_2", "type": "Integer", "role": "Measure"}
]
}
]
}