diff --git a/MarkMpn.Sql4Cds.Controls/ExecutionPlanView.cs b/MarkMpn.Sql4Cds.Controls/ExecutionPlanView.cs index e3f054b0..0c9f553b 100644 --- a/MarkMpn.Sql4Cds.Controls/ExecutionPlanView.cs +++ b/MarkMpn.Sql4Cds.Controls/ExecutionPlanView.cs @@ -145,6 +145,8 @@ protected override void OnPaint(PaintEventArgs e) if (imageName == "AdaptiveIndexSpoolNode") imageName = "IndexSpoolNode"; + else if (imageName == "OpenJsonNode" || imageName == "SystemFunctionNode") + imageName = "ExecuteMessageNode"; using (var stream = GetType().Assembly.GetManifestResourceStream(GetType(), "Images." + imageName + ".ico")) { diff --git a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/ExecuteMessageNode.cs b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/ExecuteMessageNode.cs index 16d59673..485b67a7 100644 --- a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/ExecuteMessageNode.cs +++ b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/ExecuteMessageNode.cs @@ -704,5 +704,10 @@ IRootExecutionPlanNodeInternal[] IRootExecutionPlanNodeInternal.FoldQuery(NodeCo FoldQuery(context, hints); return new[] { this }; } + + public override string ToString() + { + return $"Table Valued Function\r\n[{MessageName}]"; + } } } diff --git a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/OpenJsonNode.cs b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/OpenJsonNode.cs index 3626cc7b..37b86509 100644 --- a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/OpenJsonNode.cs +++ b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/OpenJsonNode.cs @@ -440,5 +440,10 @@ public override object Clone() _conversions = _conversions, }; } + + public override string ToString() + { + return $"Table Valued Function\r\n[OPENJSON_{(Schema == null ? "DEFAULT" : "EXPLICIT")}]"; + } } } diff --git a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/SystemFunctionNode.cs b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/SystemFunctionNode.cs index a74c8867..51c6a6a5 100644 --- a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/SystemFunctionNode.cs +++ b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/SystemFunctionNode.cs @@ -110,6 +110,11 @@ private string PrefixWithAlias(string columnName) return Alias + "." + columnName; } + + public override string ToString() + { + return $"Table Valued Function\r\n[{SystemFunction}]"; + } } enum SystemFunction diff --git a/MarkMpn.Sql4Cds.LanguageServer/QueryExecution/QueryExecutionHandler.cs b/MarkMpn.Sql4Cds.LanguageServer/QueryExecution/QueryExecutionHandler.cs index 692f4ec3..86e16af5 100644 --- a/MarkMpn.Sql4Cds.LanguageServer/QueryExecution/QueryExecutionHandler.cs +++ b/MarkMpn.Sql4Cds.LanguageServer/QueryExecution/QueryExecutionHandler.cs @@ -725,6 +725,10 @@ private ExecutionPlanNode ConvertExecutionPlanNode(IExecutionPlanNode node, Time converted.Type = "udx"; else if (converted.Type == "adaptiveIndexSpool") converted.Type = "indexSpool"; + else if (converted.Type == "openJson") + converted.Type = "tableValuedFunction"; + else if (converted.Type == "systemFunction") + converted.Type = "tableValuedFunction"; // Get the filtered list of properties var typeDescriptor = new ExecutionPlanNodeTypeDescriptor(node, !executed, _ => null);