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

Asset Hierarchy - Remove single partition deletion flag #859

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

Conversation

BenChand
Copy link
Contributor

@BenChand BenChand commented Nov 2, 2023

NPE fixed with single partition deletes so move to that

@BenChand BenChand requested a review from a team as a code owner November 2, 2023 10:54
@@ -21,8 +21,7 @@ final case class RelationConfig(
deleteMissingAssets: Boolean,
subtrees: AssetSubtreeOption,
ignoreNullFields: Boolean,
rawEnsureParent: Boolean,
enableSinglePartitionDeleteAssetHierarchy: Boolean // flag to test whether single partition helps avoid NPE in asset hierarchy builder
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we might want to keep it for potential future investigations if we see weird NPEs again, that be a way to get one of them ready

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah fair enough, I'll rename it to "useSinglePartition" or something

@@ -22,7 +22,7 @@ final case class RelationConfig(
subtrees: AssetSubtreeOption,
ignoreNullFields: Boolean,
rawEnsureParent: Boolean,
enableSinglePartitionDeleteAssetHierarchy: Boolean // flag to test whether single partition helps avoid NPE in asset hierarchy builder
useSinglePartition: Boolean // a flag for helping to test NPEs by moving the data frame to a single partition
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
useSinglePartition: Boolean // a flag for helping to test NPEs by moving the data frame to a single partition
useSinglePartitionForAssetHierarchyDeletion: Boolean // a flag for helping to test NPEs by moving the data frame to a single partition

or something. Maybe invert the name so that default values is false and it'd mean do repartition to 1. Also let's use repartition as default here

val enableSinglePartitionDeleteAssetHierarchy =
toBoolean(parameters, "enableSinglePartitionDeleteHierarchy", defaultValue = false)
val userSinglePartition =
toBoolean(parameters, "useSinglePartition", defaultValue = false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
toBoolean(parameters, "useSinglePartition", defaultValue = false)
toBoolean(parameters, "useSinglePartition", defaultValue = true)

val enableSinglePartitionDeleteAssetHierarchy =
toBoolean(parameters, "enableSinglePartitionDeleteHierarchy", defaultValue = false)
val userSinglePartition =
toBoolean(parameters, "useSinglePartition", defaultValue = false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
toBoolean(parameters, "useSinglePartition", defaultValue = false)
toBoolean(parameters, "useSinglePartitionForAssetHierarchyDeletes", defaultValue = true)

not sure about the name...

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #859 (339fdb6) into master (913920d) will increase coverage by 0.01%.
Report is 32 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #859      +/-   ##
==========================================
+ Coverage   78.77%   78.79%   +0.01%     
==========================================
  Files          48       48              
  Lines        3020     3018       -2     
  Branches      135      131       -4     
==========================================
- Hits         2379     2378       -1     
+ Misses        641      640       -1     
Files Coverage Δ
...scala/cognite/spark/v1/AssetHierarchyBuilder.scala 100.00% <100.00%> (+0.72%) ⬆️
...rc/main/scala/cognite/spark/v1/DefaultSource.scala 91.36% <100.00%> (ø)
...c/main/scala/cognite/spark/v1/RelationConfig.scala 100.00% <ø> (ø)

Copy link

This pull request seems a bit stale.. Shall we invite more to the party?

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

Successfully merging this pull request may close these issues.

2 participants