fix: support MonthTransform for partitioning#1176
Merged
kevinjqliu merged 4 commits intoapache:mainfrom Sep 16, 2024
Merged
Conversation
kevinjqliu
reviewed
Sep 14, 2024
Contributor
kevinjqliu
left a comment
There was a problem hiding this comment.
Thanks for the contribution! This looks great, I've added a minor comment on testing
| _validate_new_partition_fields(table, 1000, 1, 1000, PartitionField(2, 1000, MonthTransform(), "month_transform")) | ||
|
|
||
|
|
||
| @pytest.mark.integration |
Contributor
There was a problem hiding this comment.
nit: it seems like there's no test for the "default name" for any of the transforms. do you mind adding those as well?
Contributor
Author
There was a problem hiding this comment.
Yes of course, I'll add them:)
kevinjqliu
reviewed
Sep 14, 2024
|
|
||
| @pytest.mark.integration | ||
| @pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")]) | ||
| def test_add_truncate_generates_default_name(catalog: Catalog, table_schema_simple: Schema) -> None: |
Contributor
There was a problem hiding this comment.
nit: this is defined twice, remove this one
Contributor
Author
There was a problem hiding this comment.
Thank you for catching that, removed it!
amogh-jahagirdar
approved these changes
Sep 14, 2024
Contributor
amogh-jahagirdar
left a comment
There was a problem hiding this comment.
Thanks for fixing this @felixscherz and adding the additional tests for the default name!
sungwy
pushed a commit
to sungwy/iceberg-python
that referenced
this pull request
Dec 7, 2024
* fix: support MonthTransform for partitioning * test: add tests for generating default names for other transforms * fix: delete duplicate test case * chore: run formatting
sungwy
pushed a commit
to sungwy/iceberg-python
that referenced
this pull request
Dec 7, 2024
* fix: support MonthTransform for partitioning * test: add tests for generating default names for other transforms * fix: delete duplicate test case * chore: run formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
this is fixing a minor bug where partition evolution in combination with a
MonthTransformcould raise an exception: #1156