Skip to content

Commit

Permalink
fix for handling missing feature data (#1163)
Browse files Browse the repository at this point in the history
Co-authored-by: Anirudh Agarwal <aniagarwal@linkedin.biz>
  • Loading branch information
anirudhagar13 and Anirudh Agarwal authored May 9, 2023
1 parent 44e4c7f commit 7d91781
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ private[offline] object AclCheckUtils {
} yield featureAnchorWithSource.source.path

val shouldSkipFeature = FeathrUtils.getFeathrJobParam(ss.sparkContext.getConf, FeathrUtils.SKIP_MISSING_FEATURE).toBoolean
val shouldAddDefaultCol = FeathrUtils.getFeathrJobParam(ss.sparkContext.getConf, FeathrUtils.SKIP_MISSING_FEATURE).toBoolean
val shouldAddDefaultCol = FeathrUtils.getFeathrJobParam(ss.sparkContext.getConf, FeathrUtils.ADD_DEFAULT_COL_FOR_MISSING_DATA).toBoolean
val invalidPaths = AclCheckUtils.checkReadAuthorization(conf, allRequiredPaths.distinct)
if (invalidPaths.isEmpty) {
(Success(()), invalidPaths.map(_._2))
} else {
if (!shouldSkipFeature || !shouldAddDefaultCol) {
if (!shouldSkipFeature && !shouldAddDefaultCol) {
(Failure(
new RuntimeException(
"Can not verify read authorization on the following paths. This can be due to" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ class SlidingWindowAggIntegTest extends FeathrIntegTest {
setFeathrJobParam(SKIP_MISSING_FEATURE, "false")
}

@Test
def testSWAWithMissingFeatureDataFlag(): Unit = {
setFeathrJobParam(FeathrUtils.ADD_DEFAULT_COL_FOR_MISSING_DATA, "true")
val joinConfigAsString =
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=1.0.3-rc3
version=1.0.4-rc1
SONATYPE_AUTOMATIC_RELEASE=true
POM_ARTIFACT_ID=feathr_2.12

0 comments on commit 7d91781

Please sign in to comment.