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

Reserve original column sequence in SQL when reading data #138

Merged
merged 3 commits into from
Oct 16, 2018

Conversation

xqliu
Copy link
Contributor

@xqliu xqliu commented Oct 15, 2018

Dear,

I found that after pydruid read data, the sequence of columns is different with what user input in SQL,

This patch reserve original column sequence when reading data from chunk, so that column sequence will be same as what user inputed in SQL.

Please help to review this and if possible help to merge this.

Reserve original column sequence when reading data from chunk, so that column sequence will be same as what user inputed in SQL.
@mistercrunch
Copy link
Member

LGTM

@@ -328,7 +328,7 @@ def rows_from_chunks(chunks):
rows = body[:boundary].lstrip('[,')
body = body[boundary:]

for row in json.loads('[{rows}]'.format(rows=rows)):
for row in json.loads('[{rows}]'.format(rows=rows), object_pairs_hook=OrderedDict):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're getting a "Line too long" linting error that breaks the build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for point out, I have modified the code style to fix the listing error.

@mistercrunch mistercrunch merged commit 4164779 into druid-io:master Oct 16, 2018
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 this pull request may close these issues.

2 participants