Skip to content

_internal.DeltaError: Failed to parse parquet: Parquet error: Z-order failed while scanning data #3327

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

Closed
ZulqarnainB opened this issue Mar 14, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ZulqarnainB
Copy link

Environment

Delta-rs version: 0.25.4

Binding: Python 3.10 (same error occurred using Python 3.12 as well)

Environment:

  • Cloud provider: AWS
  • OS: Amazon Linux 2, Jupyter Lab 3
  • Other: AWS Sagemaker - Instance Type = ml.r6i.8xlarge

Bug

What happened: When I try to perform z ordering on a dataset with about 16 million records and 400+ columns, z-ordering fails returning the following error:

_internal.DeltaError: Failed to parse parquet: Parquet error: Z-order failed while scanning data: ResourcesExhausted("Failed to allocate additional 1220294400 bytes for ExternalSorter[15] with 0 bytes already allocated for this reservation - 185759036 bytes remain available for the total pool")

Using following code to z order:

DeltaTable(
table_uri=delta_table_path,
storage_options=storage_options
).optimize.z_order(columns=["customer_seq"],
partition_filters=[("effective_date", "=", run_date.strftime('%Y-%m-%d'))]
)

What you expected to happen: I expected the Z Ordering to work

How to reproduce it:

More details: Data is partitioned, and z-ordering is being performed on a single partition.

@ZulqarnainB ZulqarnainB added the bug Something isn't working label Mar 14, 2025
@ion-elgreco
Copy link
Collaborator

This is an issue upstream in Datafusion: apache/datafusion#12136

@ion-elgreco ion-elgreco closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants