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: add columns and total count the queryStream in order to get head… #2281

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

wmontgomery
Copy link
Contributor

@wmontgomery wmontgomery commented Jun 23, 2024

…ers on csvs and whatnot

resolves #2280

image

Copy link
Collaborator

@rathboma rathboma left a comment

Choose a reason for hiding this comment

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

Is this query executed inside the same transaction as the export? If not, the total rows (and even column names) can be different. Is there an easy way to fix that?

@wmontgomery
Copy link
Contributor Author

wmontgomery commented Jun 25, 2024

Is this query executed inside the same transaction as the export? If not, the total rows (and even column names) can be different. Is there an easy way to fix that?

@rathboma It's in this else statement which is prior to beginning the stream

, matching the selectTopStream call above.

Since the query is done prior to streaming it (the export transaction), the count and columns should be the same. What sucks is the query being done 2x, but there are also multiple preliminary queries being done on the full table export as well so at least matches the pattern. Not sure a great way to optimize it without some heavy refactoring, but definitely up to talk it out

@rathboma rathboma merged commit 8a8f436 into master Jun 26, 2024
17 checks passed
@rathboma rathboma deleted the bugfix/2280_HeadersNotInExport branch June 26, 2024 14:40
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.

Headers not appearing in export when running query to file
2 participants