hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Mujumdar (JIRA)" <>
Subject [jira] [Updated] (HIVE-2693) Add DECIMAL data type
Date Thu, 15 Nov 2012 22:39:13 GMT


Prasad Mujumdar updated HIVE-2693:

    Attachment: HIVE-2693-10.patch

Here's the updated patch with test updates, additional patches for failed tests and JDBC support
There were a few tests still failing, like clientnegative/invalid_cast_from_binary_[1-6] which
required out file updates.
The patch 7&8 removed decimal round function which breaks things like round(int/int) and
also round(decimal), so its added back. Also added JDBC support for handling decimal type
data and metadata which was missing in Josh's original patch. I will log a separate ticket
for HiveServer2 driver once both the patches are committed.

I think the outstanding issue is the implicit type conversion for UDFs. Firstly this changes
expressions like (int/int) from double to decimal. This could be a problem of existing clients
like ODBC, perl and python which expect this to be a double. Besides this leads to inconsistent
behavior on division by 0, for example 1.1/0.0 stays NaN but 1/0 throws exception since it
gets promoted by division of decimal which behaves differently from double. The BigDecimal
throws an exception in case of division by 0. I added a couple of patches and modified the
udf_round_2 test so that it returns NULL (which is also MySQL default behavior). Perhaps we
should change the other cases also to from NaN to NULL and support a configuration option
to fall back to old behavior (which can be done in a separate patch).

@Vikram, we can collaborate on this. You can  add your new changes on top of it and update
on reviewboard.

> Add DECIMAL data type
> ---------------------
>                 Key: HIVE-2693
>                 URL:
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Processor, Types
>    Affects Versions: 0.10.0
>            Reporter: Carl Steinbach
>            Assignee: Prasad Mujumdar
>         Attachments: 2693_7.patch, 2693_8.patch, 2693_fix_all_tests1.patch, HIVE-2693-10.patch,
HIVE-2693-1.patch.txt, HIVE-2693-all.patch, HIVE-2693-fix.patch, HIVE-2693.patch, HIVE-2693-take3.patch,
> Add support for the DECIMAL data type. HIVE-2272 (TIMESTAMP) provides a nice template
for how to do this.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message