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

Fix PostgreSQL data provider issues #1491

Open
gcca opened this issue Apr 21, 2021 · 0 comments · May be fixed by #1492
Open

Fix PostgreSQL data provider issues #1491

gcca opened this issue Apr 21, 2021 · 0 comments · May be fixed by #1492
Assignees

Comments

@gcca
Copy link
Contributor

gcca commented Apr 21, 2021

Currently, PostgreSQL data provider implements the standard way of sql data providers. But PostgreSQL works in a different way and some e2e tests are failing.

For instance, limit clause returns unpredictable row subsets of query. So our provider needs to deal with that scenario.

To see the error execute (tpch)

select c_custkey, c_nationkey, c_acctbal
    from customer where c_custkey < 150 and c_nationkey = 5
    or c_custkey = 200 or c_nationkey >= 10
   or c_acctbal <= 500 order by c_custkey limit 75""")

The output is

BlazingContext ready
QUERY: SELECT c_custkey, c_nationkey, c_acctbal  FROM customer order by c_nationkey LIMIT 7000 OFFSET 0
COUNT: 7000
QUERY: SELECT c_custkey, c_nationkey, c_acctbal  FROM customer order by c_nationkey LIMIT 7000 OFFSET 7000
COUNT: 7000
QUERY: SELECT c_custkey, c_nationkey, c_acctbal  FROM customer order by c_nationkey LIMIT 7000 OFFSET 14000
COUNT: 1000
    c_custkey c_nationkey c_acctbal
0           2          13    121.65
1           6          20   7638.57
2           7          18   9561.95
3           8          17   6819.74
4          10           5   2753.54
..        ...         ...       ...
70        117          24   3950.83
71        118          18   3582.37
72        120          12    363.75
73        120          12    363.75
74        123           5   5897.83

[75 rows x 3 columns]

The error is in the duplicated rows

72        120          12    363.75
73        120          12    363.75
@gcca gcca self-assigned this Apr 21, 2021
@gcca gcca linked a pull request Apr 21, 2021 that will close this 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

Successfully merging a pull request may close this issue.

1 participant