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

SELECT DISTINCT ignores the first field specified #31

Open
Penniman opened this issue Mar 5, 2019 · 1 comment
Open

SELECT DISTINCT ignores the first field specified #31

Penniman opened this issue Mar 5, 2019 · 1 comment

Comments

@Penniman
Copy link

Penniman commented Mar 5, 2019

Execute a query such as:

SELECT DISTINCT userid, book_title, isbn FROM book_views

Will return an oRecordData object with fields for book_title and isbn but there will be no userid included. The same query executed in OrientDB Studio executes correctly and returns all fields.

My workaround has been to include a bogus field name:

SELECT DISTINCT pyorient_select_distinct_bug_workaround, userid, book_title, isbn FROM book_views

This is with OrientDB 3.0.15, PyOrient 1.5.5, and python 3.7.2.

@civanescu
Copy link

I have the same issue, BUT.... the results are different.... I believe it is using the old command (because of language).
For example when I do query with no DISTINCT query in OrientDb I have 43958, with DISTINCT I get 8758 records.
In Python without DISTINCT I receive 43958, with DISTINCT fake_column I also receive 43958.
I believe is that the language used is not compatible with 3.0 ... check this new feature: https://www.orientdb.org/docs/3.0.x/release/3.0/SQL-Changes.html#distinct-keyword

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

2 participants