◆ Operation()
template<class INPUT_TYPE, class RESULT_TYPE>
| RESULT_TYPE duckdb::DecimalScaleDownOperator::Operation |
( |
INPUT_TYPE | input, |
|
|
ValidityMask & | mask, |
|
|
idx_t | idx, |
|
|
void * | dataptr ) |
|
inlinestatic |
213420 {
213421
213422 auto data = (DecimalScaleInput<INPUT_TYPE> *)dataptr;
213423
213424 const auto scaling = data->factor / 2;
213425 input /= scaling;
213426 if (input < 0) {
213427 input -= 1;
213428 } else {
213429 input += 1;
213430 }
213431 return Cast::Operation<INPUT_TYPE, RESULT_TYPE>(input / 2);
213432 }
The documentation for this struct was generated from the following file: