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

Error in TPCH-Q1 #3

Open
rgankema opened this issue Nov 30, 2017 · 0 comments
Open

Error in TPCH-Q1 #3

rgankema opened this issue Nov 30, 2017 · 0 comments

Comments

@rgankema
Copy link

I was looking at the benchmark queries to get an idea of what more complex Weld queries look like, and I think I stumbled across a bug in the following part of the query:

merge(b, { 
    i64(e.$0*2c + e.$1),
    {
        e.$2,
        e.$3,
        sum_disc_price,
        sum_disc_price * (1.0f + e.$6),
        e.$4,
        1
    }
})

Here values are grouped by returnflag * 2 + linestatus. However, as the value for returnflag ranges from 0 to 1 (inclusive), and that for linestatus from 0 to 2 (inclusive), this means that any value with (returnflag=0, linestatus=2) will be mapped to the same group values with (returnflag=1, linestatus=0), as both will be mapped to index 2 == (0*2+2) == (1*2+0).

Changing the mapping to i64(e.$0*3c + e.$1) should solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant