Fix for stack overflow due to M reserved words

This commit is contained in:
Christian Wade 2020-09-24 18:21:13 -07:00
parent 4a1ee084b8
commit 545a891f96
2 changed files with 4 additions and 2 deletions

View File

@ -974,7 +974,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata
{
foreach (string missingDependency in measure.FindMissingMeasureDependencies())
{
OnValidationMessage(new ValidationMessageEventArgs($"Measure [{measure.InternalName}] in table '{table.Name}' contains dependency on measure/column [{missingDependency}], which (considering changes to target) cannot be found in target model.", ValidationMessageType.MeasureCalculationDependency, ValidationMessageStatus.Warning));
OnValidationMessage(new ValidationMessageEventArgs($"Measure [{measure.InternalName}] in table '{table.Name}' contains dependency on measure/column [{missingDependency}], which (considering changes to target) cannot be found in target model.", ValidationMessageType.MeasureCalculationDependency, ValidationMessageStatus.Informational));
}
}
}

View File

@ -287,7 +287,9 @@ namespace BismNormalizer.TabularCompare.TabularMetadata
#endregion
char[] delimiterChars = { ' ', ',', ':', '=', '\t', '\n', '[', ']', '(', ')', '{', '}' };
List<string> keywords = new List<string>() { "and", "as", "each", "else", "error", "false", "if", "in", "is", "let", "meta", "not", "otherwise", "or", "section", "shared", "then", "true", "try", "type", "#binary", "#date", "#datetime", "#datetimezone", "#duration", "#infinity", "#nan", "#sections", "#shared", "#table", "#time" };
//9/2020: stack overflow exception fix was to add "Data" "Item" and "Source" to list of keywords
List<string> keywords = new List<string>() { "and", "as", "Data", "each", "else", "error", "false", "if", "in", "is", "Item", "let", "meta", "not", "otherwise", "or", "section", "shared", "Source", "then", "true", "try", "type", "#binary", "#date", "#datetime", "#datetimezone", "#duration", "#infinity", "#nan", "#sections", "#shared", "#table", "#time" };
foreach (MObject mObject in mObjects)
{