Skip to content
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

fix: fix storage options for dataset builder #3156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chenkovsky
Copy link

No description provided.

@github-actions github-actions bot added the bug Something isn't working label Nov 22, 2024
Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix looks reasonable, but we don't have a test for it, which worries me.

Do you know why this test doesn't catch it?

@pytest.mark.integration
def test_s3_ddb_distributed_commit(s3_bucket: str, ddb_table: str):
table_name = uuid.uuid4().hex
table_dir = f"s3+ddb://{s3_bucket}/{table_name}?ddbTableName={ddb_table}"
schema = pa.schema([pa.field("a", pa.int64())])
fragments = write_fragments(
pa.table({"a": pa.array(range(1024))}),
f"s3+ddb://{s3_bucket}/distributed_commit?ddbTableName={ddb_table}",
storage_options=CONFIG,
)
operation = lance.LanceOperation.Overwrite(schema, fragments)
ds = lance.LanceDataset.commit(table_dir, operation, storage_options=CONFIG)
assert ds.count_rows() == 1024

Would it catch this if we added an append part to that test?

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 77.98%. Comparing base (1d3b204) to head (642cd7f).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
rust/lance/src/dataset/fragment/write.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3156      +/-   ##
==========================================
+ Coverage   77.95%   77.98%   +0.03%     
==========================================
  Files         242      242              
  Lines       81904    82441     +537     
  Branches    81904    82441     +537     
==========================================
+ Hits        63848    64292     +444     
- Misses      14890    14952      +62     
- Partials     3166     3197      +31     
Flag Coverage Δ
unittests 77.98% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@chenkovsky
Copy link
Author

@wjones127 could you please review it again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants