-
Notifications
You must be signed in to change notification settings - Fork 174
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
feat: support new PyIceberg IO properties and custom IOConfig in write_iceberg #3633
Conversation
Resolves #3627 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3633 +/- ##
==========================================
+ Coverage 77.90% 77.99% +0.09%
==========================================
Files 720 720
Lines 88724 88794 +70
==========================================
+ Hits 69117 69252 +135
+ Misses 19607 19542 -65
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments
daft/io/_iceberg.py
Outdated
@@ -9,82 +9,52 @@ | |||
from daft.logical.builder import LogicalPlanBuilder | |||
|
|||
if TYPE_CHECKING: | |||
from pyiceberg.table import Table as PyIcebergTable | |||
# from pyiceberg.table import Table as PyIcebergTable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rm
daft/io/_iceberg.py
Outdated
return None | ||
|
||
io_config = IOConfig( | ||
s3=S3Config( | ||
endpoint_url=props.get("s3.endpoint"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these (including the GCS ones below) also use get_first_property_value
since we also want it to affect any_props_set
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good point, will change that
CodSpeed Performance ReportMerging #3633 will improve performances by 98.6%Comparing Summary
Benchmarks breakdown
|
In addition to the new features, I restructured our
_convert_iceberg_file_io_properties_to_io_config
in two ways:get_first_property_value
function, instead creating a dictionary to pass into the constructors. This allows us to better take advantage of the type system and enables type checkers to catch potential issues. Also this function allows us to have multiple properties that can be used for a config valueI also cleaned up
read_iceberg
just a little bit to make the names and types more similar towrite_iceberg