[ 
https://issues.apache.org/jira/browse/HAWQ-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132231#comment-15132231
 ] 

ASF GitHub Bot commented on HAWQ-19:
------------------------------------

Github user 0x0FFF commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/323#issuecomment-179796519
  
    As of HAWQ inputformat, it never [supported "money" 
datatype](https://github.com/apache/incubator-hawq/blob/master/contrib/hawq-hadoop/hawq-mapreduce-common/src/main/java/com/pivotal/hawq/mapreduce/schema/HAWQPrimitiveField.java#L33):
    
    ```java
    /**
     * Enumeration of all supported primitive type.
     * Note that CHAR and BPCHAR are the same, we include BPCHAR for internal 
usage.
     */
    public static enum PrimitiveType {
        BOOL, BIT, VARBIT, BYTEA, INT2, INT4, INT8, FLOAT4, FLOAT8, NUMERIC,
        CHAR, BPCHAR, VARCHAR, TEXT, DATE, TIME, TIMETZ, TIMESTAMP, 
TIMESTAMPTZ, INTERVAL,
        POINT, LSEG, BOX, CIRCLE, PATH, POLYGON, MACADDR, INET, CIDR, XML
    }
    ```
    We can add it, but I think it should be a separate PR
    Also it would be nice to port other "cash" functions from postgres, 
allowing convertation of numeric, int and float to money


> Money type overflow
> -------------------
>
>                 Key: HAWQ-19
>                 URL: https://issues.apache.org/jira/browse/HAWQ-19
>             Project: Apache HAWQ
>          Issue Type: Bug
>          Components: Catalog
>            Reporter: Feng Tian
>            Assignee: Lei Chang
>             Fix For: backlog
>
>
> Use tpch schema, but change l_extendedprice to use MONEY type, run Q1, you 
> should see negative amounts.   
> I believe this is due to overflow.
> Side mark, postgres 9 money type use 8 bytes and will return correct result.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to