Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query returns wrong type #15818

Open
systay opened this issue Apr 30, 2024 · 0 comments
Open

Query returns wrong type #15818

systay opened this issue Apr 30, 2024 · 0 comments

Comments

@systay
Copy link
Collaborator

systay commented Apr 30, 2024

The TPC-H query #7 is returning a different type on Vitess than it does on MySQL.

Error from the vitess-tester run:

for column l_year field types do not match
Not equal: 
MySQL: INT32
Vitess: INT64

The query is:

select supp_nation,
       cust_nation,
       l_year,
       sum(volume) as revenue
from (select n1.n_name                          as supp_nation,
             n2.n_name                          as cust_nation,
             extract(year from l_shipdate)      as l_year,
             l_extendedprice * (1 - l_discount) as volume
      from supplier,
           lineitem,
           orders,
           customer,
           nation n1,
           nation n2
      where s_suppkey = l_suppkey
        and o_orderkey = l_orderkey
        and c_custkey = o_custkey
        and s_nationkey = n1.n_nationkey
        and c_nationkey = n2.n_nationkey
        and (
          (n1.n_name = 'JAPAN' and n2.n_name = 'INDIA')
              or (n1.n_name = 'INDIA' and n2.n_name = 'JAPAN')
          )
        and l_shipdate between '1995-01-01' and '1996-12-31') as shipping
group by supp_nation,
         cust_nation,
         l_year
order by supp_nation,
         cust_nation,
         l_year;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant