Skip to content

Add getUpdatedPartitions and optimizeUpdatedPartitions helper#85

Open
zeotuan wants to merge 2 commits intomrpowers-io:mainfrom
zeotuan:updatedParition
Open

Add getUpdatedPartitions and optimizeUpdatedPartitions helper#85
zeotuan wants to merge 2 commits intomrpowers-io:mainfrom
zeotuan:updatedParition

Conversation

@zeotuan
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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