Karteek

Results 16 issues of Karteek

VectorFunction registration provides means to specify a Decimal Type signature. Example: the DecimalArithemtic::Add has ``` exec::FunctionSignatureBuilder() .returnType("DECIMAL(r_precision, r_scale)") .argumentType("DECIMAL(a_precision, a_scale)") .argumentType("DECIMAL(b_precision, b_scale)") .variableConstraint( "r_precision", "min(38, max(a_precision - a_scale, b_precision -...

CLA Signed

The Between functionality for DECIMALS is implemented using the Generic type support in VELOX. The current implementation expects the user to CAST all params to BETWEEN function to the same...

CLA Signed

In order to support parsing decimal literals, VELOX must be able to convert decimal values into string format. This PR implements utility functions DecimalCasts::ShortDecimalToString and DecimalCasts::LongDecimalToString. Test: Added unit tests...

CLA Signed
stale

Add support for parsing decimal literals like: ``` presto> select decimal'1.2'; _col0 ------- 1.2 (1 row) presto> select * from (values decimal '1234567890001234.56789', decimal '2234567890001234.12345'); _col0 ------------------------ 1234567890001234.56789 2234567890001234.12345 ```

CLA Signed
stale

Test plan - Run and compare SQL queries with Decimal Arithmetic operations on PrestoDB and PrestoCPP.

This technique is similar to JAVA approach here:https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/operator/aggregation/DecimalAverageAggregation.java#L222. The accumulator is of the form: ``` struct DecimalAccumulator { int128_t sum; int64_t count; int64_t overflow; }; ``` We track overflow and...

CLA Signed