jqin61 commented on issue #208:
URL: https://github.com/apache/iceberg-python/issues/208#issuecomment-1912416306
@Fokko Thank you! These 2 points of supporting hidden partitioning and
extracting metrics efficiently during writing are very insightful!
For using pyarrow.dataset.write_dataset(), its behavior removed the
partition columns in the written-out parquet files. **I think this is the deal
breaker for using write_dataset().** So either we extend
pyarrow.dataset.write_dataset() or fall back to the arrow API direction.
Some findings during chasing a solution of dataset.write_dataset():
1. pyarrow.dataset.partitioning() only supports static values in the column,
so we might need on Iceberg to add a transformed column. (this column will be
dropped into the directory when write_dataset() uses hive partitioning)
2. write_dataset() takes in a customized callable to collect file paths and
file metadata when files are written and when we create DataFile object this
metadata could be reused:
```
visited_paths = []
metadata_list = []
def file_visitor(written_file):
visited_paths.append(written_file.path)
metadata_list .append(written_file.metadata)
```
--
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]