Skip to content

Commit

Permalink
Added Trim to Allow List in Parsing
Browse files Browse the repository at this point in the history
{"fundingSource": "41203", "team": "FED.ICGSA.APPS.FUSION.ARCH", "fshGit": "a4f7446b", "fshDocker": "sha256:054bce20"}
  • Loading branch information
Devin Gundry committed Feb 3, 2025
1 parent 498b4da commit ae2e4a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ object AttributeScheme {
val binding = sft.getDescriptor(index).getType.getBinding
require(AttributeIndexKey.encodable(binding),
s"Invalid type binding '${binding.getName}' of attribute '$attribute'")
val allowedValues: Seq[String] = config.options.get(Config.AllowedListOpt).map(_.split(',').toSeq).getOrElse(Seq.empty).map(AttributeIndexKey.encodeForQuery(_,binding))
val allowedValues: Seq[String] = config.options.get(Config.AllowedListOpt).map(_.split(',').toSeq).getOrElse(Seq.empty).map(allowed => AttributeIndexKey.encodeForQuery(allowed.trim(),binding))
val defaultPartition = AttributeIndexKey.encodeForQuery(config.options.getOrElse(Config.DefaultPartitionOpt, allowedValues.headOption.getOrElse("")), binding)
Some(AttributeScheme(attribute, index, binding, defaultPartition, allowedValues))
}
Expand Down

0 comments on commit ae2e4a5

Please sign in to comment.