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: avoid compressed json files repartitioning #10470

Merged
merged 1 commit into from
May 14, 2024

Conversation

korowa
Copy link
Contributor

@korowa korowa commented May 12, 2024

Which issue does this PR close?

Closes #10435.

Rationale for this change

Turning off repartitioning for compressed JSON files allows not to fail on reading such files.

What changes are included in this PR?

Same as above

Are these changes tested?

Test for reading gzipped JSON with forced repartitioning (controlled by settings), extended with other compression types.

Are there any user-facing changes?

No

@github-actions github-actions bot added the core Core DataFusion crate label May 12, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @korowa -- this looks great 🙏

@@ -154,7 +154,7 @@ impl ExecutionPlan for NdJsonExec {
target_partitions: usize,
config: &datafusion_common::config::ConfigOptions,
) -> Result<Option<Arc<dyn ExecutionPlan>>> {
if self.file_compression_type == FileCompressionType::GZIP {
if self.file_compression_type.is_compressed() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the actual fix 🎉

@alamb alamb merged commit 0c5d72b into apache:main May 14, 2024
23 checks passed
@alamb
Copy link
Contributor

alamb commented May 14, 2024

Thanks again @korowa

findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Unknown frame descriptor" for ZSTD data.
2 participants