[
https://issues.apache.org/jira/browse/HIVE-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535407#comment-13535407
]
Mark Grover commented on HIVE-2693:
-----------------------------------
1. Yeah, let's take the +/- 2 out please.
2. I am not aware of any such unit tests at the top of my head. I can try to
poke around the code and see if I find something, will post if I find
something. It probably wouldn't be until tomorrow.
I didn't realize that about the sign bit. Yeah, (-1,0,1) is good then.
Non-deterministic order: You are right they that are equal (and they should
be). However, if you diff patch12 patch13, you will find the order in which
order by displayed 1.0 and 1 got switched. The only thing that changed was me
adding some data. All I would expect is for the order to remain consistent and
deterministic which doesn't seem to be the case presently.
One thing that did stand out was in serialize()
{code}
BigDecimal dec = boi.getPrimitiveJavaObject(o).stripTrailingZeros();
{code}
stripTrailingZeros() seems interesting. I am just handwaving right now, need to
look more before I can assert further but could this be a part of the problem?
Yeah, where clause is not working. The tests didn't give the expected output.
Consequently, I tested using the Hive CLI (which I built after applying the
patch) and it doesn't work on that either. You're welcome to take a look, I
will try to find some time tonight or tomorrow morning to look into this as
well.
These two problems might be related but look at this:
{code}
hive> select cast(3.14 as decimal) from decimal_3 limit 1;
3.140000000000000124344978758017532527446746826171875
{code}
That doesn't look right to me:-)
> Add DECIMAL data type
> ---------------------
>
> Key: HIVE-2693
> URL: https://issues.apache.org/jira/browse/HIVE-2693
> 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-11.patch, HIVE-2693-12-SortableSerDe.patch,
> HIVE-2693-13.patch, HIVE-2693-1.patch.txt, HIVE-2693-all.patch,
> HIVE-2693-fix.patch, HIVE-2693.patch, HIVE-2693-take3.patch,
> HIVE-2693-take4.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: http://www.atlassian.com/software/jira