corleyma commented on issue #1679:
URL:
https://github.com/apache/iceberg-python/issues/1679#issuecomment-2666511285
As a temporary workaround, would something like this suffice?
```python
def force_non_null_fields(table: pa.Table, fields_to_force: list[str]) ->
pa.Table:
new_fields = [
field.with_nullable(False) if field.name in fields_to_force else
field
for field in table.schema
]
new_schema = pa.schema(new_fields)
return pa.Table.from_arrays(table.columns, schema=new_schema)
```
My understanding is that this creates a new table with our desired schema
without copying the underlying arrays.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]