Github user jihoonson commented on the pull request:

    https://github.com/apache/tajo/pull/719#issuecomment-137692131
  
    The result of the following query is different from pgsql.
    
    #### Tajo
    ```
    postgres> select
    >     n_name,
    >     sum(l_extendedprice * (1 - l_discount)) as revenue
    > from
    >     customer,
    >     orders,
    >     lineitem,
    >     supplier,
    >     nation,
    >     region
    > where
    >     c_custkey = o_custkey
    >     and l_orderkey = o_orderkey
    >     and l_suppkey = s_suppkey
    >     and c_nationkey = s_nationkey
    >     and s_nationkey = n_nationkey
    >     and n_regionkey = r_regionkey
    >     and r_name = 'ASIA'
    >     and o_orderdate >= '1994-01-01'::date
    >     and o_orderdate < '1995-01-01'::timestamp
    > group by
    >     n_name
    > order by
    >     revenue desc;
    Progress: 100%, response time: 0.559 sec
    n_name,  revenue
    -------------------------------
    (0 rows, 0.559 sec, 0 B selected)
    ```
    
    #### PostgreSQL
    ```
    postgres=# select
    postgres-#     n_name,
    postgres-#     sum(l_extendedprice * (1 - l_discount)) as revenue
    postgres-# from
    postgres-#     customer,
    postgres-#     orders,
    postgres-#     lineitem,
    postgres-#     supplier,
    postgres-#     nation,
    postgres-#     region
    postgres-# where
    postgres-#     c_custkey = o_custkey
    postgres-#     and l_orderkey = o_orderkey
    postgres-#     and l_suppkey = s_suppkey
    postgres-#     and c_nationkey = s_nationkey
    postgres-#     and s_nationkey = n_nationkey
    postgres-#     and n_regionkey = r_regionkey
    postgres-#     and r_name = 'ASIA'
    postgres-#     and o_orderdate >= '1994-01-01'::date
    postgres-#     and o_orderdate < '1995-01-01'::timestamp
    postgres-# group by
    postgres-#     n_name
    postgres-# order by
    postgres-#     revenue desc;
      n_name   |     revenue      
    -----------+------------------
     INDONESIA |    55502041.1697
     VIETNAM   |    55295086.9967
     CHINA     |    53724494.2566
     INDIA     |    52035512.0002
     JAPAN     | 45410175.6954001
    (5 rows)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to