Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
vplauzon committed Oct 19, 2023
1 parent 96d69f7 commit 6e07907
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,9 @@ public AlterIngestionTimePolicyCommand(EntityName tableName, bool isEnabled)
internal static CommandBase FromCode(SyntaxElement rootElement)
{
var tableName = rootElement.GetDescendants<NameReference>().Last();
var policyText = QuotedText.FromLiteral(
rootElement.GetUniqueDescendant<LiteralExpression>(
"AutoDeletePolicy",
e => e.NameInParent == "AutoDeletePolicy"));
var policy = Deserialize<JsonDocument>(policyText.Text);

if (policy == null)
{
throw new DeltaException(
$"Can't extract policy objects from {policyText.ToScript()}");
}

return new AlterIngestionTimePolicyCommand(EntityName.FromCode(tableName.Name), policy);
throw new NotImplementedException();
//return new AlterIngestionTimePolicyCommand(EntityName.FromCode(tableName.Name), policy);
}

public override string ToScript(ScriptingContext? context)
Expand Down

0 comments on commit 6e07907

Please sign in to comment.