From 545a891f9681ae6f14be02febeb5c5413bbf4794 Mon Sep 17 00:00:00 2001 From: Christian Wade Date: Thu, 24 Sep 2020 18:21:13 -0700 Subject: [PATCH] Fix for stack overflow due to M reserved words --- .../TabularCompare/TabularMetadata/Comparison.cs | 2 +- .../TabularCompare/TabularMetadata/TabularModel.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Comparison.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Comparison.cs index a45b7aa..cec3f25 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Comparison.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Comparison.cs @@ -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)); } } } diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs index 1a2da3d..b2249f2 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs @@ -287,7 +287,9 @@ namespace BismNormalizer.TabularCompare.TabularMetadata #endregion char[] delimiterChars = { ' ', ',', ':', '=', '\t', '\n', '[', ']', '(', ')', '{', '}' }; - List keywords = new List() { "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 keywords = new List() { "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) {