-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding decimal support for min() and max() functions (#9005)
Summary: Delivers #9004 This PR is for adding decimal support for min() and max() functions. presto-cli output: ``` presto:tpch> SELECT MIN(Col,2) FROM (VALUES cast(0.82 as decimal(5,4)), cast(2.333 as decimal(5,4)), cast(3.132 as decimal(5,4)), cast(4.344 as decimal(5,4))) AS X(Col); _col0 ------------------ [0.8200, 2.3330] (1 row) presto:tpch> SELECT MIN(Col,3) FROM (VALUES cast(0.82 as decimal(5,4)), cast(2.333 as decimal(5,4)), cast(3.132 as decimal(5,4)), cast(4.344 as decimal(5,4))) AS X(Col); _col0 -------------------------- [0.8200, 2.3330, 3.1320] (1 row) presto:tpch> SELECT MAX(Col,2) FROM (VALUES cast(0.82 as decimal(5,4)), cast(2.333 as decimal(5,4)), cast(3.132 as decimal(5,4)), cast(4.344 as decimal(5,4))) AS X(Col); _col0 ------------------ [4.3440, 3.1320] (1 row) presto:tpch> SELECT MAX(Col,3) FROM (VALUES cast(0.82 as decimal(5,4)), cast(2.333 as decimal(5,4)), cast(3.132 as decimal(5,4)), cast(4.344 as decimal(5,4))) AS X(Col); _col0 -------------------------- [4.3440, 3.1320, 2.3330] (1 row) ``` Pull Request resolved: #9005 Reviewed By: pedroerp Differential Revision: D56487562 Pulled By: Yuhta fbshipit-source-id: 283eb189a91840835784e565cd33fa713167d17d
- Loading branch information
1 parent
a689fd4
commit d97ddb4
Showing
2 changed files
with
253 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters