Closed
Description
Environment
Delta-rs version: python-v0.15.0
Environment:
- OS: MacOS, localstack simulating S3 in Docker
Bug
What happened:
We're using the delta-rs python library to setup the ability to delete from our existing Deltalake tables in S3. They're simple WHERE clauses like the following:
table.delete(predicate="properties.pageUrl = 'testing.com'")
However, I'm seeing a Rust panic:
thread 'tokio-runtime-worker' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-array-48.0.1/src/record_batch.rs:487:9:
assertion `left == right` failed: Cannot convert nullable StructArray to RecordBatch, see StructArray documentation
left: 1
right: 0
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[ERROR] DeltaError: Generic error: Failed to execute write task: task 48 panicked
Traceback (most recent call last):
File "/var/task/aws_lambda_powertools/logging/logger.py", line 449, in decorate
return lambda_handler(event, context, *args, **kwargs)
File "/var/task/newrelic/api/lambda_handler.py", line 135, in _nr_lambda_handler_wrapper_
result = wrapped(*args, **kwargs)
File "/var/task/lambda.py", line 60, in lambda_handler
dt.delete(predicate=predicate)
File "/var/task/deltalake/table.py", line 1107, in delete
metrics = self._table.delete(
END RequestId: 8df76707-d13c-45b2-b112-d1801161785c
This is happening on a field that is nullable..
What you expected to happen:
When a field is null / nullable, either a success or at least some specific error explaining why you can't delete on nullable fields.
How to reproduce it:
Setup a delta table with a nullable field, and attempt to perform a deletion on that field using deltatable's delete
method.
More details:
Activity