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

Add getUpdatedPartitions and optimizeUpdatedPartitions helper #85

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zeotuan
Copy link

@zeotuan zeotuan commented Sep 5, 2024

close #84

@zeotuan zeotuan marked this pull request as ready for review September 8, 2024 11:59
.allFiles
.filter(a => startTime.forall(a.modificationTime >= _.toEpochMilli) && endTime.forall(a.modificationTime <= _.toEpochMilli))
.withColumn("partitionValuesString", col("partitionValues").cast(StringType))
.dropDuplicates("partitionValuesString")
Copy link
Author

Choose a reason for hiding this comment

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

cast to string for dropDuplicates as dropDuplicates directly on partitionValues column which have type Map will result in error

Cannot have map type columns in DataFrame which calls set operations(intersect, except, etc.), but the type of column partitionValues is map<string,string>;

@zeotuan
Copy link
Author

zeotuan commented Sep 8, 2024

Hi @MrPowers @brayanjuls @joydeepbroy-zeotap Please help review this PR. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add get getUpdatedPartitions and optimizeUpdatedPartitions
1 participant